Skip to main content
Screenshot 2026-10-06 at 7 23 29 PM pcode fixing a bug: a word-level diff of the edit, then a worker sub-agent reviewing it with its own plan nested under the task list

pcode

pcode is a terminal-native coding agent built for long-running and parallel work. Background commands wake the agent when they finish, every session can use its own git worktree, conversations can be rewound and forked, and every tool call stays inspectable.

  • Slow work doesn't block you. Long commands become background jobs, and a finished job wakes the agent, so it can watch tests or CI and fix what fails.
  • Agents in parallel. A git worktree per session lets several agents work on one repo at once.
  • Rewind and fork. /tree returns to any point in a conversation and branches from there. Every session is kept, so you can resume or search it.
  • Nothing hidden. /tools shows every command the agent ran and its full output, and scrollback re-renders to show or fold every command and diff.

It runs on any model Pydantic AI supports, or on your Claude or ChatGPT subscription.

Documentation: cruxwell.github.io/pcode

Install

With Homebrew:

brew tap cruxwell/pcode https://github.com/cruxwell/pcode.git
brew install cruxwell/pcode/pcode

Or from PyPI with uv:

uv tool install 'pcode[claude]'

brew install --HEAD tracks master instead of the latest release.

Quick start

codex login                                  # or /login [claude|openai-codex] inside pcode, or export a provider API key
pcode -m openai-codex:gpt-5.6-luna           # interactive; /model (Ctrl+L) saves a default
pcode                                        # reuses the saved model, or opens the offline preview
pcode -C /path/to/repo "Summarize the open TODOs"
git diff | pcode -p --no-save                # non-interactive: reply to stdout
pcode --continue                             # resume this directory's newest session
pcode --theme-preview                        # offline sample output and the style gallery

Live mode edits files and runs shell commands with your permissions and no approval prompt. Read tool permissions before pointing it at anything you care about.

More

  • Your subscription: Claude runs through Anthropic's own Agent SDK and Claude Code login, the way Anthropic supports, and ChatGPT through a Codex login. See providers.
  • Email remote control: send a task from Gmail on your phone, reply to keep going, and take the session over at a terminal with pcode --attach.
  • Custom keybindings and Vim editing: map keys to commands with arguments, add a Space leader in normal mode, or use jj to leave insert mode.
  • /btw side questions, background sessions, recall of past sessions, a browser the agent can drive, and Python extensions.
  • Pydantic AI's Harness coder capabilities, with the rest of a finished agent on top: MCP with OAuth and tool search, searchable sessions, jobs, worktrees. Extensions are plain Pydantic AI capabilities. The conversation tree follows pi's.

See PLAN.md for the longer-term direction.

Documentation

Page What it covers
Getting started Homebrew and source installs, -C, --print, shell completion
Scrollback and transparency Guide: what goes into scrollback, /tools, /diffs
A shell for long-running work Guide: background jobs, watching CI
Parallel agents Guide: worktrees, parallel sub-agents, /agents
Extending pcode Guide: extensions, skills, settings
Providers and models Authentication, supported providers, the model picker, reasoning effort, Claude Code, Meridian, proxies
Configuration pcode config, per-repository overrides, trusting repository code, the settings table, syntax styles
Commands and keys Slash commands, key bindings, vi mode, tmux newlines, status line, !command, the diff and tool inspectors
Keybindings Custom command mappings with /bind, Ctrl shortcuts, vi editing, a normal-mode leader, and custom escape sequences such as jj
Tools Tool permissions, web search, the browser, code mode
MCP servers Opt-in MCP configuration, OAuth sign-in, deferred tool search
Working in a repository AGENTS.md/CLAUDE.md, skills as slash commands, one worktree per session
Sessions and recovery Saving, resuming, recalling earlier sessions, checkpoints, retries
Context, limits and caching Prompt overhead, compaction, output limits, prompt cache notices
The transcript What lands in scrollback: diffs, thinking, errors, command output, /redraw
Conversation tree /tree: rewinding and forking a conversation
Side questions /btw: asking about the running turn without interrupting it

The same pages build into a browsable site with make docs-serve; make docs checks every page and anchor link.

Contributing

Bugs: open an issue. Security problems: see SECURITY.md. Setup and checks are in CONTRIBUTING.md.

make test        # fast suite; real-tmux regressions skipped
make test-all    # everything, before touching layout, streaming, the editor, or the prompt

AGENTS.md has the worktree workflow and the traps worth knowing before editing. Contributor notes (architecture, dependencies, profiling, prompt caching, provider design) live in dev/, outside the published docs.

Metadata

Release files for pcode 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pcode 0.1.1
File Size Uploaded
pcode-0.1.1.tar.gz 591.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pcode 0.1.1
File Interpreter ABI Platform
pcode-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 1.3 MB

Release files / pcode-0.1.1.tar.gz

Download URL pcode-0.1.1.tar.gz
Size 591.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d925f2010637b24a8c8f9cfb51639fc3a7964bbf8e8c0ea61f8462a0404a9f26
BLAKE2b-256 checksum
How to use checksums
6e25bada09b99d389224c98991dc9899854b1d59289d1ad8e51d52a999127745
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.

Transparency log

Release files / pcode-0.1.1-py3-none-any.whl

Download URL pcode-0.1.1-py3-none-any.whl
Size 675.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0b0d183496e7889d722422dfa89d1e8bfc46e0d7ce0012bde6197671af96f208
BLAKE2b-256 checksum
How to use checksums
7d3fb8c036b14a169cc035f9a0f74cd5f503c6261798a20aee972e090b0b7ed5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.2

2 release files

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page