How the X feed algorithm works: what the open source code says
X has published the code of its feed. It is not the whole truth about what runs in production: experiments are going on there, and the numbers in the repository may differ from the live ones. But you can pull the orders of magnitude out of it, and they explain a lot. Below is what the code actually says and how to read it.
Source: the xai-org/x-algorithm repository, commit a284320 from November 17, 2026. Every number below is a repository default.
How a post gets into the feed
First, candidates are gathered. They come from several places: posts from people you follow (Thunder), embedding search outside your network (Phoenix), SimClusters and a set of popular posts.
Then come the filters. One of them is by age: a post older than 48 hours does not make it into For You.
After the filters, a model predicts what actions the reader will take. A post’s score is the sum of “action weight times the probability of that action”. One important detail: the weights multiply the predicted probability, not the post’s real counters. How many likes a post has matters less to ranking at that moment than what the model thinks this particular reader will do.
At the end come adjustments (more on them below) and feed diversity, so the feed is not all the same thing.
What each action weighs
Here are the action weights from param.rs:
| Action | Weight |
|---|---|
| Reply | 5 (+15 with a mutual follow, 20 in total) |
| Quote | 5 |
| Share via DM | 5 |
| Follow the author | 4 |
| Share | 2.118 |
| Repost | 1 |
| Like | 0.708 |
| Time on the opened post after a click | 0.385 |
| Click | 0.274 |
| Link open | 0.2 |
| Photo expand | 0.05 |
| Video view, video open | 0 |
| Report | -234 |
| Mute author | -58.8 |
| “Not interested” | -53.07 |
| Block | -31.2 |
What stands out.
A conversation weighs several times more than a like. A reply and a quote are 5 each, a like is 0.708. If the model predicts the reader is more likely to reply, the post gets far more than if they just tap the heart.
A mutual follow raises the weight of a reply. If you and the reader follow each other, the reply weight in the code becomes 20.
Negative signals hit orders of magnitude harder than positive ones. A report costs minus 234. That is why rage bait for replies, under which people tap “not interested” and mute, does not pay off.
Opening a video is worth nothing. The weights of video open and video quality view are zero. The code counts a video as a quality view from 10 seconds, but that event also has a weight of 0. So “opened it and left” gives you nothing.
One caveat. The file vm-ranker/params.rs holds a different set: a like is 0.5, and “share by copying the link” is 20. So production is already experimenting. The overall conclusion stays the same: replies, quotes and shares are worth several times more than a like, and negative signals cost more than anything else.
A post streak: each next post weighs less
There is an adjustment called author diversity. If one feed response has several posts by the same author, the k-th post is multiplied by (1 - 0.25) * 0.5^k + 0.25. That gives 1.0, then 0.625, then 0.4375 and so on, but never below 0.25.
The practical takeaway is simple. Five posts in a row within ten minutes compete with each other: each next one loses up to 56% of its score until it hits the floor. Space your posts out.
There are other adjustments too. Posts from outside your network are multiplied by 0.75 (0.5 in topic feeds). Replies and reposts from people you follow are also multiplied by 0.75.
The window for small accounts
This is the most interesting part for anyone with few followers. The code has a separate cold start mechanism: one slot in the feed (rank 15–16) goes to posts that have not been shown much yet.
A candidate must meet these conditions:
- it is not a reply or a repost;
- the author has no more than 50,000 followers;
- the post is no older than two hours (7,200 seconds);
- it has fewer than 200 impressions in Home.
The pick works like this: Thompson sampling from the distribution Beta(0.75 + likes, 49.25 + impressions - likes). The prior like rate per impression is about 1.5%. Of the two best samples, the one with the best score wins.
Put simply: in the first two hours, the like rate per impression decides. A weak start closes this path.
Two caveats you should not lose. First, these are repository defaults, and production may differ. Second, our analytics count views across all surfaces, not just Home, so we cannot check the “fewer than 200 impressions” condition directly.
What the algorithm lacks, or what we do not know
There is no penalty for external links in the ranking code. Opening a link (open link) gives plus 0.2. The advice “do not post links, X cuts your reach” does not follow from this code. Maybe it works through time on the post or in a part that is not in the repository. We have no verified confirmation, so treat it as a cautious hypothesis.
The popular posts formula is in the repository, but we do not use it. It rates a post’s quality as a forecast of views over 24 hours with an 8-hour half-life. For forecasts we use our own niche curve, checked against past data.
Production may differ. Everything above is defaults from the open repository, not a measurement of the live feed.
What you can do with this
- Space your posts out. A streak loses up to 56% of the score on each next post until it reaches the 0.25 floor.
- Write for replies and quotes, not for likes. A weight of 5 versus 0.708.
- In video, watching for 10 seconds or more is what counts. An open alone weighs nothing.
- If you have up to 50,000 followers, the first two hours are special. According to the code, this is the window that decides whether a post gets shown in that slot.
- Do not provoke for reactions. Mute, “not interested” and reports cost orders of magnitude more than a like.
In short
- A post’s score is action weight times predicted probability, not times real counters.
- A reply, a quote and a share via DM weigh 5 each, a like 0.708, a report minus 234.
- Each next post by the same author in one feed response weighs less, with a floor of 0.25.
- Accounts with up to 50,000 followers get a two-hour window where the like rate per impression decides.
- All of these are defaults from the open repository. Production experiments, so do not take the exact numbers as facts about the live feed.
QuietX uses these benchmarks in its analytics: for example, it counts the rate of replies and quotes per view and shows the early like rate on fresh posts from small accounts. If you are curious, take a look at the app. And if you want to grow together with real creators in your niche, we have a mutual follow exchange: you make the follows yourself, and it does not guarantee results.