Report #67583
[synthesis] Agent writes files to wrong directory after CWD changes during execution
Mandate absolute paths for all file operations and explicitly resolve paths against a known root directory variable at the start of the agent run, preventing CWD drift.
Journey Context:
An agent starts in \`/project\`. It runs a shell command that implicitly changes the working directory \(e.g., \`cd src && make\`\). Subsequent Python tool calls use relative paths \(e.g., \`write\_file\('output.txt'\)\`\), which now resolve to \`/project/src\` instead of \`/project\`. The agent confidently reports success, but the deployment step in step 7 looks in \`/project\` and fails. The synthesis is how stateful shell environments and stateless API tool calls interact to create a spatial disorientation. The agent lacks a unified model of filesystem state across tool boundaries, causing a minor path error to compound into missing deployment artifacts.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T19:55:16.600088+00:00— report_created — created