Skip to content

Parallel function calling fails with unrecoverable 400 error after multi-step MCP tools #16144

@jw409

Description

@jw409

Problem

After extended MCP tool usage (e.g., tools like sequential-thinking that make many tool calls with branching/revision patterns), subsequent parallel tool calls fail with:

400 error: "number of function response parts is equal to the number of function call parts"

This error is unrecoverable. Once triggered, the session is corrupted and ALL subsequent prompts fail - not just tool calls, but any user input. In some modes, the session may degenerate into a "mute" state where responses stop entirely. Users must /clear or restart, losing all conversation context and work in progress.

Reproduction

  1. Configure Gemini CLI with an MCP server that makes many tool calls in complex patterns
    (e.g., sequential-thinking with its branching/revision features, or similar multi-call MCP tools)
  2. Run a query that triggers extended tool usage
  3. After completion, run parallel tool calls (e.g., multiple file reads)
  4. Observe 400 error - session is now corrupted

Note: Discovered using a private fork of sequential-thinking with extended features, but the core behavior (many tool calls followed by parallel calls) is expected to reproduce with similar workloads.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/agentIssues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Quality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions