claude-code - 💡(How to fix) Fix Skill subprocess inherits 1M context flag but switches model, fails with 'Extra usage is required for 1M context' [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#55694Fetched 2026-05-03 04:46:55
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×4cross-referenced ×1

Invoking a skill from a session running on claude-opus-4-7[1m] fails with API Error: Extra usage is required for 1M context because the skill subprocess switches to a different model (claude-sonnet-4-6) while still propagating the parent session's 1M-context flag. Sonnet 4.6 with 1M context requires --extra-usage to be enabled separately from Opus 4.7's entitlement, so the skill call fails before producing any output.

Error Message

Invoking a skill from a session running on claude-opus-4-7[1m] fails with API Error: Extra usage is required for 1M context because the skill subprocess switches to a different model (claude-sonnet-4-6) while still propagating the parent session's 1M-context flag. Sonnet 4.6 with 1M context requires --extra-usage to be enabled separately from Opus 4.7's entitlement, so the skill call fails before producing any output. 4. Observe the immediate failure: API Error: Extra usage is required for 1M context · run /extra-usage to enable, or /model to switch to standard context.

  • A pre-flight entitlement check emits a typed local error before the API call is attempted, with a clear remediation hint.
  1. Pre-flight the entitlement check. Before the API call, surface a deterministic local error with both options (/extra-usage or /model) instead of consuming a failed request.

Root Cause

Invoking a skill from a session running on claude-opus-4-7[1m] fails with API Error: Extra usage is required for 1M context because the skill subprocess switches to a different model (claude-sonnet-4-6) while still propagating the parent session's 1M-context flag. Sonnet 4.6 with 1M context requires --extra-usage to be enabled separately from Opus 4.7's entitlement, so the skill call fails before producing any output.

Fix Action

Workaround

Run skills from a session that is not on [1m], or enable --extra-usage for the skill's target model.

RAW_BUFFERClick to expand / collapse

Summary

Invoking a skill from a session running on claude-opus-4-7[1m] fails with API Error: Extra usage is required for 1M context because the skill subprocess switches to a different model (claude-sonnet-4-6) while still propagating the parent session's 1M-context flag. Sonnet 4.6 with 1M context requires --extra-usage to be enabled separately from Opus 4.7's entitlement, so the skill call fails before producing any output.

Repro

  1. Start claude with model set to Opus 4.7 1M context.
  2. Invoke any skill via the Skill tool (e.g., a built-in or user-installed skill).
  3. Observe the loader line: Successfully loaded skill · 4 tools allowed · claude-sonnet-4-6.
  4. Observe the immediate failure: API Error: Extra usage is required for 1M context · run /extra-usage to enable, or /model to switch to standard context.

Expected

One of:

  • The skill subprocess inherits the parent session's model (Opus 4.7), or
  • The skill subprocess uses Sonnet 4.6 with that model's standard context window (drops the [1m] suffix when the entitlement is not present), or
  • A pre-flight entitlement check emits a typed local error before the API call is attempted, with a clear remediation hint.

Actual

The skill subprocess targets claude-sonnet-4-6 but propagates the [1m] context-window flag from the parent session, then fails on the first model call. No skill output is produced and the parent conversation has to handle the failure.

Impact

Any user on Opus 4.7 1M who invokes a skill cannot run that skill until they manually enable extra usage on the alternate model, or switch off 1M context on the parent. This makes skills unreliable on the higher-tier session, which is exactly where users are most likely to invoke them (long-running planning, design review, etc.).

Suggested fixes (in order of preference)

  1. Drop [1m] when the target model lacks entitlement. Use the target model's standard context. Cheapest, no user friction.
  2. Honor parent model in skill subprocess unless the skill frontmatter pins one. Avoids the model switch entirely for users on a paid tier.
  3. Pre-flight the entitlement check. Before the API call, surface a deterministic local error with both options (/extra-usage or /model) instead of consuming a failed request.

Workaround

Run skills from a session that is not on [1m], or enable --extra-usage for the skill's target model.

Environment

  • Model: claude-opus-4-7[1m] (parent session)
  • Skill subprocess model (per loader): claude-sonnet-4-6
  • Platform: Linux (Ubuntu, kernel 6.17), zsh
  • Claude Code CLI version: latest stable as of 2026-05-03

extent analysis

TL;DR

Drop the [1m] context-window flag when the target model lacks entitlement to prevent the API error.

Guidance

  • Verify the skill subprocess model and its entitlements to ensure compatibility with the parent session's model.
  • Consider implementing a pre-flight entitlement check to surface a deterministic local error with remediation hints before the API call.
  • To mitigate the issue, users can run skills from a session without the [1m] context or enable --extra-usage for the skill's target model.
  • Review the suggested fixes, prioritizing dropping the [1m] flag when the target model lacks entitlement, to determine the best approach for the specific use case.

Example

No code snippet is provided as the issue is more related to configuration and entitlements rather than code.

Notes

The issue is specific to the interaction between the claude-opus-4-7[1m] model and the claude-sonnet-4-6 model used by the skill subprocess. The suggested fixes and workarounds are intended to address this specific scenario.

Recommendation

Apply the workaround by running skills from a session without the [1m] context or enabling --extra-usage for the skill's target model, as this provides a immediate solution to the problem without requiring changes to the underlying system.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Skill subprocess inherits 1M context flag but switches model, fails with 'Extra usage is required for 1M context' [1 participants]