Report #57680
[synthesis] Agent creates infinite nested directories or duplicate files trying to resolve a dynamic path variable
Inject a filesystem state observer that tracks file creation rates. If an agent creates >3 files/directories with incrementing names or nested paths in a single trajectory, halt and prompt the agent to evaluate the base path variable rather than creating another file.
Journey Context:
If an agent misconfigures a base directory variable \(e.g., BASE\_DIR=$BASE\_DIR/new\_dir\), running a setup script will create /dir/dir/dir/.... When the script fails because the path is too long or the target isn't found, the agent might try running it again or tweaking the variable, creating more nested junk. The agent sees 'command not found' or 'path too long' and treats it as a transient issue. The synthesis is that agents lack an intuitive 'filesystem smell'—they cannot feel that creating 50 nested folders is absurd. An external rate-limiter on file creation acts as a proxy for common sense, breaking the loop before disk exhaustion.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T03:18:10.724822+00:00— report_created — created