X

I read X's actual source code, and the engagement formula everyone quotes has been wrong since 2023

Most of the formula in circulation comes from a 2023 system that no longer runs, and its biggest number came from nowhere at all. Here is what the live code says, what it honestly cannot tell you, and the one line in X's own README that corrects the most-shared claim about it.

On 19 August 2026 I opened home-mixer/params/param.rs in xai-org/x-algorithm and read the ranking weights line by line, the way you read a contract before you sign it. The engagement formula that circulates in dozens of X growth guides is not in that file. It is not a slightly stale version of what is in that file. It belongs to a different system, written in a different language, retired years ago, and it was wrong about its biggest number even when that system was still running.

Here is what the current defaults actually say. A like is 0.5. A retweet is 1.0. A reply is 5.0. A share by copy link is 20.0, which is forty times a like and the largest positive weight in the file. A profile click is 0.0. Not small, not deprioritised, exactly zero. If you have spent two years writing hooks whose only job is to push readers to your profile, the ranking function has been paying you nothing for that trip, and the file has said so in public since the day I read it.

The version people quote runs likes times one, retweets times twenty, replies times 13.5, profile clicks times twelve, link clicks times eleven, bookmarks times ten. Six terms, all six wrong, and there is no bookmark weight in the file at all. What follows is where that formula came from, what the published numbers really say, the one correction in X's own README that keeps this honest, and the part of the machine that is still not public, because leaving that part out is how a teardown becomes another piece of confident misinformation with better sourcing.

What does X's live ranking code actually weigh?

home-mixer is the service that assembles the For You timeline. param.rs is where its tunable parameters sit, and the block that matters runs from roughly line 308 to line 468. Each weight is a multiplier on one predicted engagement, and a post's score is the sum of those multiplied predictions. That is the entire design. It is arithmetic, not sorcery, which is what makes the folklore around it so odd: the real thing has been sitting in a public repository since January, one that has collected 32,004 stars and 5,250 forks, and almost nobody quoting the algorithm has read the file.

The live defaults

Positive weights in home-mixer/params/param.rs as of 19 August 2026: favourite 0.5, retweet 1.0, reply 5.0, quote 5.0, share 2.0, share via DM 5.0, share via copy link 20.0, follow author 4.0, click 0.4, open link 0.2, profile click 0.0, photo expand 0.05, video open 0.05, dwell 0.0, continuous dwell time 0.004, post unexplored 0.02.

xai-org/x-algorithm, home-mixer/params/param.rs lines 308 to 468, read 19 August 2026

Read as a ranked list, those numbers state a set of priorities you can say out loud in one sentence. X pays most for actions that move a post off the timeline and into a private conversation, next for actions that produce written words, then for a new follow, and close to nothing for anything passive. A photo expand is 0.05, a tenth of a like. Raw dwell is 0.0. Continuous dwell time is 0.004. If you have been told the algorithm rewards people reading slowly, the file rewards that at 0.004, against 0.5 for a like.

  • Share by copy link20.0
  • Reply5.0
  • Follow author4.0
  • Retweet1.0
  • Like0.5
  • Profile click0.0
X's published positive weights, August 2026 defaults, on a single scale xai-org/x-algorithm, home-mixer/params/param.rs, read 19 August 2026

In X's published August 2026 defaults, a copy-link share carries a weight of 20.0 against a like at 0.5, which makes one private share worth forty likes to the ranker.

The negative side is where the numbers get loud. A report is -234.0. Muting the author is -58.8. A not-interested tap is -43.2. Blocking the author is -31.2. And scrolling past without dwelling is -0.02, a small tax on being boring that gets charged every single time a thumb keeps moving. Those five numbers explain more about why accounts stall than any advice about posting times ever will, though not in the way they usually get quoted, which I will come back to.

Where did retweets times twenty and replies times 13.5 come from?

The 13.5 is real in the sense that it once existed. It comes from the heavy ranker in the 2023 open-source release, published when the company was still called Twitter, in a Scala codebase that has since been retired and replaced by this Rust service. Quoting it in 2026 is like reading out a 2023 menu at a 2026 counter and getting annoyed that the price has moved. The system changed. The advice did not.

