How the X (Twitter) For You Algorithm Works in 2026

X's For You feed is a pipeline, not one ranking formula. For each request, it gathers viewer context, recalls followed and out-of-network posts in parallel, hydrates and filters them, predicts likely actions, computes value, reranks for diversity, applies viewer-specific visibility rules, and blends the final feed. This map follows the August 13, 2026 open-source release at commit a389166.

The repository shows public code and checked-in defaults, not every live experiment or private anti-abuse rule. Creator implications are informed interpretation, not a guaranteed reach formula.

Solid · execution path Data, sequence, branch, merge, control, or feedback
Dashed · conditional/secondary path Async, dependency, retry, or fallback; shown when a related node is active
  1. For You request
    Feed request

    A viewer request starts one fresh For You assembly.

    Sequence → Query hydration
  2. Detached side effects
    Async feedback

    Detached tasks record history, events, caches, and metrics.

    ⟲ Return to Query hydration · Event: served and seen history updates the next request
  3. Content and account models
    Content signals

    Models score content, media, and account behavior.

    Data → Rules and enforcement · model scores and events
  4. Query hydration
    Viewer context

    Actions, social state, settings, and history are gathered.

    Sequence → Candidate source fan-out
    Dependency → Phoenix shared ranker · viewer history
    Dependency → Visibility Filtering · viewer policy
  5. Rules and enforcement
    Labeling rules

    Event rules and enforcement convert signals into labels.

    Data → Safety label storage · apply labels
  6. Candidate source fan-out
    Parallel recall

    Enabled retrieval sources launch together for lower latency.

    Branch → Thunder · in-network
    Branch → Phoenix retrieval source · out-of-network
    Branch → SimClusters ANN · out-of-network
  7. Safety label storage
    Safety labels

    Stored labels are read later by the visibility service.

    Dependency → Visibility Filtering · request-time lookup
  8. Three active recall families
    1. Thunder
      Followed posts

      Recent posts from followed accounts arrive newest first.

      Merge → Candidate merge
    2. Phoenix retrieval source
      Parallel recall

      A parallel source recalls posts from a vector index.

      Merge → Candidate merge
    3. SimClusters ANN
      Cluster recall

      Cluster ANN feeds recalled posts to the Phoenix ranker.

      Merge → Candidate merge
      Dependency → Phoenix shared ranker · after merge, hydration, and filters
  9. Candidate merge
    Candidate merge

    All source results concatenate before shared enrichment.

    Sequence → Candidate hydration
  10. Candidate hydration
    Post hydration

    Post, author, media, counts, access, and SID fields load.

    Sequence → Pre-scoring filters
  11. Pre-scoring filters
    Cheap filters

    Sequential rules remove cheap or clearly ineligible posts.

    Sequence → Phoenix shared ranker
  12. Phoenix shared ranker
    Action scores

    Scores merged candidates from every recall source.

    Sequence → RankingScorer · action predictions
  13. RankingScorer
    26 weights

    Combines 26 Phoenix outputs with tunable coefficients.

    Sequence → VM Ranker · weighted scalar
  14. VM Ranker
    Diverse rerank

    A DPP reranker trades a little score for local diversity.

    Sequence → Top-K selection
  15. Top-K selection
    Top K select

    The highest scores advance before final visibility checks.

    Sequence → Visibility Filtering
  16. Visibility Filtering
    Visibility gate

    Rules decide allow, interstitial, or drop per viewer.

    Sequence → For You blending pipeline
  17. For You blending pipeline
    Feed blending

    Ranked posts mix with ads, modules, prompts, and frames.

    Sequence → Ranked For You timeline
  18. Ranked For You timeline
    For You output

    Feed items and cursors become the returned For You timeline.

    Async → Detached side effects · after response
Data layer
For You request
Feed request

A viewer request starts one fresh For You assembly.

Thunder
Followed posts

Recent posts from followed accounts arrive newest first.

Safety label storage
Safety labels

Stored labels are read later by the visibility service.

Model layer
Phoenix retrieval source
Parallel recall

A parallel source recalls posts from a vector index.

SimClusters ANN
Cluster recall

Cluster ANN feeds recalled posts to the Phoenix ranker.

Phoenix shared ranker
Action scores

Scores merged candidates from every recall source.

RankingScorer
26 weights

Combines 26 Phoenix outputs with tunable coefficients.

VM Ranker
Diverse rerank

A DPP reranker trades a little score for local diversity.

Content and account models
Content signals

Models score content, media, and account behavior.

Service layer
Query hydration
Viewer context

Actions, social state, settings, and history are gathered.

Candidate hydration
Post hydration

Post, author, media, counts, access, and SID fields load.

Pre-scoring filters
Cheap filters

Sequential rules remove cheap or clearly ineligible posts.

Top-K selection
Top K select

The highest scores advance before final visibility checks.

Visibility Filtering
Visibility gate

Rules decide allow, interstitial, or drop per viewer.

For You blending pipeline
Feed blending

Ranked posts mix with ads, modules, prompts, and frames.

Ranked For You timeline
For You output

Feed items and cursors become the returned For You timeline.

Detached side effects
Async feedback

Detached tasks record history, events, caches, and metrics.

Orchestration layer
Candidate source fan-out
Parallel recall

Enabled retrieval sources launch together for lower latency.

Candidate merge
Candidate merge

All source results concatenate before shared enrichment.

Rules and enforcement
Labeling rules

Event rules and enforcement convert signals into labels.

What the code shows

  1. Candidate sources retrieve recent posts from followed accounts and out-of-network recommendations.
  2. The Phoenix ranker predicts how each viewer may respond to each candidate.
  3. RankingScorer converts those predictions into a value score, then the VM ranker adds diversity before Top-K selection.
  4. Visibility rules remove or restrict ineligible posts before the feed is blended with other timeline items.

What this means for creators

The code does not reveal a guaranteed recipe for reach. It does show that X ranks for predicted viewer actions, filters negative and safety outcomes, and preserves some diversity in the final feed. The practical response is to publish specific posts for a real audience, earn useful interactions, and avoid spam-shaped behavior.

Primary sources

Turn the research into a repeatable X workflow

ThreadWave helps you find timely ideas and reply opportunities, draft in your voice, and keep important actions reviewable.

Set up ThreadWave