Existing codebase Hard · 75 minutes
A small working app and a few tickets: fix a bug, add a feature, make something faster.
You've just joined the team behind Crumb & Co., a small bakery's order service. It's a working Python codebase of seven modules (about 500 lines): products and customers, pricing with bulk discounts and a loyalty programme, stock reservation, order placement, and an in-memory repository that backs the shop's dashboard. Your job is to pick up four tickets: fix a bug, add a feature, make the reporting queries scale, and (as a stretch) add cancellations. Partway through, marketing changes what they asked for.
This is the "existing codebase" format: the code already works, and most of the job is understanding it well enough to change it safely. It's close to Meta's AI-enabled coding round (a multi-file project you debug and extend with an AI assistant at your side) and to the integration and bug-finding rounds at companies like Stripe, where you work inside code you didn't write.
Time box: 60-75 minutes. In a real interview the stages are often revealed one at a time. They're all listed here, but do them in order: each one builds on the last.
Change request, after stage 2: coupons for one category. Marketing wants "20% off bread" without it taking 20% off the cakes. A coupon can now name a category, and then it only discounts that category's lines. Done when your stage 2 code handles both kinds of coupon. Do it before stage 3: in a real round, this is the interviewer changing the requirements once your first version works.
The README in the download has the full rules for each stage, and the tests are the acceptance criteria:
test_existing.py passes from the start, each test_stageN.py passes when that
stage is done, and test_change_request.py when the change request is. Run them with
python3 -m unittest discover -s tests. There are hidden tests too, for the cases the
visible ones miss, like the tests an interviewer runs after you say you're done.
Same format as Meta's AI-enabled coding round, Google's code comprehension round (pilot) and Ramp's AI-assisted coding round.
75 minutes, with the AI assistant on, and every stage open from the start. Good for learning the problem. Pick a company to practice with the time limit and AI rules of its real round.
Like a real round: each stage's instructions and tests show up only when the stage before it passes, so you can't read ahead, and neither can the assistant. 75 minutes. Your work here is kept separate from Standard.
Meta says you're expected to use the built-in assistant. Outside AI tools aren't allowed. Some candidates say the assistant could read the files but not edit them, so ours starts in Ask mode. The stages unlock one at a time, as in Interview mode. Our guide to AI-assisted interviews
Google confirmed Gemini is the assistant in the pilot. The stages unlock one at a time, as in Interview mode. Our guide to AI-assisted interviews
Candidates say you're expected to use the assistant. Ramp hasn't described the round publicly. The stages unlock one at a time, as in Interview mode. Our Ramp guide
Run All tests to see which stages pass. The details for each stage are in README.md and the docstrings.
Reading code you didn't write, changing it without breaking it, and checking what your AI assistant gives you.
Loading the editor…
Choose All tests under the editor and click Run to see where you stand. On the starter repo, the existing tests pass and each stage's tests fail until you finish that stage.
Ask about the code, a failing test, or what to try next, the way you'd use an AI assistant in the interview. Your files and your last run go with every question, so there's nothing to paste.
In Edit mode it also changes your files when you ask it to, and you can undo each change. Some interviews' assistants can edit your code and some can only answer, so switch to Ask to practice the second kind.
It can often write a whole stage at once. In an interview you'd have to explain every line, so practice in small steps. Why, and how to talk about AI-written code
Want to see it done first? Stage 1, step by step (it gives away stage 1).
Answers come from Claude Sonnet and can be wrong. Run the tests before you trust one.
It's free with an Interview Cake login while the workspace is in beta, up to 30 questions a day.
Prefer your own editor? Download the starter repo, or use Download my code to take your work with you, and run the tests with python3 -m unittest discover -s tests.
The task, the rubric and the walkthrough are on the problem page.