claude-code - 💡(How to fix) Fix [Bug] Model classifier rejects claude-opus-4-7 as invalid model [1 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#51945Fetched 2026-04-23 07:40:42
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×4

Root Cause

● A hook blocked the commit because it rejects Co-Authored-By: Claude Opus 4.7 (1M context) as misleading attribution — the policy flags that model name as non-existent. Prior commits in this repo (including d1f8fa3, 81d1c77, 22dd904) used that exact footer, so there's an inconsistency between past practice and the current hook policy.

Code Example

Two logical changes — I'll split into two commits matching the project's
  commit style.

 Bash(git add src/Playback/Playback.cs test/PlaybackTests.cs && git commit -m
       "$(cat <<'EOF'
      Enable mpv hwdec and expose the selected backend…)
  ⎿  Denied by auto mode classifier ∙ /feedback if incorrect

A hook blocked the commit because it rejects Co-Authored-By: Claude Opus 4.7
   (1M context) as misleading attribution — the policy flags that model name
  as non-existent. Prior commits in this repo (including d1f8fa3, 81d1c77,
  22dd904) used that exact footer, so there's an inconsistency between past
  practice and the current hook policy.

  How would you like me to attribute? Options:
  1. Drop the Co-Authored-By line entirely.
  2. Use a generic Co-Authored-By: Claude <noreply@anthropic.com>.
  3. Something else — your call.
RAW_BUFFERClick to expand / collapse

Bug Description Your own classifier doesn't believe Opus 4.7 is real.

Environment Info

  • Platform: linux
  • Terminal: konsole
  • Version: 2.1.117
  • Feedback ID: 4cf0fe6c-84ba-4f6b-accc-f1146c8e1ebb

Text:

Two logical changes — I'll split into two commits matching the project's
  commit style.

● Bash(git add src/Playback/Playback.cs test/PlaybackTests.cs && git commit -m
       "$(cat <<'EOF'
      Enable mpv hwdec and expose the selected backend…)
  ⎿  Denied by auto mode classifier ∙ /feedback if incorrect

● A hook blocked the commit because it rejects Co-Authored-By: Claude Opus 4.7
   (1M context) as misleading attribution — the policy flags that model name
  as non-existent. Prior commits in this repo (including d1f8fa3, 81d1c77,
  22dd904) used that exact footer, so there's an inconsistency between past
  practice and the current hook policy.

  How would you like me to attribute? Options:
  1. Drop the Co-Authored-By line entirely.
  2. Use a generic Co-Authored-By: Claude <[email protected]>.
  3. Something else — your call.

Note: This is rare, I'd say it trips over its own feet maybe one time out of twenty.

extent analysis

TL;DR

The issue can be resolved by updating the Co-Authored-By line to a format that the auto mode classifier recognizes as valid.

Guidance

  • The classifier is flagging "Co-Authored-By: Claude Opus 4.7" as misleading attribution, suggesting that "Opus 4.7" is not recognized as a valid model name.
  • To resolve the issue, consider using a generic Co-Authored-By line, such as "Co-Authored-By: Claude [email protected]", as suggested in the issue.
  • Review past commits in the repository to ensure consistency in attribution formatting.
  • If the issue persists, consider dropping the Co-Authored-By line entirely or exploring alternative attribution formats.

Notes

The issue seems to be related to the specific formatting of the Co-Authored-By line, and updating it to a recognized format should resolve the issue. However, it's unclear why the classifier is flagging "Opus 4.7" as non-existent, despite its use in prior commits.

Recommendation

Apply workaround: Use a generic Co-Authored-By line, such as "Co-Authored-By: Claude [email protected]", to avoid the classifier flagging the attribution as misleading.

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 - 💡(How to fix) Fix [Bug] Model classifier rejects claude-opus-4-7 as invalid model [1 participants]