Benchmark: Persistent Bash Breaks AI Agent Spatial Awareness
_philschmid · x · 2026-07-16
Phil Schmid shares an engineering evaluation of AI coding agent toolchains, comparing two Bash execution modes: persistent (preserving directory and environment variables) vs stateless reset.
- Pitfall of persistence: Although persistence sounds natural, when the agent switches directories in Bash (e.g., cd app/data) and later calls tools like Write that require absolute paths, path confusion arises and causes errors.
- System prompt adjustment: Removing the working directory from the system prompt alleviates path confusion but causes the agent to completely lose awareness of its current location, resulting in a drop in overall benchmark performance.
The conclusion is that under current agent frameworks, simple Bash persistence tends to break spatial consistency across multi-tool coordination.
More from coding & agent
- Claude Code skill uses 10 Markdown rules to make outputs ADHD-friendly — alex_verem · 2026-07-22
- A better path to agent autonomy is running waves, finding friction, and iterating — JnBrymn · 2026-07-22
- Coding agents are heading toward an AI-writes, AI-reviews, human-approves workflow — aftahi_ai · 2026-07-22
- oMLX 0.5.2 adds Mac menu-bar stats, low-bit decode kernels, and faster downloads — awnihannun · 2026-07-22
- GitHub review bot hits its PR limit and forces a 39-minute cooldown — DanielLockyer · 2026-07-22
- Max reasoning effort appears to be mobile-only in Codex Remote, not desktop — GabGarrett · 2026-07-22