The twenty is stranger, because it does not seem to have come from anywhere. Even in the 2023 release the retweet weight was 1.0, the same order of magnitude it sits at now. Somebody put a twenty next to retweets, somebody else repeated it with confidence, dozens of guides copied the guide that copied it, and repetition did the rest. That is the real mechanism by which most platform advice becomes true-sounding: not research, not testing, just a chain of people who each assumed the person upstream had checked.

The formula in circulation

The most-repeated 2026 formula reads likes x1, retweets x20, replies x13.5, profile clicks x12, link clicks x11, bookmarks x10. Against the live defaults every term is wrong, and no bookmark weight exists anywhere in the file.

Verified against xai-org/x-algorithm, home-mixer/params/param.rs, 19 August 2026
Quoted in guidesLive defaultVerdict
Likex10.5wrong
Retweetx201.0wrong
Replyx13.55.0wrong
Profile clickx120.0wrong
Link clickx110.2wrong
Bookmarkx10no such parameterinvented
The circulated formula against the file, term by term Circulated 2026 formula compared with xai-org/x-algorithm, home-mixer/params/param.rs, read 19 August 2026

The practical damage is not that the numbers are off by a bit. It is that the ordering is off. The quoted formula puts retweets at the top, so a whole generation of accounts learned to write for retweets: broad, confident, quotable, the kind of line that spreads precisely because it costs nothing to agree with. The live file puts the copy-link share at the top and the retweet seventh, below quote, DM share, follow and plain share. Those two orderings produce completely different writing, and one of them has been training people to sound like everyone else in their industry for three years.

The retweets-times-twenty figure appears in neither of X's public code releases, and the replies-times-13.5 figure comes from the retired 2023 Scala heavy ranker rather than the system running today.

Why is a profile click worth exactly zero?

ProfileClickWeight is 0.0 in the current defaults. Mathematically that does not mean profile clicks matter a little. It means the term leaves the sum. However many people tap your name, that action contributes nothing to how the ranker scores the post that made them tap.

A coefficient of zero is not a low priority. It is the term vanishing from the equation.

This lands hardest on personal branding, because the hook-then-profile move is the oldest one in the book. Write a line good enough that people want to know who said it, they visit the profile, they read the pinned post, they follow. Half of that journey is now invisible to the ranking function. What the file does reward is the end of it: FollowAuthorWeight is 4.0, eight times a like. So the ranker does not pay for curiosity. It pays for conversion, and it pays well for it.

The right response is not to stop caring about your profile. Your bio and your pinned post are still doing the persuasion, and a follow is worth eight likes to the machine, which makes the profile more valuable than ever as a conversion surface and worth nothing at all as an engagement metric. What should change is your reporting. If profile visits sit on your dashboard as a growth number, move them somewhere else. They are a diagnostic, not a result.

My take

If X ever moves ProfileClickWeight off zero, I think it will be the biggest change to personal branding on the platform since the checkmark went paid, and I do not expect it to be announced. It will show up as a one-line diff in param.rs and the guides will notice about three months later.

My read on why it sits at zero: a profile click is the cheapest signal on the platform to manufacture, a curiosity gap buys as many as you like, and X has spent 2026 trying to pay for depth instead of traffic. Zero is not an oversight. It is a position, and it is aimed squarely at hook merchants.

So does one report really cancel 468 likes?

This is the most viral number to come out of the code release, and the arithmetic behind it is genuinely correct. A report is -234.0, a like is 0.5, and 234 divided by 0.5 is 468. Everything after the division is wrong.

The correction X wrote itself

The repository README states that the weights scale the predicted probabilities, or predicted continuous values such as dwell time, and that they do not scale the raw engagement counts.

xai-org/x-algorithm, root README, read 19 August 2026

The weights multiply predicted probabilities, not counts. The model is not tallying how many people reported your post. It is estimating the chance that you, the specific person about to be shown this post, will report it, and then multiplying that estimate by -234. A post the model thinks you have a two percent chance of reporting is carrying roughly -4.7 before a single positive term is added. Nobody reported it. Nobody has even seen it yet.

Two things follow from that, and they cut in opposite directions. You cannot bury a rival by organising a reporting brigade in the way the folklore assumes, because the ranker is not counting the brigade. And you cannot write something that merely looks reportable to a nervous model and expect to be judged on what actually happened, because the system is pricing a prediction about your flinch rather than the flinch itself.

