Summary
Add support for capturing sessions from Pi code, an AI coding agent, so Partio can checkpoint Pi-driven commits alongside Claude Code ones.
Inspired by entireio/cli#811.
What to implement
Add a Pi code agent detector in internal/agent/ following the existing Claude Code pattern:
- Detect a running Pi process via process list scan (look for
pi or pi-mono binary)
- Locate Pi session/transcript files (research
~/.pi/ or similar per Pi's docs)
- Parse Pi transcript format into
SessionData fields: Prompt, Context, TokensUsed
- Register the detector so
partio enable --agent pi installs the appropriate hooks
The implementation should follow the same Detector interface defined in internal/agent/detector.go and mirror the structure of internal/agent/claude/.
Why
Pi is an actively developed AI coding agent. Users running Pi to write code should be able to capture those sessions in Partio just like Claude Code sessions. Without this, Pi users get no checkpoint trailers and lose the AI reasoning history for their commits.
User Relevance
Pi users who adopt Partio expect it to work with their toolchain. Missing agent support means silent failures — hooks run, commits complete, but no checkpoint is linked and no session is preserved. Supporting Pi makes Partio usable for a broader set of AI-assisted development workflows.
Target Repos
Context Hints
internal/agent/ — Detector interface and agent package structure
internal/agent/claude/ — Reference implementation to mirror
cmd/partio/enable.go — Where agent flag is parsed and hooks installed
Acceptance Criteria
Summary
Add support for capturing sessions from Pi code, an AI coding agent, so Partio can checkpoint Pi-driven commits alongside Claude Code ones.
Inspired by entireio/cli#811.
What to implement
Add a Pi code agent detector in
internal/agent/following the existing Claude Code pattern:piorpi-monobinary)~/.pi/or similar per Pi's docs)SessionDatafields:Prompt,Context,TokensUsedpartio enable --agent piinstalls the appropriate hooksThe implementation should follow the same
Detectorinterface defined ininternal/agent/detector.goand mirror the structure ofinternal/agent/claude/.Why
Pi is an actively developed AI coding agent. Users running Pi to write code should be able to capture those sessions in Partio just like Claude Code sessions. Without this, Pi users get no checkpoint trailers and lose the AI reasoning history for their commits.
User Relevance
Pi users who adopt Partio expect it to work with their toolchain. Missing agent support means silent failures — hooks run, commits complete, but no checkpoint is linked and no session is preserved. Supporting Pi makes Partio usable for a broader set of AI-assisted development workflows.
Target Repos
cliContext Hints
internal/agent/— Detector interface and agent package structureinternal/agent/claude/— Reference implementation to mirrorcmd/partio/enable.go— Where agent flag is parsed and hooks installedAcceptance Criteria
partio enable --agent pisucceeds and installs hookspartio statusshows the Pi agent as configured