claude-code - 💡(How to fix) Fix Subagent spawned with 'model: opus' fails with '1M context requires extra usage' even when Extra Usage is enabled

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…

When a subagent is defined with model: opus in its frontmatter and gets spawned via the Agent tool, it throws the following error even when Extra Usage is already enabled in the parent session:

API Error: Extra usage is required for 1M context · run /extra-usage to enable, or /model to switch to standard context

Error Message

API Error: Extra usage is required for 1M context · run /extra-usage to enable, or /model to switch to standard context

Root Cause

When a subagent is defined with model: opus in its frontmatter and gets spawned via the Agent tool, it throws the following error even when Extra Usage is already enabled in the parent session:

API Error: Extra usage is required for 1M context · run /extra-usage to enable, or /model to switch to standard context

Fix Action

Workaround

Changing the subagent frontmatter from model: opus to model: sonnet resolves the issue, but this is a degradation in model quality for tasks that benefit from Opus.

Code Example

API Error: Extra usage is required for 1M context · run /extra-usage to enable, or /model to switch to standard context
RAW_BUFFERClick to expand / collapse

Bug Report

Summary

When a subagent is defined with model: opus in its frontmatter and gets spawned via the Agent tool, it throws the following error even when Extra Usage is already enabled in the parent session:

API Error: Extra usage is required for 1M context · run /extra-usage to enable, or /model to switch to standard context

Environment

  • Claude Code CLI
  • Plan: Max $200
  • Extra Usage: Enabled
  • Trigger: Invoking a slash command (e.g. /core:create-pr) that internally spawns an Agent with model: opus

Steps to Reproduce

  1. Enable Extra Usage via /extra-usage in a Claude Code session.
  2. Define a subagent in .claude/agents/my-agent.md with model: opus in the frontmatter.
  3. Invoke a skill or command that spawns that subagent via the Agent tool.
  4. Observe the error: API Error: Extra usage is required for 1M context

Expected Behavior

Spawned subagents should inherit the Extra Usage setting from the parent session, or Extra Usage should be applied at the account level regardless of which session (parent or child) makes the API call.

Actual Behavior

Subagents spawned with model: opus fail with the 1M context error even though Extra Usage is enabled in the parent session. The error suggests the child agent session does not inherit the Extra Usage setting.

Workaround

Changing the subagent frontmatter from model: opus to model: sonnet resolves the issue, but this is a degradation in model quality for tasks that benefit from Opus.

Additional Context

This appears to be a session inheritance issue — the Extra Usage flag enabled in the parent session is not being propagated to spawned subagent sessions. This is particularly disruptive for users who rely on agent compositions (skills/commands that orchestrate multiple subagents), as the error surfaces mid-workflow and is not immediately obvious to diagnose.

extent analysis

TL;DR

The issue can be worked around by enabling Extra Usage at the account level or ensuring it is inherited by subagent sessions, potentially by modifying the Agent tool to propagate the Extra Usage setting.

Guidance

  • Investigate the Agent tool's configuration and code to determine how it handles Extra Usage settings for spawned subagents, focusing on session inheritance.
  • Verify if there's an existing option or parameter in the Agent tool or Claude Code CLI to explicitly enable Extra Usage for subagents or to inherit settings from the parent session.
  • Consider modifying the subagent definition to include an explicit Extra Usage enablement directive, if such an option exists, to override the inheritance issue.
  • Review account-level settings to see if enabling Extra Usage at this level resolves the issue for all sessions, including subagent sessions.

Example

No code snippet is provided due to the lack of specific implementation details in the issue description.

Notes

The solution may depend on the specific implementation of the Agent tool and how it interacts with the Claude Code CLI and account settings. Further investigation into the tool's documentation and source code may be necessary.

Recommendation

Apply workaround: Modify the Agent tool or subagent definitions to ensure Extra Usage is enabled or inherited correctly, as directly upgrading to a fixed version is not mentioned as an option in the issue.

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 Subagent spawned with 'model: opus' fails with '1M context requires extra usage' even when Extra Usage is enabled