Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Agent chat: Ask-mode write blocks after Implement despite Agent mode (mode desync)
Failure: Tool writes (Write / TodoWrite / Shell mutate) are rejected with Ask-mode policy text while the owner has selected or been told the chat is in Agent mode and has issued an explicit Implement / continue instruction after plan approval.
How we tested (evidence for the forum)
Approved a CreatePlan (Critical nested dogfood RCA) and clicked/issued Implement with instruction not to edit the plan file and to complete todos.
System reminder / UI indicated Agent mode at least once during the implement path.
Agent attempted Write to private journal and User-rule updates → hard fail: You are in ask mode and cannot run non read-only tools. Ask the user to switch to agent mode if edits are required.
Owner switched / re-confirmed Agent and sent Please continue → writes then succeeded (journal + User rules + docs).
Side observation: even when Agent stuck, mode can flip mid-thread without owner action, producing false confidence that Implement is allowed.Cursor Agent chat sometimes enforces Ask-mode tool policy (blocking Write/Shell/TodoWrite) even when the conversation is labeled Agent and the user has approved a plan and issued Implement / continue.
Symptom: tool results return exactly:
“You are in ask mode and cannot run non read-only tools. Ask the user to switch to agent mode if edits are required.”
This happens mid-execute on an approved plan, so Agent cannot land the work the owner just authorized. Switching mode again and sending “continue” eventually unblocked writes — which shows a desync between UI/session mode and the tool policy gate, not a user misunderstanding of Ask vs Agent.
Steps to Reproduce
- Open Cursor IDE (Windows Stable). Version: 3.12.30 (user setup), commit 63a2996a10d9e476b6c28e951dd7691d9c0cf480, 2026-07-21 build.
- In Agent chat, complete a CreatePlan / plan approval for a non-trivial implement (writes required).
- Start Implement (or equivalent “implement the plan” / Build) with the chat believed to be in Agent mode.
- Observe the agent attempt a Write (or other mutate tool).
- Note tool rejection with Ask-mode wording even though Agent was selected / previously active.
- Switch chat to Agent (or re-toggle) and send “continue” — writes then succeed.
Repro is intermittent but observed on 2026-07-23 during an approved plan Implement on Windows 10.0.26300, AI Model: Auto.
Expected Behavior
When the chat mode is Agent (or Implement/Build has been authorized in Agent), mutate tools must be allowed. Ask-mode policy must apply only when the chat is actually in Ask mode. UI mode label, system mode reminder, and tool policy gate must stay consistent for the same turn.
Operating System
Windows 10/11
Version Information
Version: 3.12.30 (user setup)
VS Code Extension API: 1.128.0
Commit: 63a2996a10d9e476b6c28e951dd7691d9c0cf480
Date: 2026-07-21T22:50:03.568Z
Layout: IDE
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.256
OS: Windows_NT x64 10.0.26300
For AI issues: which model did you use?
Model: Auto
Additional Information
TX fix request for Cursor engineering / agents:
-
Single source of truth for chat mode per turn: UI mode, system reminder, and tool policy must read the same enum (Ask vs Agent). Rejecting writes with Ask text while the turn is Agent is a P0 trust break for Implement.
-
On Implement / Build / “continue after approve,” assert Agent policy before the first mutate tool call. If mode is Ask, fail closed with an owner-visible mode picker — do not silently apply Ask policy under an Agent label.
-
Add a diagnostics line in the Ask-block error: currentMode=<ask|agent> source=<ui|session|reminder> turnId=… so reports are actionable.
-
Regression test: approve plan → Implement in Agent → Write must succeed; same sequence forced Ask → Write must fail with Ask text and UI showing Ask.
-
Do not weaken security gates; fix consistency only. No ask to disable failClosed hooks or skip verify.
Environment (auto-attached on form): Windows_NT x64 10.0.26300; Electron 40.10.3; Chromium 144.0.7559.236; Node 24.15.0; VS Code Extension API 1.128.0; Stable.
Does this stop you from using Cursor
No - Cursor works, but with this issue