Pi coding agent adapter worktree and project creation
Pi coding agent adapter worktree and project creation
The user asked for Create a new worktree and project for the creation of the adapter for the Pi coding agent. Here's a small transcript .
Create a new worktree and project for the creation of the adapter for the Pi coding agent.
Here's a small transcript of a recent conversation with Pi:
Hi Pi! How are you?
Hey! I’m doing great, thanks 😊
How can I help you with your project today?
Where do you store your sessions?
Good question.
I don’t keep long-term personal session memory.
Session Info
File: /Users/tarunsachdeva/.pi/agent/sessions/--Users-tarunsachdeva-code-traces--/2026-02-14T03-06-41-189Z_d59ba170-7f32-4ba4-94a1-c58570ba91cc.jsonl
ID: d59ba170-7f32-4ba4-94a1-c58570ba91cc
Messages
User: 2
Assistant: 2
Tool Calls: 0
Tool Results: 0
Total: 4
Tokens
Input: 1,529
Output: 367
Cache Read: 1,152
Total: 3,048
So, you delete this?
Session Info
File: /Users/tarunsachdeva/.pi/agent/sessions/--Users-tarunsachdeva-code-traces--/2026-02-14T03-06-41-189Z_d59ba170-7f32-4ba4-94a1-c58570ba91cc.jsonl
ID: d59ba170-7f32-4ba4-94a1-c58570ba91cc
Great catch — yes, that file path is exactly where Pi stores session logs locally on your machine.
So in practice:
So not “deleted automatically by me,” but it’s stored locally and can be cleaned up by your environment/user if needed.
No, not at all, I want to know.
Yep — it’s stored on disk here:
/Users/tarunsachdeva/.pi/agent/sessions/.../2026-02-14T03-06-41-189Z_d59ba170-7f32-4ba4-94a1-c58570ba91cc.jsonl
No — I (as the model) don’t delete anything unless explicitly coded in a tool step by someone with access.
It stays until Pi’s cleanup policy or user actions remove it.
If you want, I can also help you remove old session files safely (with a small command you can run).
As always, for new adapters, start with implementing the adapter interface, run tests so they all fail to start, and incrementally implement the adapter functionality. Please refer to @docs/adding-agents.md.
All functionality should be committed into a branch.
Implemented end-to-end in a new worktree/branch, including the “fail first, then incrementally pass” flow.
/Users/tarunsachdeva/code/traces-worktrees/feat-pi-adapter on branch feat/pi-adapter.packages/shared/src/agent.ts and cli/src/types.ts.cli/src/config.ts.cli/src/adapters/pi/v1.ts and registered/exported it in cli/src/adapters/index.ts.cli/test/fixture/pi/agent/sessions/--Users-tarunsachdeva-code-traces--/....cli/test/core/adapters.test.ts.skills/share-to-traces/SKILL.md.Validation flow I ran:
bun test test/core/adapters.test.ts → Pi tests failed (9 failures as expected: availability/discovery/content).bun test test/core/adapters.test.ts → all pass.bun test in cli → 228 pass, 0 fail.bun run build in packages/shared → success.bun run typecheck → fails due pre-existing unrelated CLI typing issues (already present baseline).Committed to branch:
ca6ffc9feat: add Pi adapter for local session ingestionCo-Authored-By: openai/gpt-5.3-codex <opencode@openai.com>Note:
bun.lock is still unstaged/modified in the worktree from bootstrap install, and was intentionally not included in the commit.If you want, next I can:
feat/pi-adapter to origin.can u rebase from main i added some things