Where does the bug appear (feature/product)?
Cursor CLI
Describe the Bug
On the latest CLI (2026.09.18-9a7762b, Ultra, already up to date), --help and the --list-models tip still tell you to pass quoted bracket overrides:
–model ‘claude-opus-4-8[context=1m,effort=high,fast=false]’
Using that syntax with --print is rejected before the model starts. Same result with claude-sonnet-5-high[context=1m].
The allowlist only has flat ids. --list-models labels claude-sonnet-5-high as “Claude Sonnet 5 1M”, but a successful --print session on that id reports: Claude Sonnet 5 300K High No Thinking.
Related older threads:
The second thread was marked fixed on 9 Sep 2026, with the note that you need context=1m in the --model string. On this build that string is not in the allowlist, so --print never gets that far.
Steps to Reproduce
- agent --version → 2026.09.18-9a7762b
- agent --help still shows the bracket example above. agent --list-models ends with the same tip.
- Run:
agent --print --output-format stream-json --trust --sandbox enabled --model ‘claude-sonnet-5-high[context=1m]’ --workspace /tmp/any – ‘Return {“ok”:true} only.’
- Repeat with the help example: --model ‘claude-opus-4-8[context=1m,effort=high,fast=false]’
- Then run the same command with the flat id --model claude-sonnet-5-high and inspect the first system/init event.
Expected Behavior
Either --print accepts the documented ‘…[context=1m,…]’ form and actually opens a 1M window, or --help / --list-models stop advertising that form and do not label a 300K session as 1M.
Operating System
MacOS
Version Information
CLI Version 2026.09.18-9a7762b
Latest 2026.09.18-9a7762b (up to date)
Subscription Tier Ultra
OS darwin (arm64)
Shell zsh
For AI issues: which model did you use?
claude-sonnet-5-high (flat id). Documented --model ‘claude-sonnet-5-high[context=1m]’ and help example ‘claude-opus-4-8[context=1m,effort=high,fast=false]’ are rejected.
For AI issues: add Request ID with privacy disabled
1e88b374-0604-4859-bb06-9ea907e5fa47 (successful --print on flat claude-sonnet-5-high; the rejected bracket calls never start, so they have no request id)
Additional Information
Actual results from this machine just now:
Bracket forms: exit 1, empty stdout, stderr:
Cannot use this model: claude-sonnet-5-high[context=1m]. Available models: … claude-sonnet-5-high …
(no bracket ids, no bare claude-opus-4-8)
Same reject for the exact help example claude-opus-4-8[context=1m,effort=high,fast=false].
Flat id --print init event:
{“type”:“system”,“subtype”:“init”,“model”:“Claude Sonnet 5 300K High No Thinking”,…}
–list-models line for that id:
claude-sonnet-5-high - Claude Sonnet 5 1M
This is a headless --print gap. Interactive /model still has a Context 300K/1M control, but scripts cannot select 1M the way the help text describes.
Does this stop you from using Cursor
No - Cursor works, but with this issue