Skip to content

Claude Opus 5.5: 32k maxOutputTokens makes --reasoning-effort max/xhigh return empty turns on long tasks; auto-continue bills each empty turn #5149

Open

Description

@Drxdre88

Summary

With claude-opus-5.5, every reply is capped at 32,000 output tokens (maxOutputTokens: 32000 in session.usage_record), and hidden reasoning counts against that cap. At --reasoning-effort max (and often xhigh), Opus spends the whole 32k on reasoning for any non-trivial task. The turn then ends with no assistant content. The CLI auto-continues, hits the same wall again, and bills every turn. In headless mode you pay for roughly three full 32k reasoning turns and get an empty answer.

Anthropic documents 128k max output for Opus 5.5, so the effort levels the CLI offers (max, xhigh) are effectively unusable for long-form work inside Copilot.

Environment

  • Copilot CLI 1.0.98, Windows 11, usage-based billing
  • Model claude-opus-5.5 (Copilot provider, not BYOK)

Repro

Pipe a ~20k-token prompt asking for a ~2,000-word structured document (a planning doc) on stdin:

copilot --model claude-opus-5.5 --reasoning-effort max --no-ask-user --no-custom-instructions --available-tools=view --output-format json

Observed (from ~/.copilot/session-state/<id>/events.jsonl)

  • Each turn records session.usage_record with outputTokens: 32000, reasoningTokens: 32000, maxOutputTokens: 32000.
  • assistant.turn_end arrives with no assistant.message content.
  • The CLI starts another turn (initiator: "agent") and the same thing happens. After 3 turns the session ends with assistant.message content: "".
  • Billed: about 200 AI credits for zero output. --reasoning-effort xhigh behaved the same on 4 of 5 long tasks. high completed the same tasks normally.
  • Across ~65,000 Opus 5.5 calls logged locally this month, outputTokens never exceeded 32,000, and maxOutputTokens was always 32000.

Short tasks (e.g. a ~300-word reply) usually complete at xhigh, but can still stall at max.

Expected (any of these would fix it)

  1. Allow Opus 5.5's documented 128k output, at least when xhigh/max is selected.
  2. Or reserve part of maxOutputTokens for visible output, so reasoning cannot consume all of it.
  3. Or, when a turn ends with reasoning = max output and no content, fail fast with a clear error instead of auto-continuing and billing repeated identical turns.
  4. Document per-model output caps, and which reasoning efforts are practical under them.

Impact

Headless/agent workflows that pin Opus at max silently burn credits and return nothing. We now detect the stalled turn ourselves, kill the process and step down to a lower effort. That workaround shouldn't be needed.

Activity

  1. added
    area:modelsModel selection, availability, switching, rate limits, and model-specific behavior
    area:non-interactiveNon-interactive mode (-p), CI/CD, ACP protocol, and headless automation
    on Oct 15, 2026
  2. samvallad33 commented on Oct 20, 2026

    @samvallad33

    Hi Drxdre88,

    How many credits had gone into those empty max effort turns before you started killing the process yourself?

    I hit the same kind of problem where an agent kept running a command it had been allowed once. If that is what happened on your end, would you want to see something combining memory, authority, and security so an agent can't keep running past a limit nobody set?

    If you want to try it on one of your headless Opus runs:
    npx @vestige/init
    It holds each run to a budget you choose and keeps a hash-chained receipt of every decision, so repeated empty turns can't quietly stack up on the bill again.

    Sam

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:modelsModel selection, availability, switching, rate limits, and model-specific behaviorarea:non-interactiveNon-interactive mode (-p), CI/CD, ACP protocol, and headless automation

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions