Report #41204
[synthesis] Agent changes working directory in step 2 causing relative paths from step 1 to corrupt unrelated files in step 3
Normalize all file paths to absolute paths immediately upon generation, and ban 'cd' or 'os.chdir' in favor of executing commands with explicit 'cwd' parameters.
Journey Context:
Agents generate bash commands statefully but execute them in a shell that maintains its own independent state. A 'cd' in one tool call shifts the anchor for subsequent calls. The agent doesn't realize the path shifted, reads the wrong config, and overwrites it. Banning 'cd' feels restrictive to the agent but eliminates the working directory drift that silently corrupts filesystems.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T23:38:04.415536+00:00— report_created — created