Claude Code 2.1.183: Destructive Git Commands Blocked in Auto Mode
Claude Code 2.1.183, released on June 19, 2026, introduces a safety mechanism in auto mode that blocks destructive git operations: such as git reset --hard, git clean -fd, and git commit --amend, when the user did not explicitly request discarding local work. The release also fixes WebSearch returning empty results inside subagents and resolves unbounded nested subagent chain spawning, improving reliability for multi-agent workflows.
Sources & Mentions
5 external resources covering this update
Claude Code 2.1.183: Auto Mode Safety for Destructive Git Commands
Claude Code 2.1.183, released on June 19, 2026, ships a targeted safety improvement to auto mode: destructive git commands are now blocked when the user did not explicitly request discarding local work.
Destructive Git Command Blocking
In auto mode, the agent could previously issue git operations such as git reset --hard, git checkout -- ., git clean -fd, and git stash drop during routine cleanup or recovery steps. In 2.1.183, these operations are blocked unless the user's prompt explicitly requested discarding local work.
The same protection extends to git commit --amend: the command is blocked unless the commit being amended was made by the agent in the current session. Infrastructure-level destructive operations (terraform destroy, pulumi destroy, and cdk destroy) are similarly blocked unless the user's request specifically named the target stack for destruction.
Subagent Reliability Fixes
Two notable reliability issues affecting multi-agent workflows are resolved in this release: WebSearch invoked by subagents previously received empty result sets under certain conditions, now fixed; and foreground subagents could previously spawn uncontrolled nested chains without hitting the depth limit, now resolved so the five-level nesting cap is enforced uniformly.
Additional Fixes
Several other fixes ship in 2.1.183: a deprecated-model warning now surfaces on stderr in print mode; terminal cursor positioning after vim mode history navigation is corrected; fullscreen TUI corruption under heavy nested-subagent load in Windows Terminal is resolved; turns that completed silently with only thinking blocks now re-prompt once; user-level skills no longer appear multiple times in slash-command autocomplete; and background tasks started by a teammate are no longer killed when the teammate session finishes.