How it works
Claude Code already counts every token it uses. TokenRPG turns those counts into a
hero's climb up the Stack. You connect once, and after that it runs by itself.
When your hero updates
Step 3 of Connect Claude Code adds hooks, so Claude Code
itself runs our small script at three moments:
- when a session starts;
- every ~2 minutes while you work, also during one long reply (after Claude's replies and
its tool calls, at most once every 2 minutes);
- when a session ends.
Your computer sends the numbers. The site never reaches into your computer, and nothing runs in the
background in between: when Claude Code is closed, nothing happens at all. So a session you've just
finished shows up straight away, and work in progress within about 2 minutes.
A computer that was switched off catches up next time, because every upload sends the last 28 days again.
Settings → Your machines shows how each
computer updates. If it says start/end only or between replies,
it was set up with an older step 3: run step 3 again to get the 2-minute updates during long work too.
Live
Each upload, about every 2 minutes while you work, also tells the site when your tokens arrived:
how much each day's count rose since the last upload. That's how the live map shows who is coding right now.
It glows with the last 10 minutes.
The site keeps those upload times for 7 days, then forgets them. They hold times and
token counts, nothing else. Who sees you on the map is Live activity in
Settings → Privacy; out of the box, your friends.
The map has two views. Friends is you and your friends. Global, which anyone can see without
logging in, shows only how many players each country has, once 3 or more count there;
a country with fewer stays dark. Only players whose profile is open to everyone are counted: you count from
7 days after you join, once you've uploaded and set a country, while Who can open
your profile is Everyone and Count me on the world map is on (it is unless you turn it off), both in
Settings → Privacy.
What leaves your computer
It sends: token counts per day (by type, by model and by hour) and message counts; your Claude plan (such as Max 5x) and
when it began; the computer's name, and the Claude account folder's name if it isn't the usual one; whether it is
a Mac, Linux, Windows or Windows (WSL); the script's version and which of our hooks are installed. Only you (in Settings → Your machines) and the site's admins see the
computer's name and kind.
Never your prompts, code, file contents, the names of the folders you work in, or your Claude login. Days are counted in your computer's local time.
The whole list, what we store and for how long, and who can see it: Your data.
The script's source is public at github.com/Jabulani27/tokenrpg-collector,
and the file this site serves at /collector.py is byte-identical to its collector/tally_tokens.py.
How tokens become XP
Every token is 1 XP, cache reads included. Those are about 98% of what Claude Code uses. Level 2 takes
10M XP, and each level after that takes 18% more than the last.
The Stack has 12 zones, and a boss guards each crossing:
- The Undercachelevel 1+ · boss: The Null Warden
- The Heap Warrenslevel 6+ · boss: The Leak Mother
- The Threadbridgeslevel 11+ · boss: The Twin of the Race
- The Registry Wasteslevel 18+ · boss: The Dependency Wyrm
- The Weavelevel 26+ · boss: The Regex Hydra
- The Compiler's Spirelevel 36+ · boss: The Optimiser
- The Cloudlevel 46+ · boss: The Architect
- The Edgelevel 56+ · boss: The Overfitter
- The Latent Sealevel 66+ · boss: The Leviathan of Noise
- The Gradient Peakslevel 76+ · boss: The Vanishing Gradient
- The Context Abysslevel 86+ · boss: The Forgetting
- The Singularitylevel 96+ · endgame
Tokens are not effort. The game counts spend, not merit.
Your daily story
- Fights: each active day, your hero meets one bug for every 25M tokens (at least one;
the first 5 are told). Each fight has a 15% chance of loot.
- Same day, same story: the dice are seeded by you and the date, so uploading a day again tells it the same way.
- Rested XP: each full day off banks 50% of your recent daily average, up to
1.5 days' worth. Your next active days earn it on top, up to double XP.
- Crossroads: about 50% of active days bring a fork in the road. Choose by the end of the
next day, or the hero chooses alone. One road gives 10% more XP for that day; the other, an item.
Classes
Your hero's class comes from the models you used in the last 30 days. The family with more
than 50% of those tokens decides it:
Fable makes a Seer, Opus makes an Archmage, Sonnet makes a Ranger, Haiku makes a Rogue.
If no family has more than 50%, you're a Wanderer. With at least
30% of your tokens between 10pm and 4am, you're also of the Night:
Seer of the Night.
Your class shows on your profile and on the map to the people your
Models & token mix row reaches; "of the Night" needs your Hours of day row too. It changes
as your habits do, and it's never a reward for spending more.
Friends and leaderboards
- You choose who sees what in Settings → Privacy: who
can open your profile at all, token numbers, models, hours, plan badge, how many machines you've
connected, whether you're on leaderboards
and who sees you on the live map.
Each can be for only you, friends, anyone with an account, or everyone.
- Out of the box, anyone can see your level, totals and activity grid, and friends also see your
models, hours and token mix.
- Challenge friends to a week, one against one or side against side: see Challenges.
- Leaderboards rank tokens, not XP: global, friends, or any continent or country you pick, over
7 days, 30 days, 3 months, 1 year or all time.
Challenges
A challenge is 7 days, one side of players against another: one against one, or up to 5
a side, both sides the same size. On Friends you pick both sides
from your friends, and how it's scored. Everyone you pick is asked and can say yes or no; it starts the day the last
of them answers. An invitation left unanswered for 7 days counts as a no. If one side ends up with
more yeses than the other, the last to say yes on the bigger side sits out, so the sides stay equal. The Challenge
button beside a friend throws a one against one on Most tokens. You can be in 3 challenges waiting or
under way at once.
- A · Most tokens: Each side's tokens over the seven days. The bigger total wins.
- B · Beat your normal: Each player's seven days against their usual: tokens ÷ (7 × their average day played over the 30 days before) − 1. A side's score is its players' average. Needs 7 days played in those 30.
Beat your normal rewards a good week, not a big one. Someone whose normal day is 10.0M and who
spends 140.0M in the week scores +100%, whatever anyone else spends. Only players
with 7 days played in the 30 days before can be picked for it; the form says who can't,
and why. It is checked again on the day it starts, and anyone who no longer has the days sits out.
It finishes the day after its last day, and the result settles the day after that, when the result emails go
out (uploads can arrive late). Equal scores are a draw. Once settled, the result never changes, whatever is uploaded
later.
Spoils of war: everyone on the winning side gets 5% of their own tokens over the
7 days as extra XP, on the day the result settles. A draw gives nothing, and nobody ever loses XP.
If a player deletes their account: while it waits for answers, their going counts as a no. While it is
under way, on Most tokens what they put in so far stays with their side, and on Beat your normal they drop out of
their side's average; if everyone on one side leaves before its last day is over, it is called off, and the players
left in it are told in the bell. Once its last day is over, a deletion never calls it off: what they put in counts
for their side and it settles on its day like any other. If nobody on a side is left, the others see it as played
against "a player who left", with no score for that side.
Its players always see a challenge and its scores. Anyone else sees it only where every
player's profile opens to them, and the scores, the result and the spoils only where every player's Token
numbers reach them and nobody has left it. One thing goes further: a winner's own quest log says "Spoils of war" with their XP to anyone
that winner's Token numbers reach, and so tells them their side won. A level reached on a day off, which only spoils
can bring, can tell anyone who sees the quest log the same.
Duels
Each level your hero gains, they challenge one friend to a duel, picked at random from friends who
played in the 14 days before. A hero of your level is an even match; each level you stand
above them adds 5 points to your chance and each level below takes 5 off,
never below 20% or above 80%, so luck always has a say. No friend played, no duel.
Duels are for glory only: no XP, and your story doesn't change. Each one is fought once and kept, so it stays
the same whatever you or they upload later. It shows in the feed and in the wins and losses on both heroes'
profiles, for people who can open both profiles. Duels began on 22 October 2026.
Achievements and records
Achievements are for things you choose to do: rhythm, variety, rest, the roads you take and playing with
friends. None is a token total. They unlock by themselves from your history; the duel and challenge ones count only
the duels and results the person looking can see.
- Marathon I: Play 7 days in a row.
- Marathon II: Play 30 days in a row.
- Marathon III: Play 100 days in a row.
- Marathon IV: Play 365 days in a row.
- Centurion: Play on 100 days in all.
- Steady Hand: Play 5 or more days a week (Monday to Sunday), 4 weeks running.
- Comeback: Come back after 14 days or more away.
- Sabbath: Play during a week and keep its Saturday and Sunday free.
- Well Rested: Rest until your rested pool is full, then spend all of it.
- Night Owl: 40% or more of your tokens between 10pm and 4am, over 30 days. Shown to whoever your Hours of day row reaches.
- Early Bird: 30% or more of your tokens between 4am and 8am, over 30 days. Shown to whoever your Hours of day row reaches.
- Night and Day: Hold both Night Owl and Early Bird. Shown to whoever your Hours of day row reaches.
- Polyglot: Use 3 model families in one day (Fable, Opus, Sonnet, Haiku). Shown to whoever your Models & token mix row reaches.
- All-rounder: Use every model family in one week, Monday to Sunday (Fable, Opus, Sonnet, Haiku). Shown to whoever your Models & token mix row reaches.
- At the Crossroads: Choose the road yourself at 10 crossroads.
- Brave: Choose the road of valour yourself at 10 crossroads.
- Duellist I: Win 1 duel.
- Duellist II: Win 10 duels.
- Duellist III: Win 100 duels.
- Rival: Duel the same hero 5 times.
- Challenger: Win 3 challenges.
- Team Battle: Play a challenge with 2 or more a side.
- Team Victory: Win a challenge with 2 or more a side.
Records on your profile: best day, best week (Monday to Sunday), best month and longest streak. Token
records follow your Token numbers row. A new best week shows in the feed from your 4th week on, a
best month from your 3rd, and a longest streak once it beats one of 7 days or more.
Titles
Titles are hard to earn, and none is a token total: each one is for rhythm, rest, when you play, variety or play
with friends. Once earned, a title stays while the history that earned it does: the Champion and the Duelmaster
count only challenges and duels you can still see. Wear one in
Settings → Profile → Titles, which also shows how far you've got with
the rest. The one you wear shows after your name on most pages ("ada the Unbroken"), to people the title's
privacy row reaches; hover it (or tap, where it's a button) to see how it was earned.
- the Unbroken: earned by playing 100 days in a row. Shown to anyone who can open your profile.
- the Undying: earned by playing 365 days in a row. Shown to anyone who can open your profile.
- the Steadfast: earned by playing on 15 or more days in each of 12 calendar months running. Shown to anyone who can open your profile.
- the Balanced: earned by 12 weeks running (Monday to Sunday), each with 5 or more days played and Saturday and Sunday off. Shown to anyone who can open your profile.
- the Patient: earned by being Well Rested 10 times: your rested pool filled up on days off, then spent. Shown to anyone who can open your profile.
- the Owl: earned by 40% or more of your tokens between 10pm and 4am, in each of 6 calendar months running. Shown to whoever your Hours of day row reaches.
- the Lark: earned by 30% or more of your tokens between 4am and 8am, in each of 6 calendar months running. Shown to whoever your Hours of day row reaches.
- the Polyglot: earned by using all four model families (Fable, Opus, Sonnet, Haiku) on 30 different days. Shown to whoever your Models & token mix row reaches.
- the Champion: earned by winning 10 challenges. Shown to anyone who can open your profile. Only the challenges they can see count: the ones they were in, or whose players' Token numbers both reach them.
- the Duelmaster: earned by winning 100 duels. Shown to anyone who can open your profile. Only the duels they can see count: both heroes' profiles open to them.
- the Legend: earned by holding 6 of the other 10 titles. Shown to anyone who can open your profile. Only where six titles you hold reach them, so the weakest row among those six decides.
Days are your computer's days. A week runs Monday to Sunday and counts once it's over. A month
is a calendar month; for the Owl and the Lark it counts once it's over, and only when at least 50% of
the days you played in it have hours of day. A challenge counts once its result settles, and a draw is no win.
Monthly recap
On the 1st of each month your hero's last month gets a recap: levels gained, bosses beaten, your
model mix and class for that month, busiest hour, longest run of days, achievements, duels and records broken. It
shows in the feed on the 1st and on your profile until the 7th, and stays at its
own page after that. Each figure follows your privacy rows, so people see only what they could see on your
profile. Save image makes a picture of the card in your browser, with just what the viewer can see. The
first recap, for October 2026, arrives on 1 November 2026.
What can't be counted
Only Claude Code is counted. The claude.ai website, chats in the desktop app and Claude Design keep no
token log on your computer, so there's nothing to read. Codex isn't supported yet.
Claude Code deletes its own logs after 30 days, so your first upload goes back that far at most. After
that, this site keeps every day.
Friends and leaderboards