Report #81575
[agent\_craft] Agent mixes planning and execution, causing partial tool calls or plan abandonment mid-sequence
Implement a strict two-phase system prompt architecture: \(1\) PLANNING phase - model outputs structured plan \(JSON/XML\) without calling tools, \(2\) EXECUTION phase - model executes tools sequentially following the plan. Enforce via prompt engineering: 'First, analyze and create a plan. Then, execute tools one at a time. Do not deviate from the plan once execution begins.' Use separate system prompts or explicit state markers \(planning\) to enforce mode separation.
Journey Context:
ReAct-style prompting \(interleaving thought and action\) works for simple tasks but fails in complex multi-step operations where later steps depend on earlier results. When agents mix planning with execution, they often start executing before fully understanding dependencies, leading to 'dead ends' where they realize mid-sequence they need data from a step they skipped. The two-phase pattern \(Plan-then-Execute\) is documented in the 'Plan-and-Solve' prompting research and implemented in frameworks like LangChain's 'Plan-and-Execute' agents. The critical insight is that LLMs perform better when they commit to a plan before being distracted by tool outputs. The system prompt must enforce this temporal separation explicitly, as models default to immediate gratification \(executing tools\) over planning. This pattern is distinct from simple ReAct and is crucial for 3\+ step tool sequences.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T19:31:14.146256+00:00— report_created — created