X's ranking weights multiply predicted engagement probabilities rather than raw engagement counts, so the report weight of -234.0 prices the model's estimate that a particular viewer will report a post, not the number of reports the post received.

What is the most valuable thing a reader can do with your post?

Copy the link and send it to one person. That is 20.0, the top of the file. A share into direct messages is 5.0. A quote is 5.0. A reply is 5.0. Everything X pays a premium for involves the post leaving the timeline and entering a conversation where the sender puts their own judgement on the line by passing it along.

That should change what you write. A post built for retweets is written to be agreed with: broad, safe, cheap to endorse. A post built to be copied and sent is written to be useful to one named person the sender already has in mind, which usually means it is specific, slightly inconvenient to say in public, and makes the sender look well-informed for having found it. Those are nearly opposite instincts. One of them is worth twenty times a like and the other is worth one.

  • Top-priority actionRetweetShare by copy link
  • What the post is written forA crowd agreeing with itOne person forwarding it to one other person
  • Profile clicksCounted as growthA weight of exactly zero
  • Audience shape that paysThe largest possible reachA dense mutual graph that replies
What changes when you write against the file instead of the folklore Illustrative reading of the xai-org/x-algorithm param.rs defaults, read 19 August 2026

Then there is the parameter almost nobody has written about. BidirectionalFollowReplyWeightBoost defaults to 15.0, and the function that gates it grants the boost only when three conditions hold at the same time: the candidate post is not a reply, it is not a retweet, and the author is a mutual follow of the viewer. When all three are true, the predicted-reply weight goes from 5.0 to 20.0.

The boost

BidirectionalFollowReplyWeightBoost defaults to 15.0. The eligibility function in home-mixer/scorers/ranking_scorer.rs grants it only when the candidate is not a reply, is not a retweet, and the author is a mutual follow of the viewer.

xai-org/x-algorithm, home-mixer/scorers/ranking_scorer.rs lines 180 to 193, read 19 August 2026

Sit with what that means. For an original post shown to someone who follows you and whom you follow back, the value X places on a predicted reply is forty times the value it places on a predicted like. Reach is not the prize here. A dense graph of a few hundred people who genuinely follow each other back and genuinely talk is worth more, post for post, than a follower count with a comma in it. Everything about that boost rewards the unfashionable strategy: reply to people properly, follow back the ones worth talking to, and post original thoughts instead of commentary on commentary.

The mutual-follow reply boost lifts predicted-reply weight from 5.0 to 20.0, but only for original posts, never replies or retweets, and only when the viewer follows the author and is followed back.

No, and it does not prove the reverse either. This is the one place where the honest answer is that the question is open, so let me lay out both sides rather than pick the satisfying one.

For the defence: the current file contains OpenLinkWeight at 0.2, sitting inside the positive sum. A click is 0.4. There is no URL demotion rule anywhere in the scoring path. An earlier and well-argued analysis from PPC Land in early 2026 concluded that the algorithm could not see link clicks at all, because no url_click prediction target existed. That finding is now out of date. Musk stated on 29 July 2026 that X has not penalised link posts for over a year, which places the end of any penalty around July 2025, though no engineering post, changelog or documentation accompanies the claim.

For the prosecution: the strongest evidence is still an A/B test from October 2024 in which the same author's post drew 3,670 views with a link and 65,400 without. That is not a rounding difference. And there is a mechanism that produces the same outcome with no coded rule at all: 0.2 against a reply weight of 5.0 means links are weakly rewarded, and a reader who leaves for another site is a reader who will not reply, quote, or copy the link back into a DM. Weak reward plus off-platform exit can look exactly like suppression from the outside.

The link evidence

OpenLinkWeight defaults to 0.2 and click to 0.4, with no URL demotion rule in the scoring path. Musk said on 29 July 2026 that X has not penalised link posts for over a year. The strongest evidence the other way remains an October 2024 A/B test showing 3,670 views with a link against 65,400 without.

xai-org/x-algorithm param.rs, read 19 August 2026; Musk statement reported by PPC Land, 29 July 2026; Jesse Colombo A/B test, October 2024

