pi-lot
a desktop gui for ai coding agents — 248 commits of slop creep
February 2026 — February 2026
a desktop gui for ai coding agents — 248 commits of slop creep
February 2026 — February 2026
Overview
pi-lot was a desktop GUI for the pi coding agent. An Electron app that spawned pi as a subprocess and communicated over JSON-RPC, giving you streaming chat, tool execution display, model selection, session management, and analytics in a native window.
99% vibe coded. 248 commits in 10 days. Then shelved. The full retrospective is in the blog post.
The numbers
| Metric | Value |
|---|---|
| Commits | 248 across 9 active days |
| Lines of code | ~57,000 across 339 files |
| Agent sessions | 160 |
| API cost | $389.65 |
| Tokens consumed | 525 million |
| Tool calls | 9,806 |
| Hand-written code | ~1% |
Architecture
Process model
Standard Electron two-process architecture with pi spawned as a JSON-RPC subprocess. This avoided the nightmare of bundling pi's ESM modules into Electron's CommonJS main process — pi runs exactly as it would in a terminal.
RPC communication flow
The main process manages pi's lifecycle through PiRpcClient, which wraps a child process with JSON-RPC over stdin/stdout. Streaming events flow back through IPC to the renderer.
IPC handler architecture
IPC handlers were split into domain-specific modules to keep the main process organized. Each module registers its own handlers through a shared context.
Session management
SessionManager in the main process tracks all open pi sessions, each backed by its own PiRpcClient subprocess. It handles lifecycle (open, send, abort, fork, compact, dispose) and routes events back through a callback.
State management — domain store architecture
The client-side state went through a major refactor (SR-TASK series). The monolithic session store was split into four focused domain stores, with a compatibility facade preserving the original API.
The event pipeline used pure reducer functions — each event maps to a typed mutation descriptor with no store access or side effects. A dispatcher applies these descriptors to the appropriate stores. This pattern enabled comprehensive regression testing.
Frontend feature structure
Key features at time of shelving
- Streaming chat with markdown rendering in a native window
- Tool execution display — structured rendering of file reads, writes, edits, bash commands
- Model selector with dynamic model switching per active session
- Session management — multi-session with workspace-scoped sidebar navigation
- Session forking — branch conversation trees at any point
- Context compaction — trigger pi's compaction from the UI
- Analytics route — session cost tracking and aggregation
- Review route — file diff panel for reviewing agent changes and submitting feedback back to the agent
- Git integration — diff, status, log, branch info surfaced in the UI
- Auto-commit — commit staging from the app
- Full theme system — dark/light mode with design tokens
- Structured logging with validation and event schemas
- Regression test harnesses for session UX failure modes
- Settings — pi provider config, keybindings editor, auth management
What was left on the roadmap
- Session persistence and resume across app restarts
- Multiple workspace tabs
- File references (@file mentions in chat)
- Image paste support
- Keyboard shortcuts system
Why it was shelved
Read the full story: pi-lot: a slop creep journey
What came after
The project split into two layers that belong in different places: