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

Resolved 💬 3 comments Opened Mar 16, 2026 by baswenneker 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 ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