So the accurate sentence is that links are weakly rewarded, not penalised and not invisible. What nobody has published is a clean 2026 replication, and the absence of that test is why the argument keeps going in circles. Here is the test that would settle it.

  • One account, one topic, thirty or more matched pairs of posts across several weeks, alternating link in the post and link in the first reply.
  • Posting times matched inside the same hour band, with post length and format held constant so the only variable is where the link sits.
  • Impressions and engagements pulled from the account's own analytics rather than screenshots, with the raw table published, not a summary of it.
  • A second account of a very different size running the identical design, because a result at 2,000 followers and a result at 200,000 are not the same finding.

That is roughly six weeks of disciplined work and no budget at all. The reason it does not exist is that the folklore is more useful to the people repeating it than the answer would be.

If the weights are published, why can't you fully trust them?

Here's the thing, and it is the strongest objection to everything above, so it gets the honest version rather than a footnote. ranking_scorer.rs does not hard-code any of these numbers. It reads every single one through params.get(...), which pulls from a runtime feature switch file at /usr/local/config/features/home-mixer/main/rust_home_mixer.yml. That file is not in the repository. The numbers I have been quoting are defaults, meaning what the code falls back to, and production could be running different values today.

That objection is correct, and it does not rescue the old formula. Three things survive it. A runtime override changes values, not vocabulary: there is no bookmark parameter in the file, so a bookmark multiplier of ten cannot become true no matter what the config says. The 13.5 belongs to a system that has been retired, and no config file resurrects dead Scala. And the shape of the published defaults is consistent with what X has been doing in the open, most obviously a creator programme that counts only impressions from paying subscribers, which is exactly the design you would ship if you were pricing depth over volume. The defaults are the best available proxy. Anyone who tells you they are the production numbers is guessing, including anyone who tells you that inside a paid course.

The same care applies to the phrase open source, which has been doing heavy lifting in the coverage. What X published is the architecture and the default parameters. What it did not publish: the runtime config, the trained model weights, the training data, the exact visibility-filter thresholds, and the advertising ranking code that Musk committed to releasing on 10 January 2026 alongside the organic code. The organic side shipped ten days later. The advertising side, as of the file tree I inspected on 19 August 2026, is simply not there.

Verify a transparency claim with an API call, not a press release.

The maintenance record is checkable too, and this is the part worth confirming yourself in about thirty seconds. X said the repository would refresh roughly every four weeks with developer notes. The commit history says something different.

The commit log

xai-org/x-algorithm was created on 19 January 2026 and has eight commits to date: 20 January, 15 May twice, 13 August twice, 14 August, 17 August and 18 August 2026. That is gaps of nearly four months and three months against a promised four-week refresh.

GitHub API commit history for xai-org/x-algorithm, retrieved 19 August 2026
  1. 17 Oct 2025
    All heuristics to be deletedMusk says X is aiming to remove every heuristic within four to six weeks, with Grok reading every post
  2. 10 Jan 2026
    The open-source commitmentMusk commits to publishing all organic and advertising ranking code within seven days
  3. 20 Jan 2026
    Organic ranking code shipsxai-org/x-algorithm goes public under Apache-2.0, written in Rust
  4. 15 May 2026
    Two commits, then silenceNothing follows for nearly three months against a promised four-week cadence
  5. 13 to 18 Aug 2026
    Five commits in six daysActivity resumes in a burst, taking the total to eight commits in seven months
  6. 19 Aug 2026
    What the file showsHeuristics still present, advertising code still absent, runtime config still unpublished
The transparency promise set against the commit log GitHub API commit history for xai-org/x-algorithm, retrieved 19 August 2026; Musk statements of 17 October 2025 and 10 January 2026

X published the shape of its ranking machine, not its settings: every weight in ranking_scorer.rs is read at runtime from a configuration file that has never been released.

Has X actually deleted all the heuristics?

On 17 October 2025 Musk said X was aiming for deletion of all heuristics within four to six weeks, with Grok reading every post and watching every video. Ten months later the shipped code is full of heuristics, and several of them decide whether anyone sees you before your writing gets a vote.

The mechanical constants

In home-mixer/params/config.rs: MAX_POST_AGE is 48 hours, TOP_K_CANDIDATES_TO_SELECT is 50 and RESULT_SIZE is 35, with NEW_USER_OON_WEIGHT_FACTOR at 0.00001. In param.rs, OonWeightFactor is 0.75, AuthorDiversityDecay is 0.5 and AuthorDiversityFloor is 0.25.

