SNAPSHOT · TIER B · CLI

Pi 0.84.1@936aff0

Clean source inspection of package version 0.84.1 pinned to one commit. Negative safety claims describe the documented core boundary, not every third-party Pi extension. A native experiment is still required for Tier A.

pi-2026-08-10-sourcecurrent7 claims
Evidence boundary

Source claims are pinned to commit 936aff00918d; product behavior still requires independent experiments.

looppartial
contextpartial
toolspartial
safetypartial
reliabilityunknown
extensibilitypartial
orchestrationpartial
interfacesunknown
observabilitypartial

Pi coding-agent source map

This page is pinned to package 0.84.1 at commit 936aff0. The research target is the agent core and coding-agent CLI in the official monorepo, not the behavior of third-party Pi packages.

Agent wrapper
  → agent-loop (model / tools / steering / follow-up)
  → AgentEvent stream
  → AgentSession
      ├─ SessionManager: append-only JSONL tree
      ├─ compaction / branch summary
      ├─ built-in tools
      └─ ExtensionRunner / resources / UI

1. Loop

The low-level runLoop has a clear two-level shape: the inner loop handles tool calls and steering, while the outer loop checks the follow-up queue when the agent would otherwise stop. The Agent wrapper stores the transcript, queue modes, model, and tools and forwards events to subscribers. Claim: pi-source-agent-loop.

2. Context

The coding-agent layer combines provider usage with token estimates, keeps a recent tail, summarizes an older region, and records read/modified files. Compaction changes the model-visible projection while the full session tree remains in JSONL. Claim: pi-source-context-compaction.

3. Tools

Arguments are validated before a before-hook. A batch runs sequentially or in parallel according to configuration, then passes normalized results through an after-hook and back into context. When a length stop may have truncated tool arguments, the loop fails those calls instead of executing incomplete input. Claim: pi-source-tool-dispatch.

4. Safety

The key result is negative: Pi core has no built-in permission system or OS sandbox. Project trust controls loading of project-local settings, packages, and extensions; tools still inherit host-process permissions. Isolation must come from a container, VM, micro-VM, or policy sandbox. Claim: pi-source-execution-boundary.

5. Reliability

The source includes provider retry, auto retry, abort, truncated-call protection, and session migration. This project has not yet produced a shared failure taxonomy or fault-injection runs, so the dimension remains partial; retry code does not establish recovery success.

6. Extensibility

ExtensionRunner is the main product-layer extension boundary. Extensions can add or replace tools, commands, UI, and providers; intercept calls; and change context transformation or compaction. Extensions run with Pi's process permissions, so capability and trust must be evaluated together. Claim: pi-source-extension-runtime.

7. Orchestration

Pi intentionally avoids prescribing a subagent model in core. Official guidance points to separate Pi processes, tmux, extensions, or packages. This keeps core small but makes the integrator responsible for process ownership, permission inheritance, workspace isolation, and merge policy. Claim: pi-source-orchestration-boundary.

8. Interfaces

Interactive TUI, print/JSON, and RPC are separate modes. The RPC command/response/event contract has its own server snapshot so process integration is not mixed with interactive UI behavior.

9. Observability

Live AgentEvent supports UI updates. SessionManager persists entries as an append-only JSONL tree with id/parentId; branching moves the leaf and later writes form a new path without deleting the old one. Claim: pi-source-session-events.

Design tradeoff

Pi demonstrates a strong minimal-core path: prescribe fewer platform policies and expose more composition points. The benefit is readable mechanism boundaries and low customization friction; the cost is that safety, subagent, and MCP behavior can vary materially with the extension stack. A meaningful Pi comparison must record core version, loaded extensions, and the outer sandbox.

PINNED SOURCE MAP

github.com/earendil-works/pi

936aff00918de1187f085f123c2812d8f2d67745
  • packages/agent/src/agent-loop.ts
  • packages/agent/src/agent.ts
  • packages/coding-agent/src/core/agent-session.ts
  • packages/coding-agent/src/core/compaction/compaction.ts
  • packages/coding-agent/src/core/session-manager.ts
  • packages/coding-agent/src/core/extensions/runner.ts
  • packages/coding-agent/docs/security.md
  • packages/coding-agent/README.md
CLAIM LEDGER7 REVIEWED · 0 DISPUTED
source + sourcereviewed

pi-source-agent-loop

Pi's pinned agent core uses an inner loop for model/tool/steering turns and an outer loop for queued follow-up messages, emitting explicit agent, turn, message, and tool lifecycle events throughout.

Mechanism
Agent Loop
Reviewed
2026-08-10
Sources
2
source + sourcereviewed

pi-source-extension-runtime

Pi's coding-agent layer uses an extension runner to dispatch lifecycle events and lets extensions add or replace tools, commands, UI, providers, context transforms, and compaction behavior without modifying the low-level agent loop.

Reviewed
2026-08-10
Sources
2
sourcereviewed

pi-source-orchestration-boundary

Pi intentionally omits a built-in subagent orchestration policy; its official project guidance points users to separate Pi processes or extensions so delegation semantics remain outside the minimal core.

Reviewed
2026-08-10
Sources
1
sourcereviewed

pi-source-tool-dispatch

Pi validates tool arguments, offers before- and after-tool interception points, and executes a batch sequentially or in parallel according to the configured strategy and individual tool constraints.

Mechanism
Tool Dispatch
Reviewed
2026-08-10
Sources
1