Skills with model: field fail with 'Rate limit reached' when model differs from main session
Bug Description
Skills that specify a model: field in their SKILL.md frontmatter fail immediately with API Error: Rate limit reached when the specified model differs from the main session's model — even when the user has plenty of token capacity and rate limit headroom.
Reproduction Steps
- Start a Claude Code session (main session runs on e.g. Opus 4.6)
- Create a minimal skill:
---
name: test-skill
description: Minimal test
model: sonnet[1m]
allowed-tools: Bash, Read
---
Just respond with "OK".
- Run
/test-skill - Result:
API Error: Rate limit reached
What Was Tested
| Configuration | Result |
|---|---|
| model: sonnet[1m], no context: fork | Rate limit error |
| model: haiku, no context: fork | Rate limit error |
| model: haiku, with context: fork | Works |
| model: sonnet, with context: fork | Works |
| No model: field (inherits main session) | Works |
| model: haiku + context: fork (e.g. fwd:commit) | Works |
Key Observations
- The error occurs regardless of which model is specified — it's the model switch itself that fails, not a specific model's rate limit
- Adding
context: forkto the skill (which runs it as an isolated subagent) resolves the issue - The user's plan (Max 20x) has generous rate limits and regular prompts work fine
- Skills that already had
context: fork+ a different model were never affected
Expected Behavior
Skills with a model: field should work regardless of whether context: fork is set. The inline model switch should either work correctly or fall back gracefully.
Environment
- Claude Code version: 2.1.76
- Plan: Max 20x
- Main session model: Opus 4.6
- Platform: macOS (Darwin 25.3.0)
3 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Closing as duplicate of #34296 — same root cause: skill
model:frontmatter triggers 429 on 2.1.76 when parent session uses opus[1m].This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.