The X Algorithm Exposed: What Really Drives Engagement (With Code Proof)
X recently made their algorithm public on GitHub, and as Haxz, we've analyzed every line of code to bring you the real story - no BS, just facts backed by actual code from the official repository.
The Truth About What Makes or Breaks Your Tweets
We spent weeks diving through X's open-sourced algorithm to understand exactly what boosts your content and what kills it. Here's what we found, with receipts straight from the code.
1. The Engagement Predictions That Actually Matter
The algorithm predicts multiple outcomes for every tweet, then combines them into a final score. Here's exactly what it's looking for:
The Big Winners (Positive Signals)
// From PredictedScoreFeature.scala
object PredictedFavoriteScoreFeature // Likes
object PredictedReplyScoreFeature // Replies
object PredictedRetweetScoreFeature // Retweets
object PredictedVideoQualityViewScoreFeature // Video views >50%
object PredictedGoodClickConvoScoreFeature // Quality clicksWhat this means: Every tweet gets scored on the probability of getting likes, replies, retweets, and meaningful engagement. These scores are then weighted and combined.
The Silent Killers (Negative Signals)
// From PredictedScoreFeature.scala
object PredictedNegativeFeedbackV2ScoreFeature
object PredictedReportScoreFeatureIf the algorithm predicts people will click "See fewer" or report your tweet, you're dead in the water.
2. The Video Advantage Is Real
Videos longer than 10 seconds get special treatment:
Action item: Post videos over 10 seconds to unlock the Video Quality View (VQV) scoring boost. The algorithm specifically tracks if viewers watch at least 50% of your video.
3. The "See Fewer" Death Penalty
This is the nuclear option that destroys your reach:
What happens when someone clicks "See fewer":
You get an immediate 80% reach penalty to that user
It takes 140 days to fully recover
The penalty affects everyone who liked, retweeted, or follows you
How to avoid it: Never post divisive, annoying, or low-quality content. One "See fewer" can haunt you for months.
4. Stop Spamming - The Algorithm Punishes Repetition
The math: Your 4th tweet in a row gets only 34% of the reach of your first. Space out your posts!
5. Out-of-Network Penalty
Translation: Tweets to people who don't follow you get a 25% reach penalty. Build your follower base first!
6. Replies
Fact: Replies get HALF the reach of original tweets. Make your replies count or post original content instead.
7. The "GM" Tweet Problem (Why It Actually Hurts)
We found the duplicate content detection system:
Why "gm" tweets fail:
Everyone replying "gm" triggers spam detection
Repetitive content gets flagged as
DuplicateContentLow-quality interactions hurt your engagement score
The algorithm learns to suppress your "template" content
8. Giveaways = Engagement Spam (Don't Do It)
The algorithm has specific detection for engagement farming:
What triggers engagement spam detection:
"RT + Follow to win" patterns
Artificial engagement spikes
Mass follow/unfollow behavior
Repetitive giveaway posts
The penalty: Once flagged as EngagementSpammer, you're penalized across:
Home timeline
Recommendations
Search results
Notifications
Everything
9. Media Tagging Doesn't Directly Boost (But...)
The truth about tagging:
No direct ranking boost found in code
BUT tagged users get notified -> early engagement
Early engagement triggers positive feedback loop
Works best with active communities (like NFT projects)
10. The 24-Hour Window
Critical: Tweets older than 24-48 hours get dramatically reduced distribution. The first hour is EVERYTHING.
What To Do (Backed by Code)
Add videos over 10 seconds - Unlocks VQV scoring
Space out your tweets - Avoid the author diversity penalty
Build genuine followers - Reduces out-of-network penalty
Post when audience is active - Maximize the crucial first hour
Create conversation starters - Replies boost your engagement score
Use images and media - Tracked and slightly favored
Stay consistent with topics - Builds stronger SimCluster embeddings
What NOT To Do (Will Kill Your Reach)
Never trigger "See fewer" - 140-day penalty
Don't spam multiple tweets - Each one gets 50% less reach
Avoid "gm" chains - Triggers duplicate content detection
No giveaways - Flags you as engagement spammer
Don't post mainly replies - 50% reach penalty
Avoid repetitive content - Duplicate detection kills reach
Don't rely on viral-only - Build followers or face 25% penalty
The Bottom Line
The X algorithm is sophisticated but predictable. It rewards genuine engagement, punishes spam-like behavior, and has long memory for negative signals. Focus on quality over quantity, build real relationships, and respect the timing windows.
Most importantly: The algorithm changes, but these core principles remain. Create content people actually want to see, and the algorithm will work for you, not against you.
This analysis is based on X's open-source algorithm available at github.com/twitter/the-algorithm. All code snippets are directly from the repository. Follow Haxz for more no-BS technical breakdowns.
Last updated