Agent tool model parameter should support context window variants (e.g. opus[1m])

Resolved 💬 3 comments Opened Mar 19, 2026 by SipengXie2024 Closed May 26, 2026

Problem

When the parent session runs on claude-opus-4-6[1m] (1M context), spawned agents/teammates via the Agent tool get the default 200K context version instead of inheriting the 1M variant.

The Agent tool's model parameter only accepts the enum "sonnet" | "opus" | "haiku". There is no way to specify the [1m] context window variant. Setting model: "opus" gives the 200K version.

Expected Behavior

Either:

  1. Add context variants to the enum — e.g., "opus[1m]" or "opus-1m" as valid values
  2. Inherit the parent's exact model ID — if the parent session uses claude-opus-4-6[1m], spawned agents should automatically use the same model ID including the context window suffix
  3. Accept full model IDs — allow the model parameter to accept strings like "claude-opus-4-6[1m]" in addition to the short aliases

Use Case

When running Agent Teams (multiple persistent teammates working in parallel), each teammate gets its own context window. For complex tasks (large codebases, multi-file implementations), the 1M context is essential for teammates to maintain sufficient context. Currently there is no way to ensure teammates use the 1M variant.

Environment

  • Claude Code CLI
  • Model: claude-opus-4-6[1m]
  • Feature: Agent Teams (CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1)

View original on GitHub ↗

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