AI Interviews · Question

AI-assisted coding round (about 60 minutes): in a multi-file codebase with tests, fix a bug, implement a feature, then handle edge cases and scale. You pick the model; the assistant answers in chat and can't edit files.

AI-assisted coding question reported at Meta (2025). Sources, confidence and an answer card.

Researched · updated

eng-088 Both tracks AI-assisted coding rounds AI-assisted coding SeniorStaff+ Medium confidence
On this page

What they’re really asking

If you only remember one thing, say this in the first minute: “I’ll spend the first few minutes reading the code and running the tests, without the assistant. For the bug, I’ll say what I think is wrong and write a test that fails for that reason before I ask for a fix. For the feature, I’ll write the edge cases as tests and let the assistant draft against them. For scale, I’ll measure first and compare options on every kind of input. I’ll read every line the assistant gives me before it goes in.”

The rest of this page explains each part of that answer.

The interviewer wants to know whether you can work like a strong reviewer in a codebase you have never seen, while an assistant types faster than you.

A normal coding round gives you an empty editor and one small problem. You write every line, so the code reflects exactly what you understood. This round is different in two ways:

  1. The code already exists. You get a project of several files with tests. Most of the work is reading it and forming a correct theory of what it does.
  2. An AI assistant writes code for you, and it is sometimes wrong. The assistant is a chat tool backed by a large language model (LLM), a program trained on huge amounts of text and code that writes a plausible reply to whatever you type. Plausible is not the same as correct. So the round grades whether you can tell the difference, quickly.

The three phases are a ladder. The bug shows whether you read before you ask. The feature shows whether you test before you accept. The scale phase shows whether you measure before you optimize.

Hello Interview reports that Meta grades the same four things as its other coding rounds (problem solving, code quality, verification, communication) and that the round “isn’t about prompt engineering” (Hello Interviewsecondary · 16 Feb 2026).

Clarify first

Words you need first

  • Prompt: the instruction you type to the assistant.
  • Chat-only assistant: it answers in a side panel and can’t edit your files, so you copy its code in by hand. Reports say Meta’s round works this way.
  • Invented helper: a call to a function that sounds right but doesn’t exist in the codebase. Models produce these when they can’t see the code and guess a likely name.

Questions to ask

  • “Can the assistant edit files, or only chat?” If only chat, ask it for small pieces you can paste and review in seconds.
  • “Can I run the tests freely, and is there a larger suite for the scale phase?”
  • “For the bug, is done the test passing or the root cause explained?” Assume both.
  • “Do you want narration while I prompt, or a summary after each step?”
  • “Which model?” Pick one you have practised with; switching mid-round wastes time.

Answer

The worked example: one practice repo, one hour

The family walkthrough runs the whole round on this site’s Build Your Own Kafka-lite lab, a small Kafka-like log broker in Go. A log broker is a server that appends messages to files and lets readers fetch them by position number, called the offset. Readers can belong to a consumer group, which saves its position (it commits an offset) so it can carry on after a restart. Messages live in files called segments; when one fills up the broker starts a new one, which is called rotation. The repo’s tests all pass, yet it has two real bugs and one slow path. Here is the hour, step by step:

MinuteWhat you doWhat to say in the interview
0–5Map the files, run the tests, read what each test really checks”A ‘segment rotation’ test never rotates, and a ‘resume after restart’ test never checks the resumed position. Nothing simulates a crash.”
5–25Bug: a crash leaves a half-written record; the broker counts it as whole”Recovery skips ahead past the end of the file and Go doesn’t report that as an error, so we append after garbage.”
25–42Feature: saved positions must survive a restart”These five edge cases are the spec. The assistant can draft the code against them.”
42–57Scale: reads are slow”The profile says the time goes to tiny system calls, so I’ll ask for two options and measure both.”
57–60Summary”Here’s what I fixed, how I proved it, and what I chose not to fix.”

The minute budget is a suggestion, not a reported rule. It stops any one phase from eating the round.

First five minutes, no AI

Map the repo, run the suite, and read the failing test or the bug report. Say what each file does and where you think the bug is. Read the tests as claims: a test named for a behavior may not exercise it. That habit alone tells the interviewer where you will look, before any AI is involved.

Phase 1: the bug

