API Error 400: system content must contain at least one block when launching parallel subagents in Plan Mode

Status Open
Reported on v2.1.218
Maintainer reply None cached
Activity 1 comment · opened Jul 24, 2026

Environment

  • Claude Code Version: 2.1.218
  • OS: Linux (x64)
  • Node Version: v26.4.0
  • Execution Mode: Plan Mode + Parallel Background Subagents

Description

When instructing Claude Code to spawn multiple parallel background subagents while in Plan Mode (e.g., "Launch 3 Explore agents in parallel"), subagent API requests fail repeatedly with an Anthropic API 400 validation error.

Error Output

API Error 400: system content must contain at least one block

Confirmed Behavior

The Anthropic API (/v1/messages) rejects any request where the system field is present but empty (null, "", or []) — this is documented, expected API behavior.

Likely Cause (unconfirmed — inferred from error message, not verified against source)

When Claude Code constructs the subagent request payload, the system property appears to be populated with an empty/uninitialized value rather than a valid system prompt or being omitted entirely. This is the most consistent explanation for the error but has not been confirmed against Claude Code's actual internals.

Expected Behavior (recommendation)

Claude Code should either populate a non-empty system prompt for subagents or omit the system key entirely when no custom system prompt is provided.

Steps to Reproduce

  1. Enable Plan Mode.
  2. Prompt Claude Code to launch multiple parallel subagent exploration tasks (e.g., "Launch 3 Explore agents in parallel").
  3. Observe API Error 400: system content must contain at least one block printed during subagent initialization.

Additional Notes

  • Error recurred 5 times consecutively across sequential agent completions in a single session, though it's not yet confirmed whether this is consistent across sessions or intermittent.
  • Confirmed: launching 3 parallel background Explore subagents outside Plan Mode (same Claude Code 2.1.218 session) completed cleanly with no 400 error. This narrows the trigger toward Plan Mode specifically, rather than parallel subagent dispatch alone.

Recommended Workarounds

  1. Sequential execution: Run subagent tasks sequentially rather than in parallel batches.
  2. Exit Plan Mode: If deep exploration subagents are needed in parallel, switch out of Plan Mode before spawning them.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