GuideUpdated October 2026

X algorithm explained: what the code actually says

Two posts with the same engagement counts can reach different people. This guide separates the published ranking mechanics from practical writing advice and claims the code cannot establish.

Written by Updated October 18, 2026

How we got here: the open-source timeline

2023 reference

twitter/the-algorithm

Use the earlier repository for historical context, not as a current posting formula.

github.com/twitter/the-algorithm
August 13, 2026

Expanded public code

The repository documents added configuration, filtering systems and model code.

github.com/xai-org/x-algorithm#august-13th-2026
August 14, 2026

Action-weight clarification

X explains why comparing weights as if they were engagement counts produces incorrect conclusions.

github.com/xai-org/x-algorithm#august-14th-2026
September 18, 2026

Under the Hood legal visibility reports

X says reports now include account or post visibility limits required by law, including country-specific withholding.

github.com/xai-org/x-algorithm#september-18th-2026
October 3, 2026

Popular posts source

For You adds a shared list of popular recent posts from the most-followed active accounts.

github.com/xai-org/x-algorithm/commit/b412112
October 6, 2026

New predictions and a notice outcome

Phoenix predicts video watch time and profile visit time. Visibility filtering gains a fourth answer: show the post with a notice.

github.com/xai-org/x-algorithm/commit/e62790c
October 14, 2026

Like weight raised

The like weight moves from 0.5 to 0.66. It scales a viewer's predicted chance of liking, not a post's like count.

github.com/xai-org/x-algorithm/commit/17c96bf

What changed in October 2026

X pushed 13 code updates to the public repository between September 30 and October 17, about 85,000 added lines. The repository's Notable Updates section got no new entry for any of them. Most of the new code is video, ads, infrastructure and visibility-rule test data. These are the changes that touch how text posts are found and ranked.

A new lane for popular posts

On by default

For You now pulls from a shared list of popular recent posts, alongside follows, Phoenix retrieval and SimClusters. The list holds up to 500 posts from the last 24 hours, at most five per author, ordered by views adjusted for the post's age. Its authors are the most-followed accounts among those that posted in the past seven days: the top 0.005% by followers.

This is a route only the largest accounts can use. It adds candidates, not a ranking boost: these posts are scored by the same model as everything else.

Source code

Likes weigh a little more

On by default

The like weight went from 0.5 to 0.66 on October 14. Like every action weight, it multiplies one viewer's predicted chance of liking the post.

It does not multiply your like count, and it does not set an exchange rate between likes and replies.

Source code

Two new predictions that do not count yet

Weight 0

Phoenix now predicts how many seconds a viewer will keep watching a video, and how many seconds they will spend on an author's profile after clicking through. In the published scorer, both weights are 0.0.

They are measured, not ranked on. A claim that profile time boosts reach is not supported by this code.

Source code

A fourth visibility answer: notice

New outcome

Visibility filtering used to return allow, interstitial or drop. It can now return notice: the post stays in the feed with a notice attached. The repository does not include the code that draws the notice.

If a post of yours carries a notice, it was not removed. Check Under the Hood before blaming the writing.

Source code

Experiments in the code, switched off

Off by default

A like-count holdout that hides up to 15% of posts from a given viewer, scaled by each post's likes. A test that filters posts reaching a viewer only through a retrieval lane for posts with no likes. A video carousel. All three default to off.

X says the defaults in the code are set to the primary production values, and that it aims to publish experiments running on 10% or more of traffic. Off means not the main production setting. It does not mean never.

Source code

None of this rewards a format, a hook or a posting time. For an account outside the top 0.005%, reach beyond your followers still comes from Phoenix retrieval and SimClusters, which match posts to people by what they engage with.

Why engagement-count arithmetic fails

Imagine one post has 8 replies and 40 likes, while another has 2 replies and 400 likes. Which should you write next? Those totals alone cannot answer that question.

