Custom instructions are absent from the subagent call

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

A custom subagent defined in ~/.cursor/agents/*.md is launched with the Task tool, but the agent call contains only the Task prompt. The markdown body (custom instructions) after the frontmatter is not in that agent call.

Steps to Reproduce

Create a subagent with custom instructions (not just description).

From the parent agent, call the subagent.

Open the subagent call transcript.

Expected Behavior

The body of the custom subagent file should be included in the subagent call, as a system reminder or an equivalent instruction block.

Operating System

MacOS

Version Information

Version: 3.21.18

Additional Information

In Cursor 3.21.18, extensions/cursor-agent-exec/dist/main.js:

  • Ir() stores the frontmatter description separately from prompt, which is the text after the closing ---.
  • The Task tool list shown to the parent uses description only.
  • X0() copies prompt into systemReminder only when e.prompt is non-empty:
n.systemReminder = () => [header, agentPrompt].join("\n\n")
  • The system-prompt generator then does:
a = t.systemReminder;
if (a === undefined || a.length === 0) return baseSystemPrompt;

Function.length is the parameter count. This zero-argument function has length 0, so the generator returns the base system prompt and never calls the function. That matches the transcript: the saved user message is only the Task prompt.

The entire transcript for f593cecb-69c8-45c9-8690-266dcd38c2d8, spawned a subagent with name, model, description and a body:

{"role":"user","message":{"content":[{"type":"text","text":"<timestamp>Thursday, Sep 24, 2026, 5:00 PM (UTC+8)</timestamp>\n<user_query>\nYou are being used only as a probe. Do not use tools. Do not read files. Do not explore the codebase.\n\nFrom instructions you received before this user message, answer exactly these three lines and nothing else:\n1. PURPOSE: <quote the sentence that starts with Purpose, or ABSENT>\n2. DEVIATION: <quote the deviation-format line if one was given to you before this message, or ABSENT>\n3. ROLE: <quote the sentence that names your specialist role if one was given before this message, or ABSENT>\n\nDo not invent text. If that sentence was not in your earlier instructions, write ABSENT.\n</user_query>"}]}}
{"role":"assistant","message":{"content":[{"type":"text","text":"1. PURPOSE: ABSENT\n2. DEVIATION: ABSENT\n3. ROLE: ABSENT"}]}}
{"type":"turn_ended","status":"success"}

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey @Milind, thanks for the report!

The body of a custom agent file isn’t dropped there. That function is skipped by the system prompt path on purpose, and the same text is sent a different way: it gets appended to the subagent’s first message as a system reminder block, after your Task prompt. It is not saved into the transcript file, which is why the transcript only shows the Task prompt. Your probe also asked only about instructions given before that message, so the subagent could honestly answer ABSENT even when the text was there.

Could you try this probe so we can tell for sure?

  1. Create ~/.cursor/agents/codeword-probe.md with this content:
    ---
    name: codeword-probe
    description: Test probe. Use only when asked to launch codeword-probe.
    ---
    Your codeword is PINEAPPLE-42. When asked for your codeword, reply with exactly that codeword.
  1. Restart Cursor.
  2. Open a new Agent chat.
  3. Send: Launch the codeword-probe subagent with the prompt “What is your codeword? Reply with only the codeword, or NONE if you were not given one.” Report its answer verbatim.

Does it answer PINEAPPLE-42 or NONE?

Same here, only rolling back to v3.20 helps. The newest v3.22 doesn’t fix this.

Hey @Milind and @kir

I dug into this a bit more and we’ve confirmed the issue on our side: on some newer builds, custom agents from ~/.cursor/agents can start without the instructions in the body of the file, so they behave like the main agent.

The team is aware of the issue and is working on a fix, which we plan to backport to 3.22.

Please let us know when it gets fixed.

I’m freezing the version to v3.20 until then because I’m literally unable to continue using Cursor.

Hey @Milind and @kir, a fix for this is now rolling out in Cursor 3.22.12. It should be fully rolled out today.

Thanks its working now :slight_smile: