- AI Coding Interview
- /
- How the AI-Assisted Coding Round Works
Problems
Starting in late 2025, Meta replaced one of its two onsite coding rounds with what it calls the AI-Enabled Coding Interview. The candidate sits with a real codebase and has an LLM panel inside the editor with a choice of frontier models from OpenAI, Anthropic, Google, and Meta. The slot is 60 minutes. Shopify shipped its variant in the same year under the name Bring Your Own Everything, where the candidate uses their own Cursor, Claude Code, or Copilot in their own IDE on a screen-shared call. Canva went mandatory across all engineering interviews in 2025.
The language of the round is whatever fits the role. Backend candidates are typically given Java, Go, or Python. Frontend candidates work in TypeScript or JavaScript. ML candidates work in Python. The format does not depend on language; the skills it tests (reading code, scoping prompts, defending decisions) transfer across all of them. The exercises in this course happen to be in Java because that is what our test harness supports today, but the interview format itself is language-agnostic.
The interview is not a typing test, not a prompt-engineering trivia quiz, and not a LeetCode problem rewritten in Cursor. It is a 60-minute simulation of one day of working in the company's codebase. A bug shows up and you find it. Product asks for a feature, and you build it on top of the now-working code. Operations flags a performance problem, and you optimize. The LLM is your colleague for that hour, and the interviewer is watching how the two of you work together.
Almost every company that has shipped this format follows the same three-phase shape inside the 60-minute slot.
Phase 1 (Bug fix, roughly 15 to 20 minutes). You are dropped into a multi-file codebase with one or two failing tests. The bug is real but local: an off-by-one, a wrong default value, a forgotten branch, a misordered field assignment. The phase tests your ability to read the codebase quickly. You trace the call from the test to the broken line, form a hypothesis, fix only the broken line, and re-run the test. Interviewers note that skipping the reading phase is the single biggest regret reported by candidates who failed. Open the failing test before you open the AI panel.
Phase 2 (Feature extension, roughly 20 to 25 minutes). Once Phase 1 is green, the interviewer adds a requirement on top of the working code: a new strategy, a new API endpoint, a new event type, a new validation rule. You design and implement it on the now-correct codebase. The LLM helps you scaffold, but your job is to scope the prompt to the right files, accept what the AI gets right, and reject what it hallucinates. The reason Phase 1 comes first is that fixing the bug forces you to learn the codebase, which is what makes your Phase 2 prompts effective.
Phase 3 (Optimization, roughly 15 to 20 minutes). The interviewer adds a constraint that the current implementation cannot meet. Common forms are 'this needs to handle 10 times the load', 'this must run in O(log n) instead of O(n)', and 'this can no longer hold the full input in memory'. You identify the bottleneck, propose an algorithmic or structural change, and implement it. The LLM is most useful here for syntax, but the choice of approach is yours to defend at the end of the round.
LLMs have made syntax recall trivial. A candidate who can spell BiFunction<T, U, R> from memory and one who cannot are now indistinguishable in this format because both can ask the AI. The interview is graded on what the AI does not do for you: judgment about which suggestions to accept, the discipline of treating AI output as a draft to be reviewed, and the ability to defend the result.
Four skills are graded explicitly.
Critical reading of AI output. Treat AI-generated code as if a co-worker wrote it, and review every line. Spotting hallucinated APIs, off-by-one bugs in generated loops, and silently wrong complexity bounds is the strongest signal in the round. Candidates who paste large chunks of AI output and accept the first answer reliably fail. Candidates who read carefully, run the tests, and say 'this looks wrong, let me check' reliably pass.
Codebase comprehension under time pressure. The entire interview revolves around a codebase you didn't write. You have roughly 10 minutes to figure out the class hierarchy, the data model, and the control flow well enough to fix a bug. Speed of orientation, including knowing which file to open first and which test to run, is what separates senior signal from mid-level.
Directing the AI rather than following it. You tell the AI what to do, not the reverse. The candidate decides what to build, and the LLM types it faster. Candidates who prompt with a vague 'add a feature for X' and accept whatever comes back get weak signal. Candidates who write a one-line plan in a comment and then prompt 'in DiscountStrategy.java, add a new strategy with method signature Z that does W' get strong signal.
Defending every decision. At the end of the round, the interviewer can point at any line and ask why it is there. You have to be able to explain every change, including the parts the LLM wrote. Saying 'the AI suggested it' is not a defence. If you accepted a suggestion, you own it the same as if you had typed it yourself.
A simple five-step loop covers most of this round, and saying which step you are on as you work signals discipline.
Reproduce. Run the failing test before you edit anything. Verify with your own eyes that the failure described in the prompt actually shows up. Under time pressure many candidates skip this step and start guessing, which is the most expensive mistake in the round.
Isolate. Read the test to understand what it expects. Trace the call from the test entry point into the codebase. Identify the smallest piece of code that could be wrong. The LLM is useful here as a reading aid: you can paste the test plus the called function and ask 'walk me through what this code does', though the answer must agree with what you read in the file.
Hypothesize. Form one specific hypothesis about what is wrong. Saying 'the off-by-one is in the loop bound on line 42 of Foo.java' is testable. Saying 'something is wrong with the loop somewhere' is not. Cross-check your hypothesis against the code, ideally with the LLM as a second pair of eyes, before you change anything.
Fix. Make the smallest change that would make the test pass if your hypothesis is correct. Single-line edits beat sweeping rewrites. The LLM is useful for getting the exact syntax right, but the change you make is yours to choose.
Verify. Run the test. If it passes, re-run any neighbouring tests to confirm you did not regress them. If it fails, your hypothesis was wrong, and you go back to the isolate step with the new information. Do not throw the code back at the LLM with 'fix this' as the prompt; that is how subtle, second-order bugs get introduced.
Running and iterating is the heart of this round. The candidates who pass run tests after every code change and after every AI suggestion they accept. Long stretches without a test run signal that the candidate has lost the thread.
| Company | Format | AI policy |
|---|---|---|
| Meta | Replaces one of two onsite coding rounds. 60 minutes, three phases, custom CoderPad with a model panel. | Mandatory; multiple models on tap inside the editor. |
| Shopify | Two AI rounds (screen and onsite). Bring Your Own Everything format: empty repo, your IDE, your AI tool. | Mandatory; candidate's choice of tool. |
| Canva | Across backend, frontend, and ML rounds, integrated into the existing problem set. | Mandatory across backend, frontend, and ML rounds. |
| Cisco, Stripe, Netflix, Google | Confirmed using vibe-coding rounds in 2025 hiring. | Mandatory or strongly encouraged. |
| Anthropic | Standard live coding without AI by default. | Opposite policy: AI assistance is not used in live coding rounds unless explicitly indicated. |
Five failure modes show up over and over in this format. These are the antipatterns interviewers actively look for.
Big unreviewed pastes from the LLM. Pasting a 50-line block from the AI into the editor, running the tests, and shipping if green. Even when the tests pass, this signals zero comprehension of the change. The candidates who pass are not better at prompting. They know what to build, catch what the AI gets wrong, and can defend every decision they make. Small verified iterations beat big unreviewed pastes.
Skipping the reading phase. Going straight from the problem statement to prompting the AI without ever opening the codebase. Skipping the reading phase is the single biggest regret reported by candidates who fail. The five to ten minutes spent reading the code is what makes the prompts that follow effective.
Accepting the first answer. The LLM gives a confident-looking answer, and the candidate runs with it without checking. Never accept AI suggestions on face value. Even on Phase 1, the AI's first guess is often plausibly wrong: it suggests a fix that compiles, makes the failing test pass, and breaks a different test the candidate did not run.
Letting the AI rewrite unrelated files. Asking 'please fix the bug' with whole-repo context attached. The AI returns edits to four files when only one was wrong. Candidates who accept these are penalised for unscoped changes. Candidates who reject them and re-prompt with a narrower scope are not.
Inability to defend the code. At the end of the round the interviewer asks 'why does this loop start at 1?' or 'what does this regex match?'. If the candidate cannot answer because the AI wrote the line, that is a fail signal regardless of whether the code works. 'The AI suggested it' is the worst answer in the round.
The behaviours interviewers reward are essentially the inverse of the failure modes.
Reading first. Open the test and read it. Open the called code and read it. Run the test and watch it fail. Five to ten minutes of orientation before the first prompt to the AI signals seniority more than any other single behaviour.
Stating a hypothesis aloud. Saying 'I think the bug is the index in the for-loop on line 42; it should be <= not <' lets the interviewer grade your thinking, not just your typing. Even when the hypothesis turns out to be wrong, the act of stating one is a strong signal.
Scoping prompts to specific files and tasks. Avoid 'fix this bug' as a prompt. Instead, prompt 'in DiscountCalculator.calculate, the percent is divided by 100 twice; show me what the body of the method should look like with that fixed and explain what changed'. The narrower the prompt, the better the AI's answer and the better your understanding of the change.
Reading the diff. When the AI returns code, read every line before accepting. Even when the candidate accepts the suggestion wholesale, the act of reading is observable in eye movement and brief pauses. Skipping the read is also observable.
Running tests after every change. Tests run before, after, and between AI suggestions. Long stretches without a test run signal that the candidate has lost the thread.
Being able to walk through any line at the end. When the interviewer points at any line in the final code, the candidate can explain why it is there. If the candidate edited it, they can explain why. If the AI suggested it, they can explain why they accepted it and what alternative they considered. This is the final litmus test, and it is the one most candidates fail under stress.
What you work with depends on the company, and you can usually pick.
Meta's CoderPad ships with a panel of frontier models from OpenAI, Anthropic, Google, and Meta. You pick which model to send each prompt to. There is no in-editor agent in the Cursor sense; you copy and paste between the chat panel and the editor. This forces explicit prompts and explicit accepts, both of which are observable to the interviewer.
Shopify's BYOE lets you use Cursor, Claude Code, GitHub Copilot, Windsurf, Continue, or any other in-editor agent you prefer. The interview happens in your local IDE on a screen-shared Google Meet call. This is the closest the interview gets to how you actually code, and it gives the interviewer a clear view of which AI tools you are fluent with.
Canva and others typically provide a web-based editor with a chat panel, similar to Meta's setup.
The practical implication is that if you have a preference, practise with that tool before the interview. The interview is not the time to learn a new agent. Cursor and Claude Code are the two most polished options today, so if you are choosing one, those are the safe picks. ChatGPT in a browser tab is fine for chat-panel companies like Meta but is not appropriate for in-editor companies like Shopify.
Three weeks of focused practice gets most engineers from never having done this format to comfortable in 60 minutes. The volume of practice matters less than the shape of the practice.
Practise on real multi-file repos, not single-function LeetCode. The skill being tested is codebase comprehension under time pressure, and that does not transfer from class Solution { ... }. Clone an open-source project in your target language (a mid-size service such as a Spring Boot backend, an Express.js app, or a Django project is ideal), plant a bug or break a test, then practise fixing it with Cursor or Claude Code as if it were the interview. The format-fit jump is much larger than the algorithmic jump from LeetCode preparation.
Drill the loop until it is automatic. Reproduce, isolate, hypothesize, fix, verify. Run a stopwatch and aim for no more than 30 seconds between code changes and test runs.
Practise the inverse: give the AI bad context on purpose. Intentionally feed the AI incomplete context, watch how it goes wrong, and practice correcting it. The interview will give you a codebase the AI does not perfectly understand, and recognising what an off-the-mark AI answer looks like is half the battle.
Mock-interview the format. Run timed end-to-end simulations against unfamiliar repos before the real round. The format-fit gain from one or two full mocks is larger than another week of unfocused practice.
For this course's exercises, each problem is a multi-file Java codebase with a planted bug, a feature follow-up, and an optimization target. Treat each one as a 60-minute timed simulation. Use whichever AI tool you prefer. The hidden test suite verifies your final state across all three phases.
| Antipattern | What it looks like | What to do instead |
|---|---|---|
| Pasting the whole problem statement to the AI as your first prompt | 'Here's the problem and the codebase, please solve it.' | Read the failing test first, then prompt narrowly. Decide what to build before asking the AI to type it. |
| Accepting AI output without running tests | Pasting the diff, hitting save, and moving on. | Run the tests after every accept. The 30-second cadence is what separates passing candidates from failing ones. |
| Letting the AI rewrite files outside the bug's blast radius | The AI returns edits to four files; you accept all four. | Re-prompt with a narrower scope. Use 'in file X only, change Y' as the form, never broader. |
| Treating 'the AI wrote it' as a defence | The interviewer asks why a line is there, and the candidate shrugs. | Re-read every line of AI output before accepting. If you accepted it, you own it. |
| Whole-loop refactors in Phase 3 | The optimization phase becomes a rewrite of the working Phase 1 and Phase 2 code. | Identify the bottleneck and change the smallest thing that fixes the constraint. Then run the tests. |
| Switching models mid-prompt to escape a bad answer | One model gives a wrong answer; you switch to a second; switch to a third. | If the AI cannot help, the problem is usually the prompt, not the model. Re-scope and try again. |
If you imagine the interviewer's scorecard while you work, the questions are not 'did the candidate finish?' or 'is the code right?'. They are about how the candidate worked. Five questions show up consistently across this format.
Did they read before they prompted? Five to ten minutes of orientation at the start is the strongest signal. Going straight to the AI is the weakest.
Did they run the tests? Tests run between every change, and the cadence is observable.
When the AI was wrong, did they catch it? Hallucinations, off-by-one bugs, wrong complexity. The candidate's reaction to bad AI output is graded.
When they accepted code, can they explain it? This is the end-of-round walkthrough. Saying 'the AI suggested it' fails this question.
Did they direct or follow? The candidate either decided what to build and used the AI to type it (good), or accepted whatever the AI suggested (bad).
When you practise, run a self-grade against these five questions after each session. The question you score lowest on is the one to drill next.
Each problem in this course is a three-phase simulation: a multi-file Java codebase with a planted bug for Phase 1, an extension that builds on the fixed code for Phase 2, and an optimization or composition target for Phase 3. The validator runs all three phases as separate scenarios, and you implement everything inside the same starter file. Use whichever AI tool you prefer, and treat each problem as a 60-minute timed simulation.
The first problem (Cart Discount Engine) is the lightest of the three. It is a small business-logic codebase with a clean arithmetic bug, a buy-one-get-one-free discount extension, and a discount-stacking feature. Subsequent problems are larger and more domain-specific.
Open the failing test. Read the code. Then prompt narrowly.