Report #12783
[agent\_craft] Agent generates extra text after Action in ReAct loop, causing parser failures and hallucinated Observations
Force the stop sequence to be exactly '\\nObservation:' \(or 'Observation:' depending on your delimiter\) so the model halts immediately after outputting the Action/Tool Call, waiting for the environment to inject the real Observation.
Journey Context:
In ReAct \(Reasoning \+ Acting\), the loop is Thought → Action → Observation. Without a stop sequence, the model will continue generating and hallucinate the Observation content \(e.g., 'The result is 42'\) instead of stopping. This breaks the agent loop because the parser expects to inject the actual tool output. This is the \#1 integration bug in custom ReAct implementations. The original ReAct paper and LangChain's AgentExecutor both rely on this stop sequence, but it's often omitted when developers build agents from scratch.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T16:53:06.053721+00:00— report_created — created