xai-org/x-algorithm, home-mixer/params/config.rs and param.rs, read 19 August 2026
  • 48 hoursCandidate age cutoff
  • 35Slots returned per timeline request
  • 0.00001Out-of-network factor for a brand-new account
  • 0.25Author diversity floor
Four constants that decide reach before content gets a say xai-org/x-algorithm, home-mixer/params/config.rs and param.rs, read 19 August 2026

Take the 0.00001. A brand-new account has its out-of-network content multiplied by one hundred-thousandth, against 0.75 for everyone else. In plain terms, a fresh profile sees almost nothing except the accounts it follows, and it is shown to almost nobody outside its own follows. That single constant explains the first-month silence that makes most people quit, and it explains why buying followers on day one is worse than useless: you have filled the one graph the system trusts with accounts that will never reply to you.

Take the 48 hours. A post stops being a candidate two days after publication, full stop. There is no evergreen tail on X the way there is on YouTube or a search-indexed blog, and any advice about resurfacing old posts is arguing with a hard cutoff in config.rs. Take the author-diversity decay at 0.5 with a floor of 0.25: appear repeatedly in one session and your later posts are damped no matter how good they are, which is the system quietly capping how much of anyone's timeline a single person gets to own.

The prediction step really is a Grok-derived transformer, and that part of the story is true. Everything wrapped around it is rules: separate candidate sources for in-network and discovery, the out-of-network discount, the age cutoff, the mutual-follow boost, a diversity reranker, and a separate labelling path for abuse and visibility filtering. While we are correcting things, several 2026 guides claim the algorithm runs sentiment analysis and suppresses negative or combative tone. I found no sentiment or tone scorer anywhere in the scoring path. There is an abuse and visibility-filtering layer, which is a different mechanism with different consequences, and confusing the two has produced a great deal of pointlessly polite writing.

My take

My read is that the heuristics stayed because they do the jobs a transformer is bad at: cost control, cold starts, and stopping one loud account from eating an entire session. A model can predict what you will engage with. It cannot decide, on its own, that you should see fewer posts today from the person you engage with most. That is a product opinion, and product opinions live in constants.

I would expect those constants to keep shrinking in number and to keep existing in principle. Anyone waiting for a purely learned feed with no rules wrapped around it is waiting for something that does not serve the business underneath it.

What would you actually change on Monday?

None of this is a posting schedule and none of it is a hack. It is a short list of things the published file makes it hard to keep believing, and one thing it makes it hard to keep ignoring.

The new payout bar

The Original Content Rewards Program opens on 8 September 2026 and requires a paid X Premium subscription, at least 500 verified followers, and at least 500,000 Home-timeline impressions from verified users in the last 90 days, maintained continuously.

TechCrunch and Engadget, 8 August 2026, reporting the X Creators announcement of 7 August 2026

What I would actually do

  • Delete the old formula from every deck, template and course you own, and write the date you verified the replacement next to the new numbers. Figures without a read-date are exactly how this problem started.
  • Move profile visits out of your growth reporting and into diagnostics. Track follows instead, because the file pays 4.0 for a follow and 0.0 for the visit that produced it.
  • Write at least one post a week whose only test is whether one specific person would copy the link and send it to one specific other person. That is the 20.0 slot, and almost nobody is writing for it.
  • Build a mutual graph on purpose. Find fifty to three hundred people in your field worth talking to, follow them, reply properly, get followed back, because the reply boost only fires between mutuals and only on original posts.
  • Stop planning around monetisation. The Original Content Rewards Program opening on 8 September 2026 wants 500 verified followers and 500,000 Home-timeline impressions from verified users in 90 days, held continuously. For most professionals that is not income, it is a distraction wearing income's clothes.
  • Put the commit list for xai-org/x-algorithm into your monthly review and diff param.rs. A change to the reply weight, the out-of-network factor or the mutual-follow boost is a live strategy change you can act on the same week, and checking costs nothing.

The larger lesson has almost nothing to do with X. An entire advice industry spent three years quoting six numbers that anyone could have checked, because checking is slow and confidence sells. The file was public. The commit history is one API call. The README carries a correction that invalidates the most-shared claim about the code, written by the people who wrote the code.

