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
- Anthropic researcher: 99% of engineers now run swarms of 300+ self-improving agents — AlishaOutridge · 2026-09-11
- Gergely Orosz: Shipping 10x PRs With AI Agents, Sites Fill With Small Regressions — ducha_aiki · 2026-09-11
- Same Echo Maze prompt, three frontier models: all passed visually but shipped the same hidden bug — eyishazyer · 2026-09-11
- Astra storyboards plus Minimax H3 per-shot generation boost video success rates — Hailuo_AI · 2026-09-11
- Codex tip: use Sol with Astra and Luna sub-agents to save usage — pvncher · 2026-09-11
- agents-best-practices: a provider-neutral Agent Skill for designing and auditing agentic harnesses — tom_doerr · 2026-09-11