The first might have reached a small group of potential customers; the second might have reached people who will never use your product. Before choosing a format, inspect the conversation and the outcome you wanted.

For a founder, a useful reply can matter commercially without being worth a fixed number of likes in the algorithm.

Ranking signals: what the algorithm measures

Candidate retrieval

Published

The system gathers posts from followed accounts, retrieval models and, since October 2026, a shared list of popular recent posts from the most-followed accounts.

Viewer-specific predictions

Published

Phoenix uses recent engagement history to predict a viewer’s response.

Weighted predictions

Published

Weights combine predicted actions or values. They do not multiply public engagement counts.

Visibility filtering

Published

Eligibility to appear is distinct from ordering. Each post gets one of four answers: allow, notice, interstitial or drop. Blocks, mutes and system labels can affect visibility.

Practical interpretation

Limit

A screenshot of likes and replies is insufficient to reconstruct a ranking decision. Compare posts to learn, not to reverse-engineer a guaranteed score.

Check for a documented visibility restriction

X’s September 18, 2026 update says its Under the Hood reports include whether an account or post had visibility limited to comply with law. X gives country-specific withholding after a legal demand as an example. If that information is available for your account, check it before treating low reach as a writing or ranking problem.

This is a narrow transparency check, not a complete explanation of distribution. The update covers legal-compliance limits; it does not say that Under the Hood identifies every reason a post may reach fewer people. No reported restriction also does not prove that ranking, audience interest, or other filters caused a particular result.

Source: X’s September 18 algorithm repository update.

A useful way to read the pipeline

  1. Find candidate posts.
  2. Estimate this viewer’s likely response.
  3. Apply scoring, filtering and feed assembly.

This is a simplified reading aid, not the full execution order. The published pipeline documents the components and their limits.

What this means for how you post

Choose a reader and a useful outcome

Name the person you want to help and what they should understand or do next. A launch post and a technical explanation can serve different jobs even when they discuss the same product.

Replace vague claims with observable detail

Instead of “we made onboarding better,” explain which step changed and why it caused friction. Add a measured result only when you have one; an honest decision is useful without a growth number.

Make sources easy to reach

If the post depends on a document, demo or study, give readers a usable route to it. Test link placement against visits or relevant responses, rather than assuming a placement trick fixes distribution.

Review comparable posts

Keep a small record of topic, format, audience and outcome. Compare several similar posts over time. A single unusually strong result is a reason to investigate, not proof that you found a universal rule.

Frequently asked

Is the X algorithm open source?+

X publishes recommendation code at xai-org/x-algorithm. The older twitter/the-algorithm repository is a historical reference; neither should be treated as a complete snapshot of every live setting.

Are replies worth 150 times more than likes?+

That is not a valid exchange rate. Action weights apply to predictions for a viewer, not raw engagement totals. Reply and like counts alone cannot tell you which post will rank higher.

Does Premium guarantee more reach?+

A subscription does not establish how a particular post will perform. This guide does not infer a universal reach multiplier from historical code or plan names.

Does the first hour decide everything?+

The sources reviewed here do not establish a universal first-hour cutoff. Respond when you can contribute something useful; do not treat a posting schedule as a ranking guarantee.

Should I always put links in replies?+

This review does not establish a universal link penalty or a workaround that guarantees full distribution. Put the source where readers can use it, then compare relevant outcomes for your own account.

What changed in the X algorithm in October 2026?+

The published code added a shared list of popular recent posts from the most-followed accounts, raised the like weight from 0.5 to 0.66, added two predictions weighted at zero, and added a notice outcome to visibility filtering. Several experiments are in the code but switched off by default.

Does time spent on my profile help my posts rank?+

Not in the published code. Since October 2026 Phoenix predicts how long a viewer will spend on an author's profile, but that prediction's weight in the scorer is 0.0.

Primary sources

Turn a specific observation into a post

Bangers Only generates four drafts from an idea. Compare the approaches, check the facts, and edit the version that best serves your reader.

Generate your next post

Read next