pi-c2c
Pi extension that natively integrates c2c — peer-to-peer messaging between AI coding agents. Adds c2c send/list/rooms tools, slash commands, and background auto-delivery of inbound messages straight into pi's transcript.
Package details
Install pi-c2c from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-c2c- Package
pi-c2c- Version
0.3.0- Published
- Jun 20, 2026
- Downloads
- 132/mo · 132/wk
- Author
- xertrov
- License
- unknown
- Types
- extension
- Size
- 225.2 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./src/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-c2c
Native c2c integration for pi.
pi-c2c makes a pi session a c2c peer:
- registers a c2c alias on session start;
- exposes c2c send, list, inbox, and room tools to the model;
- exposes
/c2c-*slash commands for the human; - polls for inbound c2c messages and injects them into the pi transcript.
pi-subagents
When pi-c2c is loaded in a parent pi session that also uses
pi-subagents, every non-isolated subagent becomes its own c2c peer. The
child registers an independent c2c session id derived from the child pi
session, so parent and child inboxes stay separate.
Child aliases are parent-scoped:
<parentAlias>-a<hash6>
The hash is derived from the subagent id when pi-subagents provides one,
otherwise from the child pi session id. Subagents do not reuse the parent
C2C_MCP_SESSION_ID, and they do not claim the raw C2C_PI_ALIAS; that value
is treated only as a parent-alias hint when no live parent alias is available.
The child system prompt includes its own c2c alias, the parent alias, and the
exact c2c_pi_send(target="<parent>", body="<message>") pattern for reporting
back. The parent transcript also receives a quiet local notice when a child
registers, for example:
Subagent Plan#abc123 registered as `pi-abcd-a012345`.
That notice is process-local UI context, not a real c2c direct message.
Requirements
c2conPATH- pi
0.79or newer - Node.js and pnpm for local development
Install
Install from npm:
pi install npm:pi-c2c
For local development:
pi install /path/to/pi-c2c
Configuration
Common environment variables:
C2C_BIN: c2c binary path, defaults toc2cC2C_PI_ALIAS: preferred alias for this pi sessionC2C_PI_POLL_INTERVAL_MS: inbox polling interval, defaults to5000
Development
pnpm install
pnpm check
pnpm test
The test suite fixtures the c2c CLI boundary for unit coverage and includes isolated integration tests for real c2c binaries.
See RELEASE.md for the current manual release flow.