Message "not a valid subagent_type" when creating a custom agent

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I created a few custom agents in ~/.cursor/agents. One in particular is called security-reviewer which is in ~/.cursor/agents/security-reviewer.md.

I’m using the following frontmatter:

name: security-reviewer
model: composer-2
description: Security reviewer for adversarial reviews against branches and repos
readonly: true

However when I try to use it from an agent, I’m getting this error:

I tried dispatching a Task with subagent_type: security-reviewer. The tool rejected it:

Invalid enum value. Allowed values are still only:

generalPurpose, explore, shell, cursor-guide, best-of-n-runner, ci-watcher, code-reviewer, agents-memory-updater, compatibility-scan-review, docs-reliability-review, startup-review, validation-review

Some of those listed agents are from plugins so those seem to work but none of the manually created ones seem to be registered with the Task tool.

Steps to Reproduce

Create a custom agent and place in the user folder, ~/.cursor/agent

Expected Behavior

I would expect Agent to be able to see and invoke the custom subagents.

Operating System

MacOS

Version Information

Version: 3.2.11
VSCode Version: 1.105.1
Commit: e9ee1339915a927dfb2df4a836dd9c8337e17cc0
Date: 2026-04-24T14:36:47.933Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.4.0

For AI issues: which model did you use?

Composer 2

For AI issues: add Request ID with privacy disabled

66c96550-01a3-4ec4-840a-efafb06084ce

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report. Before we escalate, let’s double-check a couple things. If you can see the built-in and plugin subagents, that means the Task tool itself is working. It’s just not picking up your file.

  1. Can you confirm the path? It should be ~/.cursor/agents/security-reviewer.md, with agents plural. In your Steps to Reproduce you wrote ~/.cursor/agent without the s, so we want to make sure that’s only a typo in the report, not on disk.

  2. In the file, after the frontmatter (after the closing ---), there should be prompt text. See the example in the docs Subagents | Cursor Docs. If it’s empty, the parser might not register the agent. Can you share the full file, or run ls -la ~/.cursor/agents/ and head -20 on the file?

  3. After creating the file, did you restart Cursor? And do you see security-reviewer show up in Settings > Agents in the UI?

One more thing. You have readonly: true. There’s a known bug with readonly subagents where they refuse immediately on start, but that looks different. In your case it’s not visible in the enum at all, so it’s probably not related. Still, please try temporarily removing readonly: true and test again.

Thanks, Dean, for the quick response, and apologies for the path typo; it was already agents plural. Your last suggestion made it work, however. Simply had to restart Cursor for the new agents to be picked up :roll_eyes: …it’s always the simple things.

Thanks again, much appreciated :folded_hands:t3: