Skip to content

parallel tool calls confuse llms #99

Description

@manueloverride

Bug: No documented way to disable parallel tool execution via CLI or environment variable

Summary

When using Pi Coding Agent with a local LLM (e.g. llama-server/llama.cpp), the model may emit multiple tool calls in a single response. Pi executes these tool calls in parallel, but many local models assume they will be executed sequentially. This results in commands running out of order, conflicting with each other, or failing.

Expected Behavior

There should be a documented way to configure tool execution order outside of the API, such as:

  • An environment variable (e.g. PI_TOOL_EXECUTION=sequential)
  • A CLI flag
  • A configuration file option

This would allow users of the CLI to force sequential tool execution without modifying code.

Actual Behavior

The agent runtime supports toolExecution: "sequential" through the API, but there is no documented equivalent for CLI users via an environment variable or CLI option.

Impact

This particularly affects local LLMs connected to Pi Coding Agent, which frequently batch multiple tool calls under the assumption they will be executed one after another. Parallel execution causes race conditions, filesystem conflicts, and failed workflows.

Request

Expose and document a CLI/configuration mechanism for selecting tool execution mode (parallel vs. sequential), or provide an equivalent environment variable for users who are not embedding the agent through the API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions