How the X Algorithm Actually Works in 2026

A definitive breakdown • xrabbit.io • Updated Feb 2026

1. Core Ranking Signals

The algorithm ultimately optimizes for long-term user retention. The three heaviest signals remain engagement velocity, author reputation (Tweepcred), and SimClusters community fit.

Example: A creator with 12k followers posts a 47-second video breaking down a new Grok feature. It receives 1.8k views in the first 38 minutes with strong completion rate and 94 replies. The post is distributed to 68,000 people in the first two hours.

2. How the Algorithm Treats Video and Live Content

Video and live content receive special treatment because they produce stronger engagement signals than text.

Video Signals

Live Discussions & Spaces

Live content creates real-time engagement spikes that the algorithm loves. A single high-quality Space can move an account’s reputation score faster than weeks of regular posting because it produces dense, high-signal interaction data.

Example: A creator hosted a 41-minute live discussion with two other accounts. The Space generated 2,300 listeners and 180 meaningful replies in the following 90 minutes. The algorithm treated this as a strong reputation signal and increased distribution of that creator’s text posts for the next 11 days.

3. How the Algorithm Values Subscribers

Subscribers are one of the strongest positive signals available.

Creators with strong subscriber bases can often post less frequently while maintaining high reach because the algorithm already knows these users want to see their content.

4. New Content vs Replies — What the Algorithm Prioritizes

The algorithm treats original posts and replies differently.

Original Posts

Original posts are evaluated on velocity, author reputation, and community fit. They are the primary way new content enters the distribution system.

Replies

Replies are scored on both the quality of the reply and the reputation of the person being replied to. A high-quality reply to a large account can generate massive distribution even if the replier has a small following.

Reply technique that works: Instead of “Great point!”, write “The part about chain-of-thought is interesting but I’ve seen it break down on longer contexts — here’s what happened when we tested it on 12k token inputs…” This style of reply adds new information and often gets quote-tweeted or liked by the original poster’s audience.

5. Monetization and How the Algorithm Responds

The algorithm itself does not directly optimize for monetization, but creator behavior around monetization affects distribution.

6. Raw Code Deep Dive — Full Annotated Walkthrough

Below is a detailed, file-by-file exploration of the most important parts of the open-source X recommendation algorithm. Each section includes the actual code structure and what it means for creators.

Home Mixer — The Orchestration Layer

val productPipeline = ForYouProductPipelineConfig()
val scoredTweets = ScoredTweetsMixerPipelineConfig()
val candidates = Seq(
  inNetworkCandidatePipeline,      // Earlybird
  tweetMixerCandidatePipeline,     // Cr-Mixer
  utegCandidatePipeline,
  frsCandidatePipeline
)

This is where the system decides which candidate sources to pull from. For You is built by mixing multiple sources rather than just showing posts from accounts you follow.

Heavy Ranker Scoring (Simplified View)

def scoreCandidate(tweet: Tweet, viewer: User): Double = {
  val velocity = computeEngagementVelocity(tweet)
  val reputation = getTweepcred(tweet.author)
  val simcluster = computeCommunitySimilarity(viewer, tweet)
  val graph = getGraphFeatures(viewer, tweet.author)
  
  0.35 * velocity + 0.25 * reputation + 0.20 * simcluster + 0.15 * graph
}

This structure shows why engagement velocity and author reputation dominate. Small improvements in either produce outsized distribution gains.

Visibility Filtering

if (isNSFW(tweet) || isAbusive(tweet) || isSpam(tweet)) {
  return Filtered
}

Hard filters are applied after ranking. Even a high-scoring post can be removed if it triggers trust & safety signals.

SimClusters Community Detection

SimClusters is one of the most important and least understood parts. It assigns users and tweets to sparse communities. A post that performs well inside multiple communities receives an extra boost because it demonstrates broader relevance.

UTEG (User Tweet Entity Graph)

val candidates = uteg.traverse(userId, maxDepth = 2, minEdgeWeight = 0.3)

This graph traversal finds posts that people you follow have engaged with. It is one of the strongest sources of high-quality out-of-network content.

Based on direct analysis of twitter/the-algorithm (2023 open source release).
xrabbit.io — Built for creators who want to understand the system.