Skip to content

Long agent_prompt suppresses parallel tool calling in Claude Code harness #123

@greynewell

Description

@greynewell

Summary

During mcpbr experiments, we discovered that verbose agent_prompt configurations (19-20 lines with numbered workflow steps) effectively suppress parallel tool calling behavior in the Claude Code agent harness, even when tools have readOnlyHint: true annotations.

Evidence

Analysis of 28+ mcpbr experiment runs across .mcpbr_run_* directories:

Run Prompt length Parallel turns Total turns Parallel %
20260207_214727 No prompt 108 11,919 0.9%
20260209_170925 ~5 lines 15 60 25.0%
20260209_170209 ~5 lines 6 60 10.0%
20260212_144524 19 lines 1 259 0.4%
parallel_trial 20 lines 0 150 0.0%

Runs with no prompt or short prompts (≤5 lines) achieved 0.9-25% parallel tool call rate, while runs with verbose prompts (19-20 lines containing numbered workflow instructions) achieved 0-0.4%.

Hypothesis

The structured, numbered workflow steps in long prompts (e.g., "1. EXPLORE... 2. STOP EXPLORING... 3. FIX... 4. TEST...") may cause the model to follow a rigid sequential pattern, overriding its natural tendency to parallelize independent tool calls. The explicit step-by-step instructions create a mental model of sequential execution even when tools are marked as safe for parallel use.

Reproduction

  1. Run mcpbr with a verbose agent_prompt containing numbered workflow steps (19+ lines)
  2. Run mcpbr with no agent_prompt or a minimal one (≤5 lines)
  3. Compare parallel tool call rates in the output logs

Search for parallel calls with: count assistant messages containing multiple tool_use content blocks.

Impact

This affects SWE-bench evaluation speed and turn efficiency. Parallel tool calls allow exploring multiple symbols simultaneously, reducing the number of turns needed before the agent starts coding.

Potential solutions

  • Keep agent prompts minimal (≤5 lines) — let the MCP server instructions handle workflow guidance
  • Avoid numbered step-by-step instructions in agent prompts
  • Use the MCP server's instructions field (which doesn't seem to suppress parallelism) instead of agent_prompt for workflow guidance
  • Further experimentation needed to isolate which specific prompt patterns cause suppression

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions