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
- Enable Extra Usage via
/extra-usage in a Claude Code session.
- Define a subagent in
.claude/agents/my-agent.md with model: opus in the frontmatter.
- Invoke a skill or command that spawns that subagent via the
Agent tool.
- 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.
Bug Report
Summary
When a subagent is defined with
model: opusin its frontmatter and gets spawned via theAgenttool, it throws the following error even when Extra Usage is already enabled in the parent session:Environment
/core:create-pr) that internally spawns anAgentwithmodel: opusSteps to Reproduce
/extra-usagein a Claude Code session..claude/agents/my-agent.mdwithmodel: opusin the frontmatter.Agenttool.API Error: Extra usage is required for 1M contextExpected 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: opusfail 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: opustomodel: sonnetresolves 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.