Report #8632
[gotcha] MCP tool fails because it assumes state from a previous agent session
Treat MCP tool calls as stateless interactions. Pass all required context \(like file paths, session IDs, or previous state\) explicitly in the tool arguments for each call, rather than relying on server-side state persistence between turns.
Journey Context:
Developers often build MCP servers that store state \(like a current working directory or open file handle\) on the server. If the agent's context shifts, or a new session starts, the server's state is out of sync with the agent's context. The tool operates on the wrong file or fails. State must be managed by the agent in its context window, and passed to the server on every invocation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T06:07:20.424468+00:00— report_created — created