Pydantic Releases Pax, a Terminal Coding Agent That Beats Codex for 29% Less
Pydantic launches Pax, a plugin-first terminal coding agent where even the agent is swappable, benchmarking competitively against Codex and Claude Code
Takeaways
- Pydantic released Pax, a plugin-based terminal coding agent built on the Pydantic AI Harness SDK.
- Install with
uvx pydantic-ai-pax; every component including the coder is a toggleable plugin. --agentflag runs any Pydantic AI Agent from your codebase, same object you ship to production.- Workspace abstraction lets agents run locally or in E2B, Daytona, Modal, Kubernetes, and other sandboxes.
- On SWE81, Pax beat Codex 64.7 to 60.1 on GPT-6.2 Sol at less than half the cost.
- Harness library targeting 1.0 in about a month; durable execution and computer use coming soon.
Pydantic has released Pax in beta, a terminal coding agent whose interface and coding behavior are assembled from plugins. It runs on Pydantic AI Harness, a library of reusable capabilities within Pydantic AI, the company’s Python framework for building model-powered agents. Developers can use Pax as an interactive coding tool or as a terminal front end for an agent they plan to deploy.
With uv installed, developers can launch the beta without adding Pax to a project:
uvx pydantic-ai-pax
The coder is a capability
Within Pydantic AI, a coding harness is represented by Coder(), a bundle of capabilities that equips an agent to inspect files, edit code, and run shell commands. Pax wraps that bundle in a terminal interface. The underlying Harness SDK can also add the same behavior to other Pydantic AI agents.
Plugins control every layer
Pax implements its coder, sandbox integration, Model Context Protocol support, Logfire tracing, session persistence, and context compaction as plugins. The /plugins command lists active plugins and allows users to change them during a session:
/plugins
/plugins disable coder
Disabling the coder removes file and shell tools, leaving a general chat client. Any Pydantic AI capability can load as a plugin through its Python import path.
Pax can also generate plugin code on request. Because importing a Python plugin executes its code, generated and third-party plugins should be reviewed before loading.
Bring your own agent
The --agent option replaces Pax’s default agent with any Pydantic AI Agent object from a codebase. Pax loads none of its default plugins in this mode and preserves the imported agent’s model, tools, capabilities, and instructions. Terminal features such as session resume and Git worktree support remain available.
from pydantic_ai import Agent
from pydantic_ai.capabilities import LocalWorkspace
from pydantic_ai_harness import Coder
reviewer = Agent(
'openai:gpt-6.1-sol',
instructions='You review diffs against our engineering guidelines.',
capabilities=[LocalWorkspace('.'), Coder()],
)
If that object is stored as reviewer in my_agents.py, Pax can load it with:
pax --agent my_agents:reviewer
The imported object can then move into production without a separate terminal-specific agent definition. That keeps model selection, tools, instructions, and capabilities in one place while the surrounding interface changes.
Workspaces move across sandboxes
Coder’s file and shell tools target a workspace abstraction, allowing the same agent code to operate on a laptop or in a cloud sandbox. Users select the workspace before sending the first prompt:
/sandbox e2b
/sandbox daytona
/sandbox modal
Local micro-VM options include smol and BoxLite. On providers that support egress proxying, the GitHub token remains outside the sandbox; the proxy adds it to outbound GitHub requests after the traffic leaves the isolated environment.
Code mode reduces tool traffic
Pax enables code mode by default. The model writes short Python snippets for Pydantic Monty to execute, allowing one snippet to search, read, filter, and return selected information. This reduces the number of separate exchanges between the model and individual tools.
Speculative execution can begin safe file reads while the model is still streaming a snippet. Logfire records each underlying tool call as a separate trace span, preserving visibility into the work performed by the generated code.
Early benchmarks show lower costs
Pydantic tested Pax on Harness-Bench SWE81, a coding benchmark, across eight models. Among the four harnesses that completed every model, Pax recorded the highest average score at 58.5. OpenCode scored 58.2, deepagents-code scored 57.6, and pi scored 57.3.
Pydantic also compared Pax with the native Codex and Claude Code harnesses. Its reported results were:
| Setup | Score | Cost per run |
|---|---|---|
| Pax on GPT-6.2 Sol | 64.7 | $9.21 |
| Codex on GPT-6.2 Sol | 60.1 | $21.05 |
| Pax on Claude Opus 5.5 | 61.2 | $24.61 |
| Claude Code on Claude Opus 5.5 | 60.4 | $25.10 |
In a separate comparison using GPT-6.1 Sol, Pax scored 62.4 and Codex scored 63.0. Pydantic reports that Pax cost 29% less and consumed 8.0 million input tokens per run, compared with 20.8 million for Codex.
These figures are vendor-reported beta results. Pydantic says it will publish the full methodology and reruns with the 1.0 release, so independent comparison remains limited until those materials arrive.
Migration paths preserve existing work
pax --resume-claudeimports a Claude Code session and continues it with a selected model.pax --resume-codexprovides the same path for Codex sessions.repo_contextreads project instructions fromAGENTS.mdandCLAUDE.md.- The default coder plugin loads Agent Skills from
.agents/skillsand.claude/skills.
The beta still has gaps
- Version stability: Pydantic expects the Harness to reach 1.0 roughly one month after the beta announcement. After stabilization, it will follow the same versioning policy as Pydantic AI.
- Durable execution: The Harness SDK can preserve work across process interruptions, but Pax does not yet expose that capability.
- Computer use: A planned
/computer-usecommand will connect to native OpenAI, Anthropic, or Google computer-control tools. - macOS command conflict: macOS already ships an unrelated archiver at
/bin/pax. A fresh shell may resolve the path after installation; users can also invokepydantic-ai-paxdirectly.
One agent across two environments
Pax’s central design choice is the shared Agent object: developers can exercise production tools and instructions in a full terminal workflow, then deploy the same definition through Pydantic AI. That can reduce duplicated configuration and expose integration problems earlier, while the beta’s unfinished features and unpublished benchmark methodology remain important evaluation constraints.