# Excessive Token Usage due to Pre-loading All Custom Subagents

**URL:** <https://forum.cursor.com/t/excessive-token-usage-due-to-pre-loading-all-custom-subagents/162001>\
**Category:** Bug Reports\
**Tags:** context, subagents\
**Created:** [May 30, 2026, 11:49pm UTC](https://forum.cursor.com/t/excessive-token-usage-due-to-pre-loading-all-custom-subagents/162001 "2026-05-30T23:49:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![azhang](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@azhang](https://forum.cursor.com/u/azhang)\
**Post date:** [May 30, 2026, 11:49pm UTC](https://forum.cursor.com/t/excessive-token-usage-due-to-pre-loading-all-custom-subagents/162001/1 "2026-05-30T23:49:57Z")

</div>

### 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

 ![Screenshot 2026-05-30 164029.png](https://us1.discourse-cdn.com/cursor1/original/3X/8/a/8a0bb6ceaf6af6acb478e77d917fa7241739020b.jpeg)

 ![Screenshot 2026-05-30 163957](https://us1.discourse-cdn.com/cursor1/original/3X/d/a/da6d977260404419128c0176daf92650f07ecd1e.jpeg)

### 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

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [May 31, 2026, 7:08am UTC](https://forum.cursor.com/t/excessive-token-usage-due-to-pre-loading-all-custom-subagents/162001/5 "2026-05-31T07:08:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [June 30, 2026, 7:09am UTC](https://forum.cursor.com/t/excessive-token-usage-due-to-pre-loading-all-custom-subagents/162001/6 "2026-06-30T07:09:07Z")

</div>

Closed on June 30, 2026, 7:09am UTC

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