← Back to all posts
Tools

Pydantic Ships Pax, a Plugin-First Terminal Coding Agent That Undercuts Codex on Cost

November 26, 2026 · 03:20 UTC · Tools
On this page 8 sections
Pydantic Ships Pax, a Plugin-First Terminal Coding Agent That Undercuts Codex on Cost

TL;DR

Pydantic shipped Pax on November 25, its official coding agent for the terminal, built on the Pydantic AI Harness SDK that entered beta the same day. Everything in Pax is a plugin, the coding agent included: switch it off, swap in any Pydantic AI agent with --agent, run any model, and sign in with an existing ChatGPT or GitHub Copilot subscription. In Pydantic's own single-run SWE81 numbers, Pax posted the best average score of the four harnesses that ran all eight models, and it cost less than Codex on every model both ran, under half as much on GPT-6.2 Sol ($9.21 vs $21.05 a run). MIT licensed, Python 3.11+, on PyPI today.


At a glance
A coding agent made of parts you can remove
Nov 25
harness beta and pax announced, on pypi the same day
58.5
top average of the 4 harnesses running all 8 swe81 models
$9.21
avg run cost on gpt-6.2 sol, where codex costs $21.05
100+
capabilities in the harness sdk
8
cloud sandbox providers, plus two local micro-vms
MIT
license, python 3.11+, source in the pydantic-ai repo

What shipped

Two things, one stack. The Pydantic AI Harness is the SDK layer that launched alongside Pydantic AI v2 in June: more than 100 capabilities you can bolt onto any agent, covering workspaces, memory, sub-agents, context management, model fallback, and durable execution that survives crashes. Coder() is one of those capabilities, a ready-made coding agent with file and shell tools. Pax is the terminal interface in front of it all, and the stack is nesting dolls: an agent framework inside a harness SDK inside a terminal, with the coding agent as one doll you can replace with your own.

The plugin claim is literal. Open the /plugins menu and toggle corder, sandbox, observability (Pydantic Logfire tracing), and mcp on or off. Turn corder off and Pax is a clean chat client with no file or shell tools. Any Pydantic AI capability works as a plugin by import path, and Pax will write new plugins for itself when asked; supervise that like any other intern with shell access.

The other half is --agent. Point Pax at any Pydantic AI Agent object from your own codebase and it loads that agent instead, with no plugins, while keeping the terminal conveniences like --resume and --worktree. The pitch for anyone shipping agent features: build the agent in your repo, drive it in a real terminal, then run the identical Agent object in production. Source lives in the pydantic-ai repo on GitHub, and the package used to be called pydantic-clai2; settings, sessions, and plugins carry over.

The stack
Four layers, one install
Layer 1
Pydantic AI
the agent loop, models, tools, structured output
Layer 2
Harness SDK
100+ capabilities: workspaces, memory, fallback
Layer 3
Coder()
coding tools bundled as one capability
Layer 4
Pax TUI
everything a plugin, agent swappable with --agent
Each package installs the one it is built on. Source: PyPI package description, Nov 2026.

The numbers, with their asterisks attached

Pydantic benchmarked Pax against other harnesses on Terminal-Bench and Harness-Bench. The headline set is Harness-Bench SWE81: 81 tasks, eight models, single runs from November, with cost measured as the average price of one run over all 81 tasks. Among the four harnesses that ran every model, Pax averaged 58.5, ahead of OpenCode at 58.2, deepagents-code at 57.6, and pi at 57.3. pi was the cheapest of the four at $6.47 a run, against Pax's $7.69.

Harness-Bench SWE81, 8 models
Best average of the field, narrowly
paxother harnesses
Pax
58.5 $7.69
OpenCode
58.2 $8.04
deepagents
57.6 $9.43
pi
57.3 $6.47
Score first, then average cost per 81-task run. The spread is 1.2 points; pi is cheapest, Pax scores highest. Source: Pydantic, single runs, Nov 2026.

Against the native harnesses the cost gap widens. On GPT-6.2 Sol, Pax scored 64.7 for $9.21 ($0.14 a point) while Codex scored 60.1 for $21.05 ($0.35 a point). On Claude Opus 5.5, Pax scored 61.2 for $24.61 against Claude Code's 60.4 for $25.10. A separate head-to-head on GPT-6.1 Sol went to Codex on score, 63.0 to 62.4, but Pax burned 8.0M input tokens a run to Codex's 20.8M, which is 29% less spend. With the stock grader instead of the relaxed rescore, Pax still led: 51.0 to 49.8 on Sol, 54.9 to 53.5 on Opus.

Average cost per 81-task run
Where the money goes
paxnative harness
gpt-6.2 sol
Pax
$9.21 64.7
Codex
$21.05 60.1
claude opus 5.5
Pax
$24.61 61.2
Claude Code
$25.10 60.4
Cost per run with the SWE81 score beside it; bars share one scale. Source: Pydantic, single runs, Nov 2026.

