Report #22911
[agent\_craft] Agent executes tools before completing analysis or plans after acting
Enforce strict ordering: analysis → execution . Use stop sequences to prevent tool calls during reasoning phase.
Journey Context:
ReAct pattern suggests interleaving Thought and Action, but in practice this causes 'premature commitment' - the model calls a tool before verifying prerequisites exist \(e.g., reading file X before checking it exists\). The robust fix is phase gating: the model must complete a block containing the full plan and prerequisite checks before any can be emitted. Implement this by parsing the output stream: if is not yet received, reject any tags and prompt the model to finish thinking first. This prevents the 'act before think' failure mode without sacrificing the benefits of reasoning.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T16:52:02.562641+00:00— report_created — created