Sub-agents do not follow rules

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

When running sub-agents, Cursor IDE ignores rules. In my case, I have strict rules about using pnpm and never using npm. Regardless, sub-agents insist on attempting to run npm commands. If they ran pnpm they would be auto-allowed commands that could just work.

Steps to Reproduce

Occured using a Gemini 3 Pro prompt that spun up sub-agents to run testing.

Expected Behavior

Sub-agents should be strictly following the same rules and restrictions as regular agents, always, no exceptions.

Screenshots / Screen Recordings

Operating System

Windows 10/11

Version Information

Version: 2.4.28 (user setup)
VSCode Version: 1.105.1
Commit: f3f5cec40024283013878b50c4f9be4002e0b580
Date: 2026-02-03T00:56:18.293Z
Build Type: Stable
Release Track: Default
Electron: 39.2.7
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Windows_NT x64 10.0.26200

For AI issues: which model did you use?

Gemini 3 Pro

Additional Information

NOTE: In attached screenshot, I had to manually click into the sub agent and CHANGE npm to pnpm.

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey, thanks for the report. This is a known issue. Sub-agents currently don’t inherit User Rules from the parent agent.

Your options for now:

  1. Create a custom sub-agent with rules built in: create a file in .cursor/agents/ that includes your pnpm requirement directly in the prompt. Something like:

    ---
    name: test-runner
    description: Runs tests using the project's tools
    ---
    
    IMPORTANT: Always use pnpm, never npm.
    
    [other instructions]
    
  2. Add rules to AGENTS.md: sub-agents do pick up AGENTS.md, so putting your pnpm rule there can help.

The team is aware of the issue.

Understood - thanks Dean.

sub-agents don’t seem to inherit the main rules at all. my workaround has been putting the rule directly in the prompt when I know it’ll spawn sub-agents in the chat message itself.

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.