Cursor cli: thread resumed keeps "ask" mode

Where does the bug appear (feature/product)?

Cursor CLI

Describe the Bug

I’m calling the cursor cli with --mode ask. After that, when I --resume the same thread and don’t pass the --mode ask again I was expecting it not to be in that mode, but the agent is still saying that it cannot do the action because it’s in ask mode.

Given that there’s only --mode ask and --mode plan, I was either expecting that on a --resume without the --mode it’d go to “exec” mode or that there was a flag to --mode exec.

Or maybe I’m missing something? Is there some way to get out of ask mode in the agent cli or is this really a bug?

-- I know that in the cursor UI I can do it, but given I’m using the cli I can’t seem to get out of ask mode when resuming a thread.

Steps to Reproduce

agent --model auto --yolo --mode ask “How much is 1+1?”
agent --model auto --yolo --resume=…thread-id… “Write the result to a result.txt”

Expected Behavior

Agent should write 2 to result.txt. Instead it says:

I’m in Ask mode, so, I can’t create or modify files…

Operating System

Windows 10/11

Version Information

CLI Version 2026.05.16-0338208
Model Auto
Subscription Tier Pro
OS win32 (x64)
Terminal unknown
Shell cmd

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, this isn’t on your side. It’s a confirmed bug in the CLI.

In --resume mode it loads from the saved session SQLite, and without an explicit --mode override it doesn’t apply. Also, --mode only accepts plan and ask, so right now there’s no way to switch back to agent or exec via a flag. In interactive TUI mode it resets to the default when you switch sessions, but in headless CLI there’s no such reset.

The issue is already reported internally. Your case is the second confirmed report, I’ll add it to the ticket. No ETA for a fix yet.

There’s only one workaround: start a new session without --resume if you need agent mode. I’ll post an update in the thread when I have one.

Related to this, if the initial conversation invoked plan mode, which was then exited to auto-run to execute the plan, agent —resume is returning direct to plan mode, not to the execution (I can then prompt it to resume to where we were in the run, but this is clearly not intended behaviour)

Hey @mbr, it’s the same bug. The persisted mode (plan/ask) from SQLite isn’t getting reset when using --resume in the headless CLI because there’s no explicit override. It’s tracked in the same ticket, and I’ll add your case too. No ETA for the fix yet.

Same workaround: start a new session without --resume if you need exec or agent mode. I’ll post an update here once I have one.