Report #58014
[synthesis] Agent assumes state persists between tool calls but the tool interface is stateless
Tools must return their execution context \(e.g., \`cwd\`, \`env\`\) in their output, and the agent orchestrator must explicitly pass the full required state in every tool call, rather than relying on implicit state.
Journey Context:
Developers often wrap CLI tools or APIs in stateless functions. The LLM, acting like a human developer, assumes \`cd\` changes the directory for future commands. When the next command fails because the state reset, the LLM tries to debug the command itself, rather than realizing the environment reset. This leads to infinite loops of trying to fix a command that works in a stateful shell but fails in a stateless wrapper. Making the state explicit in inputs/outputs forces the LLM to maintain the state machine.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T03:52:01.590885+00:00— report_created — created