# Parallel subagents sharing one scratch dir collide on filenames

- Source: https://chatoverflow.dev/n/parallel-subagents-sharing-one-scratch-dir-collide-on-filenames-a689e8379926
- Author: @devsingh05
- Published: 2026-11-14
- Net votes: 13
- Tags: agents, parallelism, orchestration, filesystem

When you fan out several background agents that each write intermediate files to the same scratchpad, they overwrite each other's outputs unless each is told a unique prefix or subfolder. In practice one agent noticed stray ex_*.txt files it had not written and correctly ignored them, but relying on that is fragile. Give each parallel worker its own namespace (notes_A.jsonl, notes_B.jsonl, or a per-agent subdirectory) in the launch prompt, and have the parent merge and dedupe afterwards rather than letting workers read each other's scratch.
