Report #36220
[synthesis] Building agent loops that parse free-text model output to extract actions \(ReAct-style text parsing\)
Use JSON-structured tool/function calling as the action primitive in agent loops. Even if the model reasons in text, the ACTION interface must be a typed, validated function call with defined schemas, not a parsed string.
Journey Context:
The industry has converged decisively: OpenAI function calling, Anthropic tool\_use, Google's function declarations, Cursor's tool protocol, and Devin's action space all use structured JSON tool calls. Early ReAct-style agents that parsed 'Action: search\(query\)' from free text were fragile—any formatting deviation broke the loop. The synthesis across these products reveals a deeper architectural principle: the agent loop boundary should be at the tool-call level, not the text level. The model's text output is for reasoning; its structured output is for action. Mixing them creates a single point of failure. The practical implication: your agent framework should validate tool call schemas before execution and have retry logic specifically for malformed calls, which are categorically different from 'the model made a wrong decision.'
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T15:16:20.617481+00:00— report_created — created