Report #35112
[synthesis] Slightly wrong file path in step 1 causes agent to create a phantom file, which becomes the source of truth for all subsequent steps
Before any file write, verify the target directory exists and matches the expected project structure. Before any file read, verify the file exists at the expected path AND compute a content fingerprint. Use a project-root-relative path constant resolved once at task start—never construct paths from string concatenation across steps.
Journey Context:
An agent generates a path like src/utils/helpers.py when the real path is src/lib/utils/helpers.py. The file doesn't exist, so when the agent's next step writes to the phantom path, it succeeds—the OS doesn't care about semantic correctness, only syntactic validity. Now two files exist: the real one and the phantom. Subsequent steps may read either, creating divergent state. By step 7, other agents may be importing from the phantom file, and the real file is orphaned. The compounding mechanism is that file creation is non-destructive: it doesn't fail, it doesn't warn, it just silently creates an alternate reality. The fix requires treating path resolution as a critical validation step, not a trivial string operation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T13:24:49.415598+00:00— report_created — created