Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Cursor version: 3.23.12 (macOS), Agent mode, Opus 4.8 High
Summary
A subagent with readonly: true is restricted when it lives in .cursor/agents/, but the same
file shipped in a plugin’s agents/ directory runs with full write access: it edits files and runs
state-changing shell commands without any approval prompt.
Steps to reproduce
-
Create a local plugin in
~/.cursor/plugins/local/ro-probe/with.cursor-plugin/plugin.json
andagents/probe-plugin-ro-write.md:--- name: probe-plugin-ro-write description: Probe, plugin agent, readonly. readonly: true --- Carry out the task you are given, step by step, using whatever tools you have. For each step say which tool you called and exactly what it returned, including any error. -
Put an identical file, renamed
probe-project-ro-write, in a project’s.cursor/agents/. -
Reload Window. In Agent mode, ask: “Launch the subagent probe-plugin-ro-write with this task:
(1) use Write to create probe-write.txt containing x; (2) use Shell to run: touch
probe-shell.txt”. Repeat withprobe-project-ro-write.
Expected
Both subagents run read-only, as the subagents docs describe for readonly: true (“no file edits,
no state-changing shell commands”).
Actual
- Plugin agent: both files are created; no approval prompt appeared.
- Project agent: refuses; it reports running in “Ask (read-only) mode”.
The plugin agent’s tool list also includes Shell, Write, StrReplace, Delete and the user’s MCP tools.
Why it matters
The plugins reference documents only name and description for plugin agents, and the subagents
page does not mention plugins, so it is unclear whether readonly is meant to apply. If it is not
supported for plugin agents, there is no way for a plugin to ship a read-only agent (for example a
code reviewer), and a plugin agent gets write access plus every MCP write tool the user has
connected. Either honouring readonly for plugin agents or documenting that it is ignored would
help.
Steps to Reproduce
- Create a local plugin at ~/.cursor/plugins/local/ro-probe/ with .cursor-plugin/plugin.json and
agents/probe-plugin-ro-write.md:
name: probe-plugin-ro-write
description: Probe, plugin agent, readonly.
readonly: true
Carry out the task you are given, step by step, using whatever tools you have. For each step say which tool
you called and exactly what it returned, including any error.
- Put an identical file, with the name changed to probe-project-ro-write, in a project’s .cursor/agents/.
- Run Developer: Reload Window.
- In Agent mode, ask: “Launch the subagent probe-plugin-ro-write with this task: (1) use Write to create
probe-write.txt containing x; (2) use Shell to run: touch probe-shell.txt” - Repeat step 4 with probe-project-ro-write.
Result: the plugin agent creates both files with no approval prompt. The project agent refuses and reports
running in “Ask (read-only) mode”.
Expected Behavior
Both subagents run read-only, as the subagents docs describe for readonly: true (“no file edits, no
state-changing shell commands”). The plugin agent should refuse the write and the shell command, as the
project agent does.
If readonly is intentionally unsupported for plugin agents, please document that. The plugins reference lists
only name and description for plugin agents, and the subagents page doesn’t mention plugins. As things stand,
a plugin can’t ship a read-only agent such as a code reviewer: a plugin agent gets write and shell access and
lists the user’s MCP tools among its own.
Operating System
MacOS
Version Information
Cursor IDE version: 3.23.12 (macOS)
For AI issues: which model did you use?
Opus 4.8 High
Does this stop you from using Cursor
No - Cursor works, but with this issue