u/Equivalent-Task8081

pcode: pi-inspired conversation trees, Python extensions, and more included out of the box

pcode: pi-inspired conversation trees, Python extensions, and more included out of the box

I built pcode around the parts of my coding-agent workflow I wanted to keep together. Pi’s conversation tree and extensibility were influences, but I wanted a Python/Pydantic AI foundation and more features included by default. This is a separate open-source project, not a pi fork or plugin.

The main difference is where I put the defaults. Pi deliberately keeps the core minimal and lets you assemble the rest. I wanted a more fully featured setup out of the box, while keeping it highly customizable: sub-agents, live task tracking, browser automation with your existing logins, an opt-in sandbox extension, parallel git worktrees, background commands that wake the agent when they finish, customizable keybindings with leader keys, Vim editing, and an in-terminal diff viewer.

The feature I most wanted for myself was adjustable scrollback. Sometimes I’m working on production stuff and watching every command and tool result like a hawk. Other times it’s a side project and I just want a readable conversation. pcode lets you show or hide those details after the work is done, rebuilding what’s already in your terminal without rerunning anything. It uses native terminal scrollback, with reflow when you resize or split panes.

Customization is through small Python files: add tools, slash commands, guardrails, instructions, or sub-agents, then /reload without losing the conversation. It also builds on Pydantic AI and its Harness capabilities, so you’re not starting from scratch for things like repo context, shell execution, sub-agents, and context management. Extensions can register those capabilities directly. Several of pcode’s own features use the same extension system.

You can use your existing Claude or ChatGPT subscription, or API keys. Claude support runs through the official Agent SDK and Claude Code’s own login.

This is a separate project, not a pi fork or a drop-in replacement for pi’s extension packages. If you like pi’s approach but prefer Python and a more complete default setup, that’s who I think it could appeal to.

Repo, screenshots, and install instructions: https://github.com/cruxwell/pcode

For people who’ve built their workflow around pi: which parts do you prefer assembling yourself, and which would you rather have included from the start?

https://preview.redd.it/lf9tjlcyrcuh1.png?width=5648&format=png&auto=webp&s=85a1b9bdc41bcf4f4ba4ebfa80abed4637e3eb0c

reddit.com
u/Equivalent-Task8081 — 7 days ago
▲ 13 r/pydantic+1 crossposts

pcode: an open-source terminal coding agent built on Pydantic AI

I built pcode, an MIT-licensed terminal coding agent on Pydantic AI's Harness coder.

The framework-facing part is the extension model: Python extension files add tools, slash commands, guardrails and sub-agents via Pydantic AI capabilities. The repository is a concrete example of using those capabilities in an interactive coding application rather than a standalone agent script.

The terminal layer keeps native scrollback: you can change the visibility of commands, output and diffs after completion without rerunning them, while retaining normal terminal scrolling, search and copy. Long-running commands become background jobs that wake the agent when they finish. Conversations can be rewound and branched, and parallel sessions can use separate git worktrees.

It supports browser automation with your existing logins and models through API keys as well as existing Claude or ChatGPT subscriptions. The agent can edit files and run shell commands with your permissions and no approval prompt, so review the documented tool permissions before using it on a repository.

Source and implementation details: https://github.com/cruxwell/pcode

u/Equivalent-Task8081 — 7 days ago