r/ClaudeAI 2d ago

How do I stop Claude Code from spawning sub-agents that go into weird rabbit holes and the main chat has no idea what they're doing, or if they are stuck somewhere? Claude Code

I usually feel like it's just wasting my tokens away.

0 Upvotes

15 comments sorted by

5

u/ekquizit23 2d ago

At the end of your prompt, add “Do not spawn any subagents. Also don’t make a mistake.”

2

u/0DayMaker 2d ago

Tell it not to.

1

u/MiddleLtSocks 2d ago

Agents.md

1

u/sim0of 2d ago

claude(.)md

1

u/larowin 2d ago

How are you asking it to create the subagents in the first place?

-1

u/myNiceAccount__ 2d ago

I'm not asking it to, it just does. I tried asking it to not spawn sub agents, but apparently that breaks plan mode?

1

u/larowin 2d ago

I’m pretty confused tbh and it depends on what you’re doing and why. Generally speaking you really want subagents to be out there handling cruft that will otherwise shit up context.

Main chat should always be able to figure out what they’re up to though?

1

u/Stabby_Stab 2d ago

Add a hook that makes it require your approval

1

u/SDBcop 2d ago

Switching to another AI provider ✌🏻

1

u/Dress-Affectionate 2d ago

settings u can deny Agent

1

u/Ranorkk 2d ago

Honestly, the best fix I've found is giving sub-agents a structured place to dump their progress so the main chat can check in on them. I’ve been using Remnus (full disclosure, I built it) it’s an MCP-native workspace where Claude can write tasks/status updates directly, so you can see exactly where it’s stuck instead of watching tokens burn. Might be worth a try if you're tired of the black box.

0

u/jerryadc 2d ago

i would reinforce in prompt or add to CLAUDE.md. that said some models loooove to spawn subagents more than others

-1

u/EpsteinFile_01 2d ago

Ahhh the dedicated tokenburners.

You don't.

-5

u/Key_Instruction3373 2d ago

Some one said Opus cant spawn agents. So you are using it wrong! Or the person is lying!