Skills with model: field fail with 'Rate limit reached' when model differs from main session

Status Fixed / completed
Reported on v2.1.76
Maintainer reply None cached
Activity 3 comments · opened Mar 16, 2026 · closed Mar 16, 2026

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

  1. Start a Claude Code session (main session runs on e.g. Opus 4.6)
  2. Create a minimal skill:
---
name: test-skill
description: Minimal test
model: sonnet[1m]
allowed-tools: Bash, Read
---

Just respond with "OK".
  1. Run /test-skill
  2. 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: fork to 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)

View original on GitHub ↗

3 Comments

github-actions[bot] · 7 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/34296
  2. https://github.com/anthropics/claude-code/issues/34665
  3. https://github.com/anthropics/claude-code/issues/32841

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

baswenneker · 7 months ago

Closing as duplicate of #34296 — same root cause: skill model: frontmatter triggers 429 on 2.1.76 when parent session uses opus[1m].

github-actions[bot] · 6 months ago

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.