Skip to content

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

Closed as not planned

Description

@SipengXie2024

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)

Activity

  1. Butanium commented on Mar 25, 2026

    @Butanium

    +1 — the Agent tool's model parameter only accepts "sonnet", "opus", or "haiku" with no way to specify context window variants like opus[1m]. This would be very useful for teammates handling complex tasks.

    🤖 Generated with Claude Code

  2. added
    stale
    on Apr 10, 2026
  3. cyugao commented on Apr 19, 2026

    @cyugao

    I encountered the same issue and share the frustration. It responded with

    The Agent tool's model parameter only accepts the enum sonnet/opus/haiku (aliases that map to current-gen models — sonnet → Claude Sonnet 4.6). I can't literally pass claude-sonnet-4-6; it would fail schema validation. Proceeding with sonnet, which resolves to the same model.

    It was actually using Sonnet 4.5. Despite trying several different prompting strategies to address this discrepancy, I haven’t been able to bypass the tool's internal logic.

  4. removed
    stale
    on Apr 19, 2026
  5. added
    stale
    on May 12, 2026
  6. github-actions commented on May 26, 2026

    @github-actions

    Closing for now — inactive for too long. Please open a new issue if this is still relevant.

  7. github-actions commented on Jul 22, 2026

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  8. locked as resolved and limited conversation to collaborators on Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:agentsenhancementstale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions