pi-coding-agent is an Emacs front end for Pi, a coding-agent harness. The Pi CLI keeps running the agent, talking to models, and executing tools. The package talks to it over RPC and presents the session as two Emacs buffers: a Markdown chat buffer with the conversation, tool output, and thinking blocks, and a separate input buffer where you compose the next prompt.
Because the prompt lives in an ordinary buffer, you edit it with your existing Emacs habits: multi-line editing, the kill ring, keyboard macros, registers, spell checking, or Evil. Slash commands, prompt templates, skills, and file paths complete with TAB. The chat buffer renders Markdown with tree-sitter highlighting for code blocks and diffs, collapses long tool output to a preview, rewraps wide tables to the window width, and opens file targets at a line and column with RET.
Each project directory gets its own session, and named sessions allow several per directory. You can queue a follow-up while Pi is busy, send a steering message that interrupts remaining queued tools, abort a response, resume or fork earlier sessions, and compact the context when it fills. The header line shows the current model, thinking level, cost, and context usage.
Features
- Two-buffer layout: a rendered chat buffer above a plain Emacs input buffer, so the prompt is never trapped in a terminal text box
- RPC integration: Emacs receives structured messages and tool events from Pi rather than parsing terminal output
- Completion: TAB completes slash commands, prompt templates, skills, and file paths
- Rendered output: tree-sitter highlighting for code and diffs, collapsible tool and thinking blocks, foldable turns, and display-only table rewrapping
- File navigation: RET visits a file target at point, honoring path:line:col locations, and ! runs a Dired-style shell command on it
- Session control: per-project sessions, named sessions, resume, fork from a turn, compaction, and HTML export
- Steering and queueing: queue follow-ups, send steering messages mid-turn, and abort responses
- Transient menu: C-c C-p exposes model selection, thinking level, sessions, fork, compact, export, stats, skills, and custom commands
- Project trust: passes --approve by default so project-local .pi prompts, skills, and extensions load, configurable to default or no-approve
- Evil integration: optional keybindings modeled on the Evil and Magit pairing


