The agent keeps inventing APIs that do not exist in the codebase. What would you change first?

Instruction: Describe how you would respond when a coding agent hallucinates local interfaces.

Context: Tests how the candidate diagnoses the problem, chooses the safest next step, and reasons through recovery. Describe how you would respond when a coding agent hallucinates local interfaces.

Official answer available

Preview the opening of the answer, then unlock the full walkthrough.

I would make existence checks part of the workflow. If the agent is inventing APIs, it needs stronger repo grounding...

Related Questions