📒 problems 📖 glossary
Mock interview
46:30
ready
of 46:30
Lesson 69 · AI-era rounds

The AI-assisted coding round

As of June 2026: company formats, tool names, and rollout dates cited below reflect that date — confirm specifics before an interview.

📖 Walk me through it — plain English

This is a new kind of coding interview, not a puzzle to solve. Instead of giving you a blank screen and asking you to write an algorithm from memory, the company (Meta started this in Oct 2025, Google and Canva are joining) sits you in front of a coding tool that has an AI chatbot built into the side panel — think ChatGPT or Claude living right next to your code editor. You get a small project made of a few files and a task. The catch: they are not really grading whether the code works. They are grading how you work WITH the AI. The skill being tested is "can this person stay in charge of the AI instead of blindly trusting it."

Here is the analogy. Imagine you're a head chef and the AI is a fast but unreliable line cook. The line cook can chop vegetables and fry things in seconds — way faster than you — but sometimes grabs salt instead of sugar, or plates a dish that's the wrong shape entirely. A bad head chef just yells one giant order ("make the whole dinner!"), walks away, and serves whatever comes back without tasting it. A good head chef reads the recipe first, gives one clear instruction at a time, tastes each dish as it comes out, and says out loud "no — that's too salty, redo it" when something's off. The interview is watching to see if you're the good head chef. The cook (AI) being fast is assumed; your judgment is the thing on trial.

Concretely, "jargon" you'll hear: a prompt is the instruction you type to the AI. A diff is the set of lines the AI changed, shown as red (removed) and green (added) — "auditable diffs" just means changes small enough that you can eyeball whether they're correct. To verify means to actually run the code or trace an input through it by hand, rather than assuming it works because it looks right.

Two more words worth pinning down, because the whole lesson rests on them. Judgment here means deciding what to build, whether the AI's answer actually fits, and what to do next — the part a machine can't outsource back to you. And "confidently wrong" describes the AI's most dangerous habit: it writes code in a calm, authoritative tone whether it's right or not. There's no nervous stammer when it's guessing. A function can be perfectly indented, well-named, and call a method that does not exist. So the round is really a test of one muscle: can you stay skeptical of fluent-looking output and prove it before you trust it?

How to approach the 60 minutes without falling into the trap:

  • First ~5 min: read, don't prompt. Open the files and run the test yourself. Prompting before you understand the code makes the AI guess at context and hand you nonsense.
  • Prompt one layer at a time. Not "build the whole feature" — instead "write the validator," check it, then "now the function that calls it." Small asks give you small diffs you can actually judge.
  • Reject fast and say why out loud. If the first answer is the wrong shape, don't spend five minutes patching it — re-ask with better context. And narrate the rejection: "this returns a Promise but I need a plain value here." That sentence is the single loudest "pass" signal the interviewer listens for.
  • Skip the AI for tiny stuff. Renaming a variable or fixing a typo is faster by hand than typing a prompt and waiting.
  • Trace one real input by hand before you submit. This catches the sneaky case where the AI wrote something that looks right and is completely wrong.
  • Be honest if asked whether you used AI. "Yes, I prompted for the helper, then added a test for the empty-input case to confirm it." Honesty plus visible verification reads as competence, not cheating.

Why this matters: the one behavior they explicitly fail people for is "mega-prompt, paste, ship" — dumping the whole problem into the AI, copying the answer in, and submitting without reading or testing. Even if that code happens to pass, you fail the interview, because it shows the AI was driving and you were just along for the ride. The whole point is to demonstrate that you are steering.

Net-new format. Meta rolled it out Oct 2025 (one of two onsite coding rounds, 60 min); Google is piloting; Canva requires it. The interviewer hands you a CoderPad three-panel layout — file explorer, editor, AI chat sidebar with GPT-5 / Claude Sonnet 4 / Gemini 2.5 Pro preloaded — and a small multi-file codebase. They grade how you collaborate with the model under time pressure.

