Where does the bug appear (feature/product)?
Cursor CLI
Describe the Bug
When running the headless Cursor CLI (agent) with --model gpt-5.5-medium or gpt-5.5-high on long, real-world coding tasks (~10–18 minutes), the agent completes successfully (opens MRs, emits structured result in the chat session DB), but the CLI process exits with code 1, stdout is empty, and stderr reports:
S: AI Model Not Found Model name is not valid: "gpt-5.5"
Note the error references the base slug gpt-5.5, not the tier slug passed on the command line (gpt-5.5-medium / gpt-5.5-high). Short smoke tests (~15s) with the same flags exit 0 and print the expected stdout sentinel.
This looks like a post-run finalization bug (model name normalization to an invalid slug) rather than invalid model configuration.
Steps to Reproduce
- Install Cursor CLI (
agent), authenticate withCURSOR_API_KEY. - Use a real multi-file repo worktree (we use Android/iOS app repos; ~900s tier budget).
- Run headless agent with a long fix prompt and GPT-5.5 tier:
agent -p --force --approve-mcps --trust \
--workspace /path/to/repo-worktree \
--output-format text \
--model gpt-5.5-medium \
'<long coding task prompt; agent should open MR and print final line AUTO_TRIAGE_RESULT={...}>'
- Wait for run to complete (~15–18 minutes in our cases).
Expected Behavior
A non-zero exit code would be great!
Operating System
MacOS
Version Information
| Item | Value |
|---|---|
| OS | macOS 25.5.0 (darwin) |
Cursor CLI (agent) |
2026.05.16-0338208 (/Users/nels/.local/bin/agent) |
| Invocation | Headless: -p --force --approve-mcps --trust --workspace <path> --output-format text --model <tier> |
| Models affected | gpt-5.5-medium, gpt-5.5-high (listed by agent models) |
| Models OK (control) | composer-2.5-fast on same invocation shape |
For AI issues: which model did you use?
Appears with GPT models and Clause models
Does this stop you from using Cursor
Sometimes - I can sometimes use Cursor