OpenAI parallel tool call policy extension for the pi coding agent. It ports the senpi-mono builtin openai-api-parallel-tool-calls extension into a standalone pi extension.
The extension does not register a new tool. It intercepts provider requests before they are sent and adds parallel_tool_calls: true when all of these conditions hold:
| Case | Result |
|---|---|
OpenAI-family API payload has non-empty tools |
adds parallel_tool_calls: true |
Payload already has parallel_tool_calls |
preserves the explicit value |
| Payload has no tools | leaves payload unchanged |
| Non-OpenAI API payload | leaves payload unchanged |
Covered APIs are openai-completions, openai-responses, openai-codex-responses, and azure-openai-responses.
It also appends a system-prompt section that tells the model to batch independent tool calls and gather enough context before editing.
The package targets the pi coding agent. Pi loads extensions from ~/.pi/agent/extensions/, project .pi/extensions/, or via the --extension / -e CLI flag.
# From npm (once published)
pi install npm:pi-openai-api-parallel-tool-calls
# From git
pi install git:github.com/code-yeongyu/pi-openai-api-parallel-tool-calls
# Manual placement
git clone https://github.com/code-yeongyu/pi-openai-api-parallel-tool-calls ~/.pi/agent/extensions/pi-openai-api-parallel-tool-calls
cd ~/.pi/agent/extensions/pi-openai-api-parallel-tool-calls && npm install
# Dev / one-shot test
pi -e /path/to/pi-openai-api-parallel-tool-calls/src/index.tsAfter installation, restart pi or run /reload inside an interactive session.
npm install
npm test
npm run typecheck
npm run check
pi -e ./src/index.tsThe test suite uses vitest. TypeScript is strict, Node-only, and uses ESM imports with .js suffixes.
Ported from packages/coding-agent/src/core/extensions/builtin/openai-api-parallel-tool-calls.ts in code-yeongyu/senpi-mono.
MIT.
- senpi — the fork/runtime these extensions are extracted from.
- Ultraworkers Discord — community link from the senpi README.
- Dori — the product powered by senpi under the hood.