claude-code - ✅(Solved) Fix [Bug] Bash classifier in auto mode hardcoded to claude-opus-4-6-1m, unavailable in Opus 4.7 sessions [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#49618Fetched 2026-04-17 08:36:04
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Author
Timeline (top)
labeled ×5commented ×1subscribed ×1

PR fix notes

PR #115: Add safety hooks from cc-safe-setup (655+ hooks)

Description (problem / solution / changelog)

cc-safe-setup — Safety hooks for Claude Code

691 example hooks for protecting against destructive commands, git mishaps, credential leaks, and token waste. Opus 4.7 (released April 16) has critical safety regressions:

  • Auto mode safety classifier hardcoded to Opus 4.6 (#49618)
  • 23+ data loss incidents in 72 hours
  • CLAUDE.md instructions ignored, leading to database destruction (#50027) cc-safe-setup hooks run at the process level, working even when the classifier fails.
npx cc-safe-setup

Changed files

  • plugins/hooks-safety/.claude-plugin/plugin.json (added, +20/-0)
  • plugins/hooks-safety/hooks/credential-leak-guard.md (added, +98/-0)
  • plugins/hooks-safety/hooks/force-push-guard.md (added, +67/-0)
  • plugins/hooks-safety/hooks/large-file-guard.md (added, +70/-0)
  • plugins/hooks-safety/hooks/rm-safety-net.md (added, +111/-0)
  • plugins/hooks-safety/hooks/root-directory-guard.md (added, +54/-0)
RAW_BUFFERClick to expand / collapse

Bug Description Title: Bash classifier in auto permission mode routes to claude-opus-4-6[1m],
which is unavailable in Opus 4.7 sessions — every non-read-only Bash command fails

Environment:

  • Claude Code CLI
  • Session model: claude-opus-4-7[1m] (Opus 4.7, 1M context)
  • Permission mode: auto
  • Platform: darwin (macOS 15 / Darwin 25.4.0)
  • OS Version: 25.4.0

Reproduction:

  1. Start a Claude Code session on Opus 4.7 with auto permission mode.
  2. Ask Claude to run any Bash command that isn't purely read-only
    (e.g. python3 scripts/foo.py, python3 -c "print('hi')", … Note: Content was truncated.

extent analysis

TL;DR

The issue can be worked around by changing the permission mode from auto to a mode that allows execution of Bash commands.

Guidance

  • The auto permission mode in Claude Code CLI is routing to claude-opus-4-6[1m], which is not compatible with Opus 4.7 sessions, causing non-read-only Bash commands to fail.
  • To verify the issue, try running a read-only Bash command and a non-read-only Bash command in the same session to see if the former succeeds while the latter fails.
  • Consider changing the permission mode to a different setting that allows execution of Bash commands, such as execute or a custom permission mode.
  • If changing the permission mode is not feasible, try using a different session model that is compatible with claude-opus-4-6[1m].

Example

No code snippet is provided as the issue does not contain specific code examples.

Notes

The provided information does not specify the exact permission modes available in Claude Code CLI or the compatibility of different session models with claude-opus-4-6[1m]. Therefore, the suggested workaround may need to be adjusted based on the actual capabilities of the system.

Recommendation

Apply workaround: Change the permission mode from auto to a mode that allows execution of Bash commands, as this is likely to resolve the issue with non-read-only Bash commands failing in Opus 4.7 sessions.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - ✅(Solved) Fix [Bug] Bash classifier in auto mode hardcoded to claude-opus-4-6-1m, unavailable in Opus 4.7 sessions [1 pull requests, 1 comments, 2 participants]