X (Twitter) Algorithm 2026: What the Open-Source Code Shows

X (Twitter) Algorithm 2026: What the Open-Source Code Shows About Replies, Recency and Reach

Short answer

X ranks its For You feed with a Grok-based model that predicts how each person will respond to a post, then adds those predictions up using weights. Replies and conversations count far more than likes, and mutes, blocks and reports count heavily against a post. Unusually, much of this is public: X published its new ranking code in January 2026 and its ranking weights in August 2026. The widely quoted reply and like weights come from the older 2023 code.

X is the only major platform that has published the code behind its feed. That should make it the easiest algorithm to understand. In practice it has produced more confident misreadings than any other.

The problem is mixing two different releases. Most advice still quotes numbers from 2023 code that X replaced in 2026. This guide separates the two and explains what holds true across both.

Two open-source releases

DateWhat X published
31 March 2023The original Twitter ranking code, including engagement weights. It was never updated afterwards
20 January 2026A rebuilt, Grok-based system, written mostly in Rust, at xai-org/x-algorithm; the weights were not yet included
15 May 2026A large update adding a content-understanding system and ad blending
13 August 2026Production ranking weights, visibility filtering code and a tool showing labels on your own account

When you read an X tip, check which release it is based on. Anything citing exact weights from before August 2026 is describing the 2023 system.

How the For You feed is built

  • Candidates are gathered from accounts you follow, stored for fast access in a system X calls Thunder, and from accounts you do not follow, found by matching your interests.
  • A ranking model scores each candidate. X calls it Phoenix, a Grok-based transformer that predicts how likely you are to take many different actions on each post.
  • The predictions are combined into a single score using weights, so a likely reply counts for more than a likely like.
  • Filters run last, removing duplicates, content from blocked or muted accounts, and posts that break visibility rules, and keeping the feed varied.

The key idea is that each post is scored for each viewer. There is no single quality score that follows a post everywhere; the same post can rank highly for one person and not at all for another.

What the code says about engagement

The model predicts a range of actions: liking, replying, reposting, quoting, clicking into a profile, staying on a post, following the author, and negative actions such as muting, blocking and reporting.

The 2023 code made the balance famous. A like carried a weight of 0.5, a reply 13.5, and a reply that the author then engaged with 75. A report carried a weight of minus 369. Those exact numbers belong to the old system, and the 2026 weights differ, but the direction has held: conversation counts for far more than approval, and negative feedback costs far more than a like earns.

Replies and conversation

  • Write posts people want to answer: a clear opinion, a useful question, a claim worth debating.
  • Reply to your replies. In the 2023 code, a reply the author engaged with was the most valuable positive action of all.
  • Reply well to others in your field. Thoughtful replies on larger accounts are one of the main ways new readers find you.
  • Keep conversations civil. Replies that turn hostile invite mutes and blocks, which pull the other way.

Recency and engagement velocity

X has always favoured recent posts. The feed is built for what is happening now, and a post’s chance of being shown fades within hours rather than days.

That is why early response matters. A post that quickly draws replies and conversation gives the model strong evidence that similar viewers will respond too, while it is still fresh enough to be shown. Posting when your audience is actually online is one of the few genuinely useful timing tips.

Followers that actually help reach

Posts from accounts you follow form one of the two main candidate pools, so every relevant follower puts your posts in front of one more person by default.

  • Relevant followers matter more than many followers. People who never engage add little and can drag down how your posts perform with the audience the model tests them on.
  • A consistent subject helps the interest matching that finds readers outside your followers.
  • Followers gained from good replies tend to be the engaged kind, because they found you through a conversation they cared about.

Negative signals

  • Mutes and blocks tell X that a viewer never wants to see your posts, and they weigh heavily against you.
  • Reports carry the largest negative weight of all.
  • Not interested taps reduce how often you appear for that viewer and people like them.

This is the hidden cost of rage bait. Posts that provoke can draw replies, but they also draw mutes, blocks and reports, and the code makes clear those can outweigh the engagement.

Links and Premium

  • Links: X’s owner has said publicly that the algorithm optimises for time spent on X, so posts that send people elsewhere get less attention. Many accounts put the main point in the post and the link in a reply.
  • Premium: X lists prioritised placement of replies among the features of its paid subscriptions, so Premium accounts’ replies tend to appear higher in conversations.

Threads, articles and single posts

  • Single posts suit one sharp point, an opinion or a question, and are the easiest to reply to.
  • Threads suit a sequence of ideas. The first post has to stand on its own, because it is what most people see and decide on.
  • Long-form articles, available on paid tiers, suit depth, but give readers a reason to reply or share rather than just read.

Choose the format by what gives people a reason to stay and respond, not by which one is said to be favoured this month.

A worked example

Imagine two accounts sharing the same industry report.

  • The first posts the headline and a link, then logs off.
  • The second posts the single most surprising finding with its own view on why it matters, adds the link in a reply, and spends the next hour answering people who disagree.

The first gives viewers little to respond to and sends them away. The second invites replies, keeps people on the platform and turns the author into part of the conversation, every one of which is a signal the ranking model rewards.

What the code does not tell you

  • How the model weighs your particular history. Phoenix learns from engagement patterns, so its behaviour for any one viewer cannot be read off the code.
  • Whether production matches the repository at any given moment. The code is a strong guide, not a live mirror.
  • Future changes. Weights and filters have already changed several times in 2026.

A simple weekly routine

  1. Post daily or near-daily on the two or three subjects you want to be known for.
  2. Set aside time after posting to answer replies while the post is fresh.
  3. Write a few considered replies each day on larger accounts in your field.
  4. Review which posts drew conversation, not just impressions, and do more of those.

Diagnosing a drop in reach

  1. Check the labels on your account using the transparency tool X added in August 2026.
  2. Compare replies per post, not just impressions, against your earlier work.
  3. Look for negative feedback: a spike in mutes or blocks after a heated thread can suppress later posts.
  4. Check your topics and timing. Posting outside your usual subjects, or when your audience is offline, reduces early response.
  5. Review link-heavy posts, and try moving links into replies.

Each platform weighs things differently. See the TikTok algorithm, the LinkedIn algorithm , the Facebook algorithm and the Reddit algorithm.

Reach on X suddenly fallen?

Labels, negative feedback and fading conversation leave different traces. Send me your recent X analytics and within 48 hours I will tell you which one is holding your posts back.

Get free diagnostic