Report #5341
[agent\_craft] Agent context falls out of sync with the actual file system after code execution
After every code execution tool call that modifies the filesystem, force the tool output to return a diff or a verification snippet \(like \`git diff\`\), and explicitly instruct the agent to update its mental model of the project structure.
Journey Context:
Agents sometimes write a file and assume it worked, or forget they created a directory. If the context doesn't reflect the new state, the agent might try to recreate the file or look in the wrong place. Returning the diff forces the ground truth back into the context window, maintaining synchronization.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T21:06:57.556428+00:00— report_created — created