What's actually different from a normal coding round

In a classic coding interview the bottleneck is recall: can you remember the two-pointer trick, write a binary search without an off-by-one, finish under the clock. The AI removes that bottleneck — the model can produce a binary search instantly. So the test shifts to the things the model is bad at and you are supposed to be good at: judgment (is this the right thing to build, and is the answer correct?) and verification (have I proven it works, or am I just hoping?). A few terms, defined so nothing here is a black box:

  • AI assistant / model. The chatbot in the side panel (GPT-5, Claude, Gemini). You type a request; it answers with text and code. It does not run your code unless the panel has an agent mode that executes — assume it does not, and that you are the one who runs things.
  • Prompt. The instruction you send. A good prompt states intent, names the file/function, and says what "done" looks like.
  • Hallucination / confidently-wrong code. The model invents a function, an import, an API field, or an edge-case behavior that does not exist or is wrong — and presents it with the same confident tone as correct code. There is no built-in "I'm unsure" signal, so skepticism is your job.
  • The "driver" mindset. Borrowed from pair programming, where one person types (the driver) and one reviews (the navigator). In this round you are always the navigator and also the final driver — the AI is a very fast typist you delegate to, but you decide direction and you sign off on every change.
  • Verify. Run the test, run the file, or hand-trace one concrete input. Reading the code and nodding is not verifying.

The mental reframe that fixes most candidates: stop thinking "the AI is taking my test for me" and start thinking "I am a senior engineer reviewing a fast junior's pull request, live, with the author sitting next to me." A senior doesn't merge unread, doesn't merge untested, and isn't shy about sending it back. That posture is the rubric.

Typical 60-min structure (Meta-style)
  1. ~5 min — orient: read the task, skim the repo. Don't prompt yet.
  2. ~15 min — bug fix: a planted bug in existing code. Diagnose, fix, verify.
  3. ~25 min — implement: add a feature that touches 2–3 files. AI helps with boilerplate; you own the design.
  4. ~10 min — optimize / explain: "make this faster" or "walk me through your tradeoffs."
  5. ~5 min — Q&A: they probe one decision you made.

The loop that wins: intent → generate → verify → iterate

There is one repeatable cycle the strongest candidates run, and narrating it is half the score. Each turn has four beats. The key is that you speak every beat — the interviewer can't read your mind, and your spoken reasoning is the actual artifact being graded.

  1. State intent (out loud, then in the prompt). Decide what you want and why before you ask. "I need a pure function that validates the input shape, returns an error string or null, no I/O." Saying it first forces you to know the answer's shape, which is exactly what lets you catch a wrong answer.
  2. Generate. Send a small, specific prompt. One layer, not the whole feature. Name the file and the contract.
  3. Verify. Read the diff against the contract you just stated, then prove it: run the test, run the file, or hand-trace a concrete input and an edge case (empty, null, the boundary value). This beat is non-negotiable — it is the thing they planted bugs to test.
  4. Iterate. If it's wrong, say why in one sentence and re-prompt with the added context, or just fix the small thing yourself. If it's right, move to the next layer and start the loop again.
Worked example — using the assistant well, with narration

Task: add a parseDuration("1h30m") helper that returns total seconds, and wire it into an existing handler. Here is the loop, with the words you'd actually say to the interviewer in italics.

# BEAT 1 — STATE INTENT (spoken): "I want a pure function:
# string in, number of seconds out. It should handle h and m,
# and I'll decide what it does on bad input after I see a draft."

# BEAT 2 — GENERATE (prompt sent to the panel):
# "Write parseDuration(str) in utils.js. Parse formats like
#  '1h30m', '45m', '2h'. Return total seconds as a number.
#  Don't touch other files yet."

# --- model returns: ---
function parseDuration(str) {
  const h = str.match(/(\d+)h/);
  const m = str.match(/(\d+)m/);
  return h[1] * 3600 + m[1] * 60;
}

