Support fast mode in headless (-p) mode

Resolved 💬 2 comments Opened Feb 7, 2026 by ericbuess Closed Mar 5, 2026

Summary

Fast mode (/fast) provides ~2x throughput improvement in interactive sessions but has no effect in headless (-p) mode. There's no CLI flag to enable it for programmatic use.

Evidence

Benchmarked 500-word essay generation with Opus 4.6, 3 runs each, alternating:

| Mode | Avg tok/s |
|------|-----------|
| Interactive (fast OFF) | ~42 tok/s |
| Interactive (fast ON) | ~2x faster (wall time: 14.8s vs 6.9s) |
| Headless fastMode: true in settings | ~42 tok/s (no change) |
| Headless --betas fast-mode-2026-02-01 | ~41 tok/s (no change) |

The API requires both anthropic-beta: fast-mode-2026-02-01 header AND speed: "fast" in the request body. The CLI's --betas flag can set the header, but there's no --speed flag to set the request body parameter.

Request

Add one of:

  • --fast flag for claude -p mode
  • --speed fast CLI parameter
  • Have fastMode: true in settings actually apply to headless mode

Use Case

Autonomous agent systems (like CI/CD pipelines or orchestration tools) that spawn claude -p workers would benefit significantly from 2x throughput. Currently the only workaround is bypassing claude -p entirely and calling the Anthropic API directly, which loses the agent tool loop.

Environment

  • Claude Code (latest)
  • macOS, Opus 4.6
  • Using claude -p --model opus --output-format json

View original on GitHub ↗

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