[BUG] Slash commands with Skill() in allowed-tools trigger rate limit on minimal diffs (regression)
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code
What's Wrong?
Custom commands (.claude/commands/*.md) that use model: sonnet override in their frontmatter consistently hit API Error: Rate limit reached, even when usage is minimal and the actual diff is trivial (1 file, 1 line changed). The same operations work fine as normal messages in the conversation. This was working perfectly until recently — no changes were made to the commands or skills.
What Should Happen?
The command should execute normally without hitting rate limits, as it did before.
Steps to Reproduce
- Create a command
.claude/commands/commit.mdwithmodel: sonnetin the frontmatter - Stage a minimal change (1 file, 1 line)
- Run
/commit - Get
API Error: Rate limit reached
Testing performed
| Test | Result |
|------|--------|
| model: sonnet in frontmatter | ❌ Rate limit error |
| model: haiku in frontmatter | ✅ Works |
| No model: (uses session model, Opus 4.6) | ✅ Works |
The Skill() reference in allowed-tools is NOT the problem — commands without model: sonnet but with Skill() work fine.
Usage is nowhere near limits — at the time of failure, session usage was at 12%, weekly "all models" at 15%, and weekly Sonnet at just 2%.
Claude Model
Other
Is this a regression?
Yes, this worked in a previous version
Claude Code Version
2.1.76
Platform
Other (Claude Team subscription)
Operating System
macOS
Terminal/Shell
Other (Ghostty)
Additional Information
- Subscription: Claude Team
- Session model: Opus 4.6
model: sonnetin command frontmatter triggers the rate limit error, regardless of actual usage. Usingmodel: haikuor nomodel:(inheriting session model Opus) works perfectly.
This issue has 9 comments on GitHub. Read the full discussion on GitHub ↗