What information should a coding agent persist between steps?

Instruction: Explain what state a coding agent should carry forward during a task.

Context: Checks whether the candidate can explain the core concept clearly and connect it to real production decisions. Explain what state a coding agent should carry forward during a task.

Updated

Example Answer

I'd persist the task's acceptance criteria, repository commit, changed-file references, unresolved assumptions, and the commands and results already observed. I'd also record rejected hypotheses with a short reason, so the next step does not repeat the same failed approach.

For a paused retry bug fix, a useful checkpoint says which test reproduced the duplicate write and which patch is awaiting review. It should not say “all tests passed” if only one command ran. On resumption I'd compare the checkout with the recorded commit and refresh affected evidence. State needs access controls and retention limits because paths and logs can contain private information. A concise checkpoint is easier to verify than an entire unfiltered conversation.

Why this works

Defines observable workflow state, freshness checks, and the difference between evidence and an optimistic summary.

Practice follow-up

Which checkpoint fields must be refreshed after another engineer changes the branch?

Your preparation path

Work through these questions in order. Read the answer aloud, then explain it in your own words.

Related Questions