"Reads clean, but I'm not trusting it yet — let me trace two inputs." Now BEAT 3, the verify, done by hand:

# BEAT 3 — VERIFY (hand-trace, spoken):
# "1h30m": h match -> "1", m match -> "30".
#   1 * 3600 + 30 * 60 = 3600 + 1800 = 5400.  Correct.
# "45m":   h match -> null  ... h[1] crashes: null has no index.
#   BUG. And '30' * 60 is string * number — works in JS by
#   coercion, but that's luck, not intent. I want real numbers."

"Two problems: it crashes when a unit is missing, and it leans on string-to-number coercion. Let me re-prompt with that exact context" — BEAT 4, iterate:

# BEAT 4 — ITERATE (re-prompt with the failure you found):
# "It crashes on '45m' because the h match is null. Handle a
#  missing h or m as 0, and use parseInt so we add numbers,
#  not strings."

# --- model returns the fixed version: ---
function parseDuration(str) {
  const h = str.match(/(\d+)h/);
  const m = str.match(/(\d+)m/);
  const hours = h ? parseInt(h[1], 10) : 0;
  const mins  = m ? parseInt(m[1], 10) : 0;
  return hours * 3600 + mins * 60;
}
# VERIFY AGAIN: "45m" -> 0*3600 + 45*60 = 2700. "2h" -> 7200.
# Both correct. NOW I wire it into the handler — next layer,
# loop restarts.

That's the whole game in miniature: you stated a contract, the first draft looked confident and was subtly broken, you found the break yourself by tracing, and you re-prompted with the specific failure instead of vaguely asking it to "fix bugs." The interviewer just watched you out-think a fluent-but-wrong machine. That is a pass.

How to narrate without sounding robotic: you don't need to announce "beat one, beat two." Just keep a running commentary of intent and doubt: "I want X… okay it gave me Y… let me check the empty case… that breaks, here's why… re-asking." The interviewer is listening for two things specifically — that you knew what correct looked like before you saw the answer, and that you proved it after. Everything else is detail.

Spotting confident-but-wrong code

Because the model never sounds unsure, you need a fixed checklist you run on every diff regardless of how good it looks. These are the failure shapes that recur most in this round:

Invented APIs

It calls a method or imports a module that doesn't exist (arr.removeLast(), a config field that was never defined). Cross-check against the actual files and the language's real API.

Missing edge cases

Happy path works; empty input, null, zero, negative, or the boundary value crashes or returns garbage. Always trace at least one non-happy input.

Wrong contract

Right logic, wrong shape — returns a Promise when you need a value, mutates an argument when you need a copy, throws when you wanted a result code. Check the return type against your stated intent.

Subtle off-by-one / coercion

Loop runs one too many times; string is silently treated as a number; == where you needed strict equality. These survive a glance and die under a trace.

The rubric, named explicitly — what every company actually scores

Meta, Google, Canva, and the AI-product startups arrived at the same rubric independently, which is the strongest sign it's real and worth memorizing. The round is not graded on whether the code works — it's graded on five judgment axes. Internalize these five and you know exactly what the interviewer's scorecard says:

a · Strategic delegation

Which subtasks do you hand to the AI, and which do you keep? Strong candidates delegate the contained, well-specified pieces (boilerplate, a pure helper) and keep the design and the risky parts. Handing it everything — or nothing — both score badly.

b · Prompt granularity

Are your asks the right size? One layer per prompt, with a named file and a stated contract, beats one mega-prompt. Granular prompts produce small diffs you can actually audit; that's the skill being measured.

c · Verification & testing

Do you prove it works, or hope it does? Running the test, running the file, or hand-tracing one concrete input + an edge case. Never-verifying is the single behavior they most reliably fail people for.

d · Debugging near-correct output

Can you catch the answer that is 90% right? The distinctive new muscle: not writing from scratch, but spotting and fixing the confidently-wrong invented API, off-by-one, or wrong-contract return in fluent-looking code.

