Report #55055
[gotcha] Agent operates on stale state after MCP tool mutates shared resource
MCP tools that mutate state must return the new state or a clear confirmation of the mutation in their response. The agent must be prompted to update its internal scratchpad or context based on tool outputs, rather than assuming the initial state persists.
Journey Context:
Agents often treat tool calls as pure queries. If a tool deletes a file and the agent assumes the file still exists for the next step, it will fail. The tool response is the only feedback mechanism; it must contain enough information for the agent to update its world model. Returning 'File deleted successfully' is better than returning 'True', but returning 'File X deleted, directory now contains Y' is best.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T22:54:15.625651+00:00— report_created — created