All jobs / AI engineer / AI Coding & Agentic Development
AI engineer interview question · 5+ years
You want to use coding agents to move about 300 modules off a deprecated internal API. How do you run that so it is safe?
The strongest answer
Pin current behaviour with tests, migrate a few modules by hand to get a written recipe, then have agents apply it in small independent batches — each through CI and review — with odd cases listed for humans
Why it works
Exactly — decompose, make the recipe explicit, and make every batch verifiable and revertible. The agents supply speed; the structure supplies safety.
What a good answer covers
- Decompose; make each step verifiable.
- Pin behaviour with tests first.
- Do a few by hand; write the recipe.
- Small batches through CI and review.
Answers that fall short
- Close, but not the strongest: Have the agent migrate module by module and review each pull request carefully as it comes in
Sound, but without tests that pin behaviour and a worked recipe, each review is a fresh judgement and drift creeps in across 300 of them. - Weak: Give the agent the whole repository and the instruction in one run, so the change is consistent everywhere
One giant run gives one giant diff: unreviewable, hard to revert, and any mistake in the approach is repeated 300 times. - Red flag: Let agents migrate and auto-merge whatever passes CI; with 300 modules nobody can review them all
CI proves only what the tests cover. Where coverage is thin, auto-merge ships silent behaviour changes at scale.
Who gets asked this
More AI Coding & Agentic Development questions
- What is the difference between an AI coding assistant and a coding agent, and why does it matter for how you…
- Your coding assistant’s solution imports a library you have never heard of. What do you do before you install…
- You are handing a feature to a coding agent. What goes into the task you write for it?
- You asked an assistant to write unit tests for an existing module. It produced forty tests, all green, and…
- A teammate’s coding agent opens one pull request: 2,400 changed lines across 45 files, mixing a rename, a…
- Your team’s coding agent keeps producing working code that ignores the codebase: a second HTTP client, a new…
- A production incident is traced to agent-written code. The author says the agent wrote it; the reviewer says…