Now the asterisks, from Pydantic's own footnotes: these are single runs; Sol and Opus used a relaxed rescore applied identically to every harness; and Pax ran Sol with Coder(autonomy='max'), the unattended setting that never stops to ask. Costs use list-price tokens for OpenAI and Anthropic models and OpenRouter billed cost for MiniMax and Kimi. Full methodology and reruns arrive with the 1.0 launch, promised for roughly a month out.

Any model, any account

Pax's default model is openai-codex:gpt-6-astra, which runs on a ChatGPT subscription via /login openai-codex; /login github-copilot does the same for Copilot subscribers, and neither needs an API key. You can switch models mid-conversation, stack several accounts of one provider and let Pax roll to the next at a rate limit, and build fallback chains that try Codex first and Claude second. Keys are encrypted in your system keychain, and the shell commands the agent runs never see your provider API keys.

Where it runs, and how it reads

Before the first prompt, /sandbox moves the session into E2B, boxd, Daytona, OpenSandbox, Modal, Render, Sprites, or Kubernetes, or a local smol or BoxLite micro-VM. Pax syncs your branch and uncommitted diff while every edit, build, and ! command runs inside the sandbox. On the proxy-enabled providers (e2b, boxd, daytona, opensandbox), your GitHub token never enters the sandbox: an egress proxy injects it only on outbound requests.

Code mode is on by default. Instead of one tool call per file, the model writes a short Python snippet in Monty that searches, reads what it needs, and returns only the result. Speculative execution, Ctrl+X then Ctrl+S, starts safe file reads while the model is still streaming. Repo conventions carry over too: repo_context reads AGENTS.md and CLAUDE.md, and the coder plugin loads Agent Skills from .agents/skills and .claude/skills.

Switching costs one flag

pax --resume-claude and pax --resume-codex import your existing sessions from either tool, and /resume lists them next to Pax's own. Every conversation is saved, forkable into the background, and rewindable to an earlier prompt. To try it without installing, run uvx pydantic-ai-pax; to keep it, uv tool install with uv. One gotcha the docs flag: macOS ships an unrelated /bin/pax archiver, so if the wrong pax starts, open a new terminal or run pydantic-ai-pax directly.

Before you switch
Two questions decide it
Already paying for ChatGPT or Copilot?
yes
log in with the subscription, no api key, switch models mid-chat
no
api keys work for openai, anthropic, and other pydantic ai providers
Coming from Claude Code or Codex?
yes
import sessions with --resume-claude or --resume-codex; AGENTS.md and skills load as usual
no
run uvx pydantic-ai-pax in a project you trust
Per the Pax documentation and PyPI README, Nov 2026.

Caveats

  • The benchmarks are self-reported single runs on benchmarks the vendor chose, and the full Harness-Bench methodology lands with 1.0. Treat the tables as promising, not settled.
  • This is a beta at 0.75.0. The public API freezes only at 1.0, under the same version policy as Pydantic AI.
  • Locally, Pax runs commands and edits files as you, with no sandbox and no approval step, per its own README. Use the sandbox modes for anything you do not trust.
  • Durable execution exists in the Harness SDK but not yet in Pax, and computer use arrives in the next release.
  • The default model is OpenAI's, and the cost story will differ on your models and your repo. Measure before you migrate.

Key Takeaways

  • Pydantic shipped Pax on November 25, an MIT-licensed terminal coding agent on PyPI (Python 3.11+), plus the Pydantic AI Harness SDK beta, with 1.0 promised in about a month.
  • Everything in Pax is a plugin, including the coding agent: disable it for a plain chat client, or point --agent at your own Pydantic AI agent and keep the terminal UI.
  • On Pydantic's single-run SWE81 benchmark, Pax averaged 58.5 across eight models, the best of the four harnesses that ran them all, ahead of OpenCode (58.2), deepagents-code (57.6), and pi (57.3).
  • Cost is the sharper edge: $9.21 a run against Codex's $21.05 on GPT-6.2 Sol, where Pax also scored higher, 64.7 to 60.1. On the GPT-6.1 Sol head-to-head, Codex kept the score lead 63.0 to 62.4, at 29% higher cost.
  • It runs any model, signs in with ChatGPT or Copilot subscriptions, chains accounts and fallback models, and moves sessions into eight cloud sandboxes or two local micro-VMs before the first prompt.
  • Migration is cheap: --resume-claude and --resume-codex import existing sessions, and AGENTS.md, CLAUDE.md, and Agent Skills load from their usual paths.

Sources: Pydantic announcement, Nov 25, 2026, Pax documentation, pydantic-ai-pax on PyPI, pydantic/pydantic-ai on GitHub

AIPydanticPaxCoding AgentsTerminalOpen SourceBenchmarksPydantic AI
CONSOLE
$