Form the hypothesis yourself. Then write or extend a test that fails for that reason, and read its failure line. Only then prompt, with three things in it: the diagnosis, the constraint, and a limit on the output. For example:

“Recovery counts a torn record because Seek past EOF succeeds; replace the scan with ReadAt and truncate the tail; show only changed functions.”

(A torn record is one only partly written when the process died. EOF is the end of the file. Seek moves the read position and, in Go, doesn’t fail when it moves past EOF; ReadAt does report when the file ends early.) Run the full suite after pasting.

Watch for a fix that passes the visible assertion and leaves the bug. In the walkthrough, the obvious fix counts only complete records. The length check passes, but consumers still read corrupt payloads, because the half-record’s bytes are still in the file. The test caught it only because it compared payloads, not just counts.

Say it like this: “The count is right now, but I want to see the payloads too. A count can pass while the data is still wrong.”

Phase 2: the feature

State the spec in one sentence: “after a restart, each group’s last committed position comes back”. List the edge cases you chose (the last commit wins, even one that moves backwards; a corrupt record is skipped; a fresh directory works). Write them as tests, then let the assistant draft the implementation against those tests.

Tell it to use only functions that exist. Invented helpers are a reported failure in this round (Aced (formerly Exponent)first-hand · 2026). If the draft calls a name you haven’t seen, search the repo before reading further.

Phase 3: edge cases and scale

Measure before changing anything. A profile records where a program spends its time. Profile, ask for two options, benchmark both on every input shape you care about, and keep the one that wins with a reason you can say in a sentence.

In the walkthrough, one option (a bigger read buffer) cut one benchmark by 70% and made the other 15% slower. The other option (keeping the index in memory and reusing open files) cut both by more than 90%. If you had measured only the benchmark you were given, you would have shipped the slower one.

Narrate in three beats

For every step: what I believe, what I’ll ask the AI for, and what result would prove me wrong. Candidates told Hello Interview that “keeping the dialogue going with the interviewer was the hardest part” (Hello Interviewsecondary · 16 Feb 2026). Three short beats keep you talking without slowing you down.

Senior vs Staff

Meta's three-phase round

Senior

  • Finishes all phases with a failing-then-passing test or benchmark for each, and explains every pasted line.
  • Catches the assistant's wrong or invented code before running it.

Staff

  • Reads the tests as claims and names the untested paths before coding.
  • States what each fix costs, which sibling bugs exist, and which ones they are choosing not to fix now.

Level calibration is unclear: interviewing.io and DG Learning say E7 and above get only this coding round, Hello Interview says one classic plus one AI round up to E7/M2, and neither cites Meta (interviewing.iosecondary, dglearning (Substack)secondary · 17 Apr 2026). If you’re interviewing at E7 (Senior Staff), treat this round as your whole coding signal.

Small-team version

At a company of 50 to 500 people this is the normal week. An agent (an assistant that can edit files and run commands itself) drafts changes in code nobody remembers writing, and one engineer owns the diagnosis, the tests and the merge.

  • Buy the assistant. It is cheap next to engineer time: the family walkthrough works out about $150 a month for a heavy user under stated assumptions, around 1% of a loaded engineer’s monthly cost.
  • Turn the round’s habits into team rules: a short plan before any change bigger than a one-liner; a failing test written or approved by a person; one concern per diff; CI with linters and the race detector as the gate; and every agent mistake turned into a rule or a test.
  • Spend on review, not generation. Review time is the real cost, so keep diffs small enough to read in one sitting.

Pitfalls

  • Prompting before reading. Pasting the error in and the answer back, round after round, never builds a theory of the bug.
  • Accepting a fix because the one visible assertion passed. The count-only fix passed and still corrupted data.
  • Pasting code you can’t explain. The reported bar is showing you understand it.
  • Optimizing without a benchmark, or on one input shape. The buffered-reader option looked like a win until the second benchmark ran.
  • Going quiet while you read AI output. The interviewer can only grade judgment they can hear.

Go deeper

Family

AI-assisted coding round in a provided codebase

Meta-style rounds (and their Microsoft, OpenAI, Apple and Fireworks cousins): fix a bug, build a feature and make it faster in a repo you've never seen, with an AI assistant you direct, check and sometimes overrule.

Other questions in this family