Cap the loops by count, not tokens: spawn and search limits in Claude Code

Caps the tail: kills 10-50x blowouts on runaway agent sessions Intermediate 3 min read

Claude Code 2.1.212 added session caps on subagent spawns and WebSearch calls, both defaulting to a non-binding 200. Lower them to match your actual workload so a mis-planned agent hits a hard stop at 12 searches instead of quietly burning a full context window and the spend behind it.

๐Ÿ”’ Pro tip ยท Intermediate

Unlock this tip โ€” and 105 more

This is one of 106 advanced, fact-checked tactics reserved for Pro. Get the full 128-tip library, a searchable archive, and a new tip every morning. Free for 7 days, then $9/mo.

Prefer to browse? The 22 Beginner tips are free forever.