Real code, a bug report written the way users write them, and hidden tests that decide whether your fix is actually a fix. Fifty XP each, and a much better feel for other people's code.
Bug report
#42 · Sessions
Medium
Users are being signed out about a second after signing in.
Reproduces on every browser. The token looks valid in the response. Started after the session module was refactored to store expiry as a Unix timestamp.
Files
1
Hidden tests
6
Reward
+50 XP
What is a bug hunt?
A bug hunt is a debugging exercise on real code: a small project as it shipped — a frontend feature, a backend service or a database layer, in JavaScript, Python or Java — and a bug report that says what is wrong, not where. You find the fault, fix it in the editor, and hidden tests decide whether the fix is complete. There are more than 300 hunts by category, language and difficulty. A complete fix pays 50 XP and keeps your streak alive. Any hunt can be read without an account. From 1 January 2027 the Free plan allows one hunt a day; until then every limit is lifted.
codekairo/bug-hunts/sessions-expire-early
Bug report
Medium
Users get signed out about a second after signing in.
Every browser. The token in the response looks valid. Started after expiry moved to a Unix timestamp.
Category
Auth
Tests
6 hidden
Reward
+50 XP
reading…
auth/session.ts
exportfunctionisExpired(session: Session) {
return session.exp < Date.now();
}
exportfunctionrefresh(session: Session) {
if (isExpired(session)) returnnull;
return { ...session, exp: nowInSeconds() + TTL };
}
Submit fix
FIG. 01A hunt, start to finish: read the report, spot the line, type the fix, watch six hidden tests go green, collect the 50 XP.
01How a hunt works
Read first. Then type.
The report tells you what broke, not where. That's deliberate — most of real debugging is narrowing down, and the only way to get faster at it is to do it. The code is exactly as shipped, warts included.
When you think you've found it, fix it and submit. The hidden tests are the referee: they know what correct looks like, and they'll tell you how many agree with your version.
Who it is for
Students who have only ever written code into a blank file, and developers who want to get faster at the part of the job that is mostly reading: a stranger's code, a vague report, and tests that will not pretend a half-fix is a fix.
01
Open the report
A short description of the misbehaviour — what a user saw, what they expected — with the logs that were captured. No line numbers, no hints about where.
02
Read the code as it is
The whole project, exactly as shipped, with a map of which function calls which. Locked files are context and never hold the bug; the editable one is where the fix goes. Bug hunts are about reading before typing.
03
Fix it and run the hidden tests
Submit your version. The tests know what correct looks like; you find out how many agree with you, and a partial fix shows exactly how partial it is.
04
Collect the XP
The first complete fix of a hunt is worth 50 XP, shows on your heatmap, keeps the day's streak alive and counts toward your bug-fix total on the profile.
02Why it's a separate mode
Different muscle
Writing from a blank file and reading a stranger's file are different skills. Interviews test both; most practice only trains the first.
Categorised on purpose
Off-by-one, state, async, types, boundaries. Filter by category and spend an evening on the one you keep getting wrong.
Counts like everything else
Fixes pay XP, light up the heatmap and keep your streak alive. Bugs fixed is its own number on your profile.
Fix real, broken code from a bug report instead of a function signature. Hidden tests decide whether your fix is complete; every fixed hunt pays 50 XP.
What is a bug hunt?
A bug hunt is a debugging exercise on real code: a small project as it shipped — a frontend feature, a backend service or a database layer, in JavaScript, Python or Java — and a bug report that says what is wrong, not where. You find the fault, fix it in the editor, and hidden tests decide whether the fix is complete. There are more than 300 hunts by category, language and difficulty. A complete fix pays 50 XP and keeps your streak alive. Any hunt can be read without an account. From 1 January 2027 the Free plan allows one hunt a day; until then every limit is lifted.
How it works
Open the report. A short description of the misbehaviour — what a user saw, what they expected — with the logs that were captured. No line numbers, no hints about where.
Read the code as it is. The whole project, exactly as shipped, with a map of which function calls which. Locked files are context and never hold the bug; the editable one is where the fix goes. Bug hunts are about reading before typing.
Fix it and run the hidden tests. Submit your version. The tests know what correct looks like; you find out how many agree with you, and a partial fix shows exactly how partial it is.
Collect the XP. The first complete fix of a hunt is worth 50 XP, shows on your heatmap, keeps the day's streak alive and counts toward your bug-fix total on the profile.
Who it is for
Students who have only ever written code into a blank file, and developers who want to get faster at the part of the job that is mostly reading: a stranger's code, a vague report, and tests that will not pretend a half-fix is a fix.
Frequently asked questions
How is a bug hunt different from a challenge?
A challenge gives you a signature and asks for an implementation. A hunt gives you an implementation that already exists and asks what's wrong with it. The skill it trains is reading and reasoning about someone else's code.
Are the tests visible?
No. You see the bug report and the code. Hidden tests decide whether your fix is complete — partial fixes show as a partial pass count.
Can I filter hunts?
By difficulty and by category, so you can deliberately practise the kind of bug you're worst at.
Do hunts affect my rating?
Yes. The first complete fix of a hunt pays 50 XP and adds 50 to your rating, and it keeps your streak alive for the day. Fixing it again is practice and pays nothing more.