e · Own & explain the code

Can you defend every line as yours? If the interviewer points at any change and asks "why," you explain the decision and the tradeoff. Code you can't explain reads as code the AI was driving.

The anchor finding: Canva — which requires AI in its engineering interviews — reported that the candidates who failed weren't the ones who couldn't code. They failed because they lacked the judgment to guide the AI effectively, or to recognize when its suggestions were suboptimal. That sentence is the whole rubric in one line: the coding is assumed; the five judgment axes above are the test. Which specific companies require AI and which ban it moves quarterly — the current table is in the Market snapshot.

Playbook: the moves that score

Read before you prompt

First 5 min: no AI. Open files, run the test, find the entry point. Prompting cold makes the model invent context. Prompting after reading lets you ask specific questions.

One prompt per layer

Don't paste the whole problem. "Generate the validator for {schema}" → check → "now the handler that calls it." Layered prompts = auditable diffs.

Reject in seconds, not minutes

If the first output is wrong-shaped, re-prompt or rewrite. Don't spend 5 min "fixing" an answer that's structurally off. The model's second attempt with better context usually beats the first patched.

Narrate the override

When you reject AI output, say why out loud: "this returns a Promise — I need sync here." This is the signal the interviewer is most listening for.

Watch the clock

Half the candidates spend 50 min prompting and 10 min realizing the code doesn't run. Build → verify → repeat in tight loops.

Skip AI on small stuff

Renaming a var? Fixing a typo? Just do it. Prompting costs ~15s of overhead per call — don't pay it for 5 lines.

Trace by hand at least once

Before submitting, walk one test input through your code mentally. Catches the "model wrote it, looks right, totally wrong" case.

Disclose AI use in writing

If asked "did you use AI here," answer plainly. "Yes, I prompted for the helper, then verified by adding a test for the empty-input case." Honesty + verification = pass signal.

What interviewers reward — and the pitfalls that sink you

Two columns, same coin. The rewarded behaviors all show you steering; the pitfalls all show the AI steering. When in doubt, ask yourself "who is in the driver's seat in this moment?" and act to make the answer obviously you.

Rewarded
  • Stating the contract before generating, then checking the output against it.
  • Running or tracing every change, including one edge case.
  • Catching a confidently-wrong answer and naming the flaw in one sentence.
  • Small, layered prompts that produce reviewable diffs.
  • Honest, specific disclosure of where and how you used the model.
  • Doing trivial edits by hand instead of round-tripping the AI.
Pitfalls
  • Blindly accepting output — pasting the diff because it looks right, no trace, no run.
  • The mega-prompt — dumping the whole task in one shot, then shipping whatever comes back.
  • Silent work — solving it correctly but never voicing intent or doubt, so the judgment is invisible.
  • Patch-spiraling — spending five minutes nudging a structurally wrong answer instead of re-prompting clean.
  • Pretending you didn't use AI when AI is allowed — reads as a trust failure, not modesty.
  • Never testing — the single behavior they most reliably fail people for.
The failure mode they explicitly grade against: "mega-prompt, paste, ship" with no reading, no verification. Even if it works, you fail. They want to see you directing the model, not the inverse.

Takeaway: this round trades recall for judgment + verification. Read before you prompt; state intent, generate one layer, verify by running or tracing, then iterate — and narrate every beat so your thinking is visible. Treat the AI as a fast junior whose confident-looking code you review like a live pull request: never merge unread, never merge untested. Catching one confidently-wrong answer and saying why is worth more than ten clean prompts. The thing on trial is not the code — it's whether you were driving.

Go deeper (optional): if you want to rehearse the loop, set yourself a 30-minute timer, open any small repo with a known bug, and force the discipline: speak your intent before each prompt, hand-trace one input after each diff, and refuse to submit anything you haven't run. The habit transfers directly — and it's also just how good engineers use these tools on the job.

→ Going deeper: The scored round is the interview version of daily AI pairing. See AI collaboration.