Sub-agents fail with 'Prompt is too long' in Claude Code Desktop App 2.1.87

Resolved 💬 4 comments Opened Mar 30, 2026 by duda-web Closed May 4, 2026

Description

Sub-agents (Explore, Plan, and other Agent tool types) consistently fail with "Prompt is too long" error in Claude Code Desktop App. The main session works fine — only sub-agent spawning fails.

Environment

  • Claude Code version: 2.1.87
  • Platform: macOS (Darwin 25.3.0, Apple Silicon)
  • Interface: Claude Code Desktop App (not CLI)
  • Model: Claude Opus 4.6 (1M context)

Setup

  • Plugins installed: 22
  • MCP servers: 4 (sequential-thinking, gws, railway, nanobanana)
  • Desktop Extensions: 9 (chrome-control, computer-use, fantastical, filesystem, imessage, ms_office_powerpoint, notes, osascript, pdf-filler-simple)
  • Cloud Integrations: 4 (Gmail, Canva, Google Calendar, n8n with Todoist + Google Business Profile)
  • CLAUDE.md: ~30K chars
  • Memory files: 21
  • Skills in ~/.claude/skills/: 0 (cleaned during debugging)
  • Commands: 4

Reproduction

Any attempt to use the Agent tool fails:

Agent(subagent_type="Explore", prompt="List files in /tmp") → "Prompt is too long"

This happens regardless of the sub-agent type or prompt complexity. Even a trivial one-line prompt fails.

What we tried (extensive debugging session)

  1. ✅ Removed ~/.claude/.mcp.json servers (were duplicating Desktop config servers)
  2. ✅ Removed 42 GSD commands from ~/.claude/commands/gsd/
  3. ✅ Uninstalled 4 unused plugins (asana, gitlab, supabase, circleback)
  4. ✅ Removed 34 standalone skills from ~/.claude/skills/ (14 were duplicates of superpowers plugin, one had 4.7MB of node_modules inside)
  5. ✅ Cleaned n8n cloud integration (removed ~360 Factorial HR tools that duplicated a local plugin)

None of these resolved the issue. The accumulated system prompt (plugins + skills + MCP tools + extensions + CLAUDE.md + memory + RPM plugins) exceeds whatever the sub-agent prompt limit is.

Key observations

  • The main session (1M context) works perfectly fine
  • Only sub-agent spawning fails — the sub-agent seems to have a much smaller prompt limit
  • RPM plugins (design, engineering, data — 27 skills by Anthropic) appeared on March 20, around when the issue started
  • With 22 plugins and standard Desktop Extensions, users should be able to use sub-agents
  • There appears to be no way to configure or increase the sub-agent prompt limit

Expected behavior

Sub-agents should work with a reasonable number of plugins, MCP servers, and extensions installed. If the system prompt is too large for sub-agents, there should be:

  1. A way to see current prompt size vs limit
  2. A way to exclude certain tools/skills from sub-agent context
  3. Better error messages indicating what's consuming the most space
  4. Or simply a higher limit for sub-agent prompts

Workaround

Currently none — the user cannot use any sub-agent functionality (Explore, Plan, etc.) which significantly limits Claude Code's capabilities for complex tasks.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