[BUG] API Error: Extra usage is required for 1M context when invoking skill with model: frontmatter from Opus 4.6 [1m] session on Max plan

Resolved 💬 11 comments Opened Apr 9, 2026 by 5thStreetBlues Closed Apr 13, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When running a skill that specifies model: sonnet in its frontmatter from an Opus 4.6 [1m] session on the Max (20x) plan, Claude Code immediately fails with:
API Error: Extra usage is required for 1M context · enable extra usage at claude.ai/settings/usage, or use --model to switch to standard context
This happens at 8% context usage (81.9k / 1m tokens) and well within plan limits (41% session, 10% weekly). The error is 100% reproducible on affected skills.
Environment

Claude Code version: 2.1.97
Interface: VS Code extension
Platform: Windows 11
Plan: Max (20x)
Session model: claude-opus-4-6[1m]

What Should Happen?

Expected Behavior
Skill executes normally. The Max (20x) plan includes 1M context for Opus 4.6. Skills with model: sonnet frontmatter should either run Sonnet without inheriting the 1M context window, or should be covered under the same Max plan entitlement.
Actual Behavior
Skill fails immediately with the extra usage error. The "You've hit your usage limit" banner also appears in the VS Code extension UI, which is misleading — usage limits are not actually reached.
Root Cause Hypothesis
When a skill specifies model: sonnet, Claude Code appears to resolve this to claude-sonnet-4-6[1m], inheriting the 1M context window from the parent session. Sonnet 4.6 [1m] may require extra usage on Max, whereas Opus 4.6 [1m] does not. The model should either not inherit the 1M context window when switching models via frontmatter, or Sonnet 4.6 [1m] should be covered under Max plan entitlement the same as Opus 4.6 [1m].
Additional Notes

Skills without a model: directive in frontmatter work correctly
Skills with model: sonnet fail 100% of the time
Context at time of error: claude-opus-4-6[1m] · 81.9k / 1m (8%)
Plan usage at time of error: 41% session, 10% weekly
Error occurs before any skill body logic runs
Possibly related to: #44117 (subagents + websearch extra usage error on Max)

Error Messages/Logs

API Error: Extra usage is required for 1M context · enable extra usage at claude.ai/settings/usage, or use --model to switch to standard context

Steps to Reproduce

Steps to Reproduce

Start a session on Max plan with default model claude-opus-4-6[1m]
Invoke any skill that has model: sonnet in its YAML frontmatter
Error fires immediately before any skill logic executes

Affected skill frontmatter example:
yaml---
name: ship
description: Commit, push, create PR, merge, and clean up the current feature branch
tools: Bash, Read, Glob
model: sonnet
permissionMode: bypassPermissions

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.97 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Other

Additional Information

I am running this using the VS Code extension

View original on GitHub ↗

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