Skill model override inherits session's 1M context window
Problem
Custom skills with model: sonnet in frontmatter inherit the session's 1M context window instead of using the model's default context. This causes skills to fail with "Extra usage is required for 1M context" even though the skill explicitly requests a cheaper model.
Steps to reproduce
- Start Claude Code with Opus 4.6 (1M context) — do NOT enable extra usage
- Create a skill at
.claude/skills/commit/SKILL.mdwithmodel: sonnetin frontmatter - Invoke
/commit
Expected: Skill runs with Sonnet at standard context (no extra usage needed)
Actual: Error: "API Error: Extra usage is required for 1M context · run /extra-usage to enable, or /model to switch to standard context"
Skill frontmatter
---
name: commit
description: Analyze all uncommitted changes
model: sonnet
user-invocable: true
allowed-tools: Bash, Read, Edit, Write, Grep, Glob
---
Suggestion
The model field in skill frontmatter should fully override the session's model config, including context window — not just the model family. Alternatively, support an explicit context window option like model: sonnet[200k] or a separate context field.
Skills like /commit are designed to be quick and don't need 1M context. Users should be able to use cheaper models for utility skills without being gated by the session's context window setting.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