Instruction: Describe the main phases of a coding-agent workflow.
Context: Checks whether the candidate can explain the core concept clearly and connect it to real production decisions. Describe the main phases of a coding-agent workflow.
The way I'd approach it in an interview is this: I separate them because they are different risk surfaces. Code understanding is about retrieving the right context and inferring how the system works. Code generation is about proposing a change that fits that understanding. Code execution is about validating or acting on that change through commands and tests.
If those phases blur together, the agent can start generating patches before it really understands the repo or executing commands before the patch has earned that trust. Separation makes both observability and control better.
It also helps human review because you can tell whether the failure came from bad grounding, bad code generation, or bad execution policy.
A weak answer is saying the agent should read, write, and run in one tight loop. The stronger answer explains why each phase needs different controls and diagnostics.
easy
easy
easy
easy
easy
easy