Excessive Token Usage due to Pre-loading All Custom Subagents

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

All custom subagents in ~/.cursor/agents are loaded into context at the start of a conversation, wasting significant tokens.

Description:
When starting a new conversation, Cursor appears to inject the definitions of all custom subagents located in the ~/.cursor/agents directory into the initial context window, regardless of whether they are actually invoked or relevant to the prompt.

I currently have over 60 custom subagents defined. Because they are all loaded upfront, a massive amount of tokens is wasted at the very beginning of every new chat.

Steps to Reproduce

  1. Create multiple custom subagents (e.g., 10+) in the ~/.cursor/agents directory.
  2. Open Cursor and start a brand new chat/conversation.
  3. Check the initial token usage. (In my case, it consumed 11.4K tokens).
  4. Close Cursor and rename the agents directory to disable them: mv ~/.cursor/agents ~/.cursor/agents.bak.
  5. Restart Cursor and start a new chat.
  6. Check the initial token usage again. (It drops significantly to 1.4K tokens).

Expected Behavior

Custom subagent definitions should be loaded dynamically (lazy-loaded) only when they are explicitly called or deemed relevant by the router. The initial context should remain lightweight.

Screenshots / Screen Recordings

Operating System

Linux

Version Information

Version: 3.6.21
VS Code Extension API: 1.105.1
Commit: e7a7e93f4d75f8272503ecf33cedbaae10114a10
Date: 2026-05-28T21:45:36.072Z
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
xterm.js: 6.1.0-beta.220
OS: Linux x64 6.17.0-29-generic

Additional Information

Actual Behavior:
All custom subagent definitions are blindly loaded into the system prompt/context at the start of the conversation, wasting roughly 10,000 tokens in my case on unused agents. This severely eats into the context window and wastes resources.

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, thanks for the detailed report and repro, it helps.

Right now this is expected behavior, not a straight bug. The name and description of every custom subagent from ~/.cursor/agents get added to the Task tool description so the model knows who it can delegate work to. With 60+ agents, that’s what causes the ~10K startup tokens you’re seeing.

The issue is that the subagent catalog doesn’t have any budget or truncation mechanism yet, unlike skills which already has one. So the context grows linearly with the number of agents. I reported this internally as a request for lazy-load or a budget for the subagent catalog. No ETA for the change yet.

What you can do right now to reduce usage:

  • Keep only the subagents you actually need in ~/.cursor/agents, and temporarily move the rest out of the folder
  • Shorten the description field for each agent, descriptions are what take up most of the space

If you notice anything else weird in the context breakdown, send a screenshot and I’ll take a look.