CloudCodeTree LogoCloudCodeTree
AI NewsAbout
CloudCodeTree Logo
CloudCodeTree
  • AI News
  • About
← Back to AI News
Claude Code 2.1.183: Auto Mode Now Guards Against Destructive Git and IaC Commands

Claude Code 2.1.183: Auto Mode Now Guards Against Destructive Git and IaC Commands

Chris Harper

2 min read

Jun 19, 2026 · 21:07 UTC

AI
Workflow
Claude Code
Best Practices

TL;DR: Claude Code 2.1.183 (June 19) blocks destructive git and IaC commands in auto mode by default — no more accidental git reset --hard or terraform destroy unless you explicitly asked.

The June 19 release ships a safety guard that prevents a painful category of accidents when Claude Code runs autonomously.

What's now blocked in auto mode (unless you ask):

  • git reset --hard, git checkout -- ., git clean -fd, git stash drop — blocked when you didn't ask to discard local work
  • git commit --amend — blocked when the commit being amended wasn't made by the agent this session
  • terraform destroy, pulumi destroy, cdk destroy — blocked unless you named the specific stack

These blockers apply in auto mode only. Interactive sessions still prompt as before.

Three other updates worth knowing:

Model deprecation warnings. Claude Code now prints a stderr notice when the model in your config (or in agent frontmatter) has been silently updated to a newer version. No more wondering why behaviour changed.

attribution.sessionUrl setting. Add attribution.sessionUrl: false to your project's .claude/settings.json to strip the claude.ai/code/session/… link from commit messages and PRs generated in web and Remote Control sessions — useful for cleaner commit history in enterprise repos.

/config --help. Run it from the prompt to get a full list of every supported key=value shorthand. No more digging through docs to remember whether the key is autoMode or auto_mode.

Sources: Claude Code changelog v2.1.183 — code.claude.com, Releasebot Claude Code June 2026