AI article
Why Claude Code keeps writing shell commands that fail on your Mac
Community description: Disclaimer: AI helped me write this since I am not that good with words :) Claude wrote this,...
Dev.to | Sep 20, 2026 | Morten Larsen
Automated excerpt
Claude Code's Bash tool runs your login shell. Claude — like nearly every shell example ever written — assumes GNU. sed -i is the one worth internalising. Claude Code captures a shell snapshot when a session starts and replays it before every Bash call.
Selected automatically from source text; not independently written or fact-checked. Read the original for full context.