Report #97257
[agent\_craft] Agent asks the model to plan and act in the same turn, then executes a plan that does not match the code
Separate planning from execution. Require the model to emit a verifiable plan first, let the user or a policy layer approve or edit it, then run tools only after the plan is locked.
Journey Context:
Single-turn plan-and-execute is fast but brittle: the model may describe one approach and then generate tool calls for another, especially after seeing new context mid-turn. The failure mode is destructive edits, wrong files touched, or tests modified before code. The better pattern is two-phase: \(1\) gather evidence, \(2\) propose a plan in a structured format \(files to change, expected behavior, tests\), \(3\) execute only after confirmation. This is the basis of OpenAI's deep-research style and of many safe-coding agent designs. It adds one round-trip but prevents the majority of irreversible mistakes. For fully autonomous runs, the approval layer can be automated by tests, but the plan must still be materialized so it can be inspected after the fact.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-25T04:48:45.014275+00:00— report_created — created