
Pi Durabletask MCP
io.github.Nyarlathotepppppv0.4.3Updated Oct 4, 2026
Delegate Claude/Codex tasks to configured Pi, with steering and optional SQLite restart recovery.
Overview
Lets an assistant delegate coding tasks to a separate Pi Coding Agent session, with steering, follow-ups, and optional SQLite recovery.
- What it does
- This bridge lets a main agent such as Claude Code or Codex hand work to Pi Coding Agent in its own context. Tools include spawn and spawn_batch to start tasks (optionally with different models), wait with until: "settled" to collect results, steer to redirect running work, follow_up to continue in the same session, and answer to reply to Pi's questions. It also offers handoff notes for the next client window, nativeMcp to select servers and tool permissions, and optional durable checkpoints in SQLite.
- When to use it
- Use it when you want a second agent to read, search, or review a repository without consuming the main agent's context, or when you need long-running delegated tasks that can be steered and resumed across client windows.
- Requirements
- Runs locally over stdio as the npm package pi-durabletask-mcp. Requires Node.js 22.19+ and a globally installed Pi Coding Agent, configured with your own provider credentials and quota. Search needs ripgrep (rg) on PATH. No environment variables or headers are declared.
Installation
In SourceWeft
- Open Pi Durabletask MCP in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
[pi-durabletask-mcp — Delegate. Steer. Recover.]
English · 简体中文
pi-durabletask-mcp
Delegate work from Claude Code, Codex, or another MCP client to Pi Coding Agent, in its own context.
Example workflow
To collect results, the main agent loops wait with until: "settled". If Pi asks a question, use answer with the question ID, then wait again.
What you can do
- Separate context: Pi reads and searches; your main agent collects findings.
- Multiple models:
spawn_batchstarts tasks with individually selected models. - Live steering:
steerredirects work after the current tool call. - Follow-ups:
follow_upkeeps context in the same long-lived session; turns accumulate. - Recovery: explicit
durable: truesaves checkpoints to SQLite. - Handoff: leave a note for the next Claude/Codex window.
- Native MCP:
nativeMcpexplicitly selects servers and tool permissions; third-party extensions are enabled separately.
Quick start
Requires Node.js 22.19+ and global Pi. CI-tested with Pi 1.0.0 and 1.0.2. Model calls use your own provider credentials and quota.
1 · Install
Already configured Pi? Install the bridge:
Install and configure Pi first
The bridge links to the global Pi SDK, so install Pi before the bridge:
Search uses Pi's downloaded rg or ripgrep on PATH. Authentication →
Install from source
Global Pi is still required.
Connect with node /absolute/path/pi-durabletask-mcp/dist/index.js instead of the installed command.
2 · Connect
Claude Code
Codex
Add to ~/.codex/config.toml:
Already connected? Update the existing entry and reconnect. Other clients →
3 · Try a review
Use Pi to review authentication for missing permission checks. Don't edit files. Report file locations and suggested regression tests.
The agent uses spawn → wait(until: "settled"), answering questions with answer. Try the steering and follow-up prompts above. init is optional diagnostics; models lists available models.
Optional: install the Agent Skill
Connect the MCP server first; this skill only guides tool use. Choose your client's user-level directory and download just SKILL.md:
Start a new client session after installing.
Defaults & recovery
Tasks use your configured model, read-only tools and memory storage by default; memory sessions disappear when their MCP process exits.
With explicit durable: true, recovery happens after a bridge restart: per-run time limits include downtime, and tools with unknown outcomes are not blindly replayed—verify external state before retrying.
handoff stores notes written by the main agent; reading them does not take over execution.
Cross-window continuation requires a durable task with its original history and note still retained; a live owner must release the task before another process can continue it.
Documentation
- Agent instructions · Tools · Configuration
- Handoff · Native MCP
- Recovery, ownership & retention
- Development · Changelog · Issues
MIT · Built on howznguyen/pi-delegate-mcp and Pi Durable.
Source: README.md at commit 63427da
Tools
0Version history
1- v0.4.3LatestOct 4, 2026

