Explore subagent rejects short prompts with "Prompt is too long"; general-purpose accepts same prompt

Resolved 💬 3 comments Opened Apr 23, 2026 by KCW89 Closed Apr 27, 2026

Description

Agent({ subagent_type: "Explore", prompt: "<ANY TEXT>" }) consistently returns Prompt is too long in a project where subagent_type: "general-purpose" with an identical prompt runs successfully and returns the expected result. This blocks Plan-mode Phase 1, which per the harness instructions is only supposed to use Explore.

Reproduction

Environment:

  • Claude Code CLI (latest as of 2026-04-23)
  • macOS (Darwin 25.3.0)
  • Model: Claude Opus 4.7 (1M context)
  • Project has several MCP servers active, plus a CLAUDE.md and project-level MEMORY.md. Ambient context is substantial but well within normal Opus 4.7 budgets.

Steps:

  1. In an existing Claude Code session with several MCP servers registered, launch:

``
Agent({
subagent_type: "Explore",
description: "Minimal test",
prompt: "Read /path/to/repo/package.json. Report the \
name\ field only."
})
``

  1. Result: Prompt is too long (instant rejection, zero tool uses).
  2. In the same session, launch the same prompt with subagent_type: "general-purpose":

``
Agent({
subagent_type: "general-purpose",
description: "Minimal test general-purpose",
prompt: "Read /path/to/repo/package.json. Report the \
name\ field only."
})
``

  1. Result: succeeds. 1 tool use, ~5 s duration, ~43 K total tokens reported.

Evidence it is not user-prompt size

  • Explore rejects a ~16-word prompt with the same "too long" error it returns for ~400-word prompts.
  • Three earlier Explore calls with ~150-word prompts were accepted but returned with 0 tool uses — i.e., the agent produced no output. Same session, same ambient context. So the threshold is either non-deterministic or measured inconsistently.
  • The exact same 16-word prompt to general-purpose works with ~43 K total tokens. Ambient context is therefore within budget for general-purpose but exceeds it for Explore.

Hypothesis

Either:

  1. Explore has a smaller hardcoded input-token budget than general-purpose, even though its tool allowlist is a subset (fewer tool schemas → should have more headroom), OR
  2. Explore's size check counts something differently (e.g., double-counts the skills list or MCP instructions).

Impact

  • Plan-mode Phase 1 documentation says "you should only use the Explore subagent type." When Explore rejects all prompts, plan-mode investigation is forced to either (a) use general-purpose (contradicting harness guidance) or (b) investigate inline without delegation. Users hit a silent dead-end unless they try a different subagent type.
  • 0 tool uses is the confusing failure mode — the agent appears Done but did nothing. No error is surfaced.

Workaround

Substitute subagent_type: "general-purpose" everywhere Explore is documented. Slightly more expensive per call (larger tool list loaded) but functionally equivalent for read-only research.

Suggested fix

  • At minimum, the error should clearly indicate which component exceeded budget (user prompt vs. ambient context vs. tool schemas) so users can respond.
  • Ideally, Explore's budget should be at least as large as general-purpose's, since it has a strictly smaller tool allowlist.
  • If the silent "0 tool uses" path is distinct from the "Prompt is too long" reject, worth checking whether these are two related or independent regressions.

View original on GitHub ↗

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