How Does the X Algorithm Work in 2026? A Plain Walkthrough of the Code

How does the X algorithm work in 2026?

The X algorithm in 2026 builds each For You feed by pulling posts from accounts you follow and from accounts you don't, then ranking them with Phoenix, a transformer model X called Grok-based in January 2026. Phoenix predicts actions like replies, reposts and blocks, and X adds those predictions into one score. Filters then remove posts that can't be shown.

For years, advice about the X algorithm was guesswork. Then, in January 2026, X put the code for its new For You feed on GitHub. I read it to see what changed since 2023, keeping what's clear apart from what's still hidden.

Where does the 2026 information come from?

The information comes from three places of unequal strength. Published code is strongest, official announcements come second, and executive posts or creator theories come last.

One caution: the README says some files, such as certain prompts and rules, are not published. So it's a real look inside, not the full picture.

What are the main steps of the X algorithm in 2026?

The X algorithm in 2026 runs in four main steps: find candidate posts, add details to them, score them, and filter them. A service called Home Mixer runs the whole thing every time you open For You.

  1. Find candidates. Thunder keeps recent posts from accounts you follow in memory. Phoenix retrieval finds other posts by turning you and each post into numbers (embeddings) and picking close matches. SimClusters and a popular-posts list add more.
  2. Add details. The system fetches each post's text and author details.
  3. Score. Phoenix predicts how likely you are to take each action on each post.
  4. Filter and order. Posts that break rules or that you shouldn't see get removed. The rest get ordered by score, with a few adjustments.

What I find interesting is how much the model leans on you. The README calls your recent engagement history "the main input to the model." What you liked, replied to and skipped shapes your feed most.

How does Phoenix score a post?

Phoenix scores a post by predicting the chance of many separate actions, then adding them up with weights. Good actions get positive weights. Bad actions, like blocking or reporting, get negative weights that pull a post down.

The README lists the predicted actions. They include likes, replies, reposts, quotes, shares, clicks, video views, time spent reading (dwell) and following the author. On the negative side it predicts "not interested," mute, block, report and "not dwelled" (scrolling straight past).

The default weights sit in a file called param.rs in the 2026 repo. As of October 2026, a few of them read like this (the file changes often):

Predicted actionDefault weight in param.rs
Like (FavoriteWeight)0.66
Repost (RetweetWeight)1.0
Reply (ReplyWeight)5.0
Quote (QuoteWeight)5.0
Share via copy link20.0
Follow the author4.0
Not interested-52.272
Mute author-58.8
Report-234.0

One trap: these weights multiply predicted probabilities, not raw counts. A report's big weight doesn't mean one report wipes out hundreds of likes. X says a report is far less likely than a like to begin with, which is why its weight is larger.

What changed from the 2023 X algorithm?

The biggest change from 2023 is the ranking model. The 2023 release used a neural network that read about 6,000 features per post, while the 2026 code uses Phoenix, a transformer that reads your recent engagement history. The overall shape, candidates then ranking then filters, stayed the same.

The 2023 heavy ranker README listed weights set on April 5, 2023. A reply was 13.5, a like was 0.5, and a reply that the author then engaged with was 75.0. A report was -369.0. Those numbers came from the 2023 release, and you shouldn't treat them as today's values.

The wording changed too. When the repo first went up in January 2026, its README called the ranker a "Grok-based transformer" and claimed X had eliminated every hand-engineered feature. The current README just says "a transformer model," and the code still has filters, discounts and boosts.

For a gentler version, my beginner's explanation of the Twitter algorithm skips the code.

What adjustments happen after the score?

After scoring, X applies three adjustments: author diversity, an out-of-network discount, and a new-author boost. Then filters decide whether each post can be shown at all.

The filter list is long. One removes posts older than 48 hours. Others remove duplicates, blocked or muted accounts, your muted words, and posts you've already seen. The visibility system then allows a post, adds a notice, puts it behind a tap-through screen, or drops it. My guide on what affects Twitter post visibility goes through each one.

What this means for you

For you as a poster, the 2026 X algorithm rewards posts that start real conversations and get shared, and it punishes posts that make people mute or report. That part is in the code, not a theory.

Three habits follow from it:

The honest takeaway on the 2026 X algorithm

The X algorithm in 2026 is more open than ever, and that's good news for anyone trying to grow. You can read the real weights instead of trusting rumors. Musk himself called it "dumb" on release day, Gizmodo reported, and said it would improve each month. So check the repo now and then, and keep writing for real people. That's the one strategy every version of the code has rewarded.

Frequently Asked Questions

Is the X algorithm open source in 2026?

Yes, most of the For You ranking code is public. X published it on GitHub as xai-org/x-algorithm in January 2026 under the Apache 2.0 license. The README says a limited set of files stays private, such as some prompts and rule files, so the public code is not the complete system.

Does Grok decide what I see on X?

Partly, yes. When X published its For You code in January 2026, it described the Phoenix ranking model as Grok-based. In late November 2025, Elon Musk also announced that the Following feed is ranked by Grok by default, and said a chronological view is still available.

Are the 2023 algorithm weights still used?

No, the 2023 weights are not the current defaults. The 2023 heavy ranker gave replies 13.5 and likes 0.5. The 2026 param.rs file lists replies at 5.0 and likes at 0.66. X can change production values at any time, so both sets are snapshots.

How long does a post stay eligible for For You?

The 2026 code includes an AgeFilter that removes posts older than 48 hours from For You candidates. That means most of a post's For You reach happens within two days. Older posts can still appear on your profile, in search, and when someone shares a link.

Does X Premium boost posts in the For You feed?

The 2026 For You README makes no statement about a For You ranking boost for Premium accounts. Replies are different: X's Help Center says replies from verified accounts get a slight preference in reply ranking, and that it is testing those levels. X hasn't published any For You multiplier.