So the question I would sit with is not what the weights are. It is how many other numbers in your strategy arrived the same way, passed hand to hand until nobody remembered who checked. Pick one you rely on, the one you quote in pitches. Find the primary source, write down the date you read it, and see whether it survives contact.

If you test only one thing from all of this, test the private share. For the next month, write posts whose success you judge by whether anyone actually sent them to somebody. That number is not on your dashboard, so you will have to ask people, which is uncomfortable and also rather the point. The file says it is worth forty likes. Nobody is competing for it.

Questions I get asked about this

What are the real X algorithm engagement weights in 2026?

The defaults published in home-mixer/params/param.rs and read on 19 August 2026 are: favourite 0.5, retweet 1.0, reply 5.0, quote 5.0, share 2.0, share via DM 5.0, share via copy link 20.0, follow author 4.0, click 0.4, open link 0.2, profile click 0.0, photo expand 0.05, video open 0.05, dwell 0.0, continuous dwell time 0.004. Negatives include report -234.0, mute author -58.8, not interested -43.2 and block author -31.2. These are defaults; the production values are read at runtime from a configuration file X has not published.

Is the formula with retweets x20 and replies x13.5 accurate?

No. The 13.5 comes from the heavy ranker in the retired 2023 Scala release, not from the system running today. The retweet weight was 1.0 in that 2023 release too, so the x20 does not appear in either public code release. There is also no bookmark parameter in the current file, so a bookmark multiplier cannot be correct at any value.

Do profile clicks help you on X?

Not in the ranking function. ProfileClickWeight is 0.0 in the August 2026 defaults, which means the term drops out of the scoring sum entirely. Following the author is weighted 4.0, eight times a like, so the profile is valuable as a place that converts visitors into followers, and worth nothing as an engagement number in its own right.

Does one report on X really cancel out 468 likes?

No. The division is correct (report -234.0 divided by favourite 0.5 gives 468) but the conclusion is not. The repository README states that weights scale predicted probabilities, not raw engagement counts. The -234.0 multiplies the model's predicted chance that the particular viewer being shown the post will report it, not a tally of reports the post actually received.

Does X still penalise posts that contain links?

The question is genuinely open. The code contains a positive OpenLinkWeight of 0.2 and no URL demotion rule, and Musk said on 29 July 2026 that X has not penalised link posts for over a year. Against that sits an October 2024 A/B test showing 3,670 views with a link versus 65,400 without. A weight of 0.2 against a reply weight of 5.0 means links are weakly rewarded, which can resemble suppression without any coded penalty. No clean 2026 replication has been published.

Sources

  1. xai-org/x-algorithm, live public repository (Apache-2.0), xAI on GitHub, Repository created 19 January 2026; inspected 19 August 2026.
  2. home-mixer/params/param.rs, the ranking weight defaults, xAI on GitHub, Read 19 August 2026.
  3. home-mixer/scorers/ranking_scorer.rs, the scoring path and the mutual-follow boost, xAI on GitHub, Read 19 August 2026.
  4. home-mixer/params/config.rs, the mechanical constants, xAI on GitHub, Read 19 August 2026.
  5. X's algorithm source code drops: what it reveals about the platform's feed mechanics, PPC Land, 20 January 2026.
  6. How X's algorithm silently kills your links without explicitly penalizing them, PPC Land, Early 2026.
  7. X drops year-old link penalty, Musk tells Zuckerberg on platform, PPC Land, 29 July 2026.
  8. Elon Musk on deleting all heuristics within four to six weeks, Elon Musk on X, 17 October 2025.
  9. X replaces misaligned revenue sharing program with Original Content Rewards, TechCrunch, 8 August 2026.
  10. X is replacing revenue sharing with a new original content rewards program, Engadget, 8 August 2026.
  11. Space Exploration Technologies Corp Form S-1 (SEC CIK 0001181412, accession 0001628280-26-036936), US Securities and Exchange Commission, 20 May 2026.

Every figure above is linked to its original source. Where I am predicting rather than reporting, I say so in the panels marked My take.

Bhavik Sarkhedi mid-skydive, high above cloud cover
Somewhere over Australia

Build the position, not the posting schedule

I work with founders and executives on being visible for the right reasons, in search results, in AI answers, and in the rooms where decisions actually get made. If you want a straight read on where your name currently stands and what is holding it back, get in touch and tell me what you are trying to be known for.

See the store