akougkas.io

Why PanCode, part 1 of 5: your models, your machines

PanCode resolves every turn through a target you configured: a local server, an institutional gateway, a cloud API, or a subscription sign-in. With no target there is no session, because the harness has no hosted model of its own to fall back on.

Published
Reading
8 min read
Topics
agents, systems, building

Most coding agents answer the question of where your code goes before you have asked it. PanCode, the systems software for coding agents that I write and maintain, answers it the other way: every turn resolves through a model service you named, and there is no hosted model underneath it waiting to take over. With nothing configured the resolver returns no targets configured and the session does not start.

That refusal is the design, not a rough edge. A scientist with code under an export restriction, a lab with a gateway allocation, and an engineer with one GPU under the desk all need the same guarantee, and a silent failover to somebody’s API would void it for all three.

One harness, many runtimes

A saved model service is a target: a runtime id, an endpoint, a model id, and whatever credentials the endpoint wants. Chat, workers, and optional model-assisted memory each resolve through a target, and they need not resolve through the same one. Configuration is target-first, which means the harness has no provider-specific flags that route around settings.yaml.

Four families of target ship in the tree. On your own workstation or server, the local runtimes cover llama.cpp, Ollama, LM Studio, vLLM, SGLang, and Lemonade. Through a gateway or a compatible API, LiteLLM and the generic OpenAI-compatible and Anthropic-compatible runtimes reach anything speaking those two protocols. As cloud APIs, OpenAI, Anthropic, Google, OpenRouter, Groq, Mistral, DeepSeek, and Amazon Bedrock each have a descriptor. By subscription sign-in, a ChatGPT plan connects through openai-codex and a Claude plan through anthropic-max, so an account you already pay for is a route rather than a second bill.

Institutional inference, reached through the gateway family, is the reason the list is not just a compatibility table. Argonne’s ALCF inference gateway is an OpenAI-compatible target backed by Globus OAuth, with pancode auth login alcf opening an authorize URL and asking you to paste the displayed code back. That flow was chosen because it survives SSH: a researcher on a login node with no browser can still authenticate. Sophia and Metis are configured as separate cluster targets, and PanCode sends the configured wire model id literally rather than rewriting it, because a gateway’s model names belong to the gateway.

Four families of model service feed one saved target: local servers such as llama.cpp, Ollama and vLLM; the ALCF inference gateway reached through Globus; cloud APIs such as OpenAI, Anthropic and Groq; and a Claude or ChatGPT subscription plan. The target resolves into one PanCode harness, which produces one receipt. local servers ALCF gateway cloud APIs subscription plan saved target one PanCode harness one receipt
Four families of model service feeding one saved target, which resolves into one harness and one receipt.

Why a small model is worth pointing at

Choice of model is worth little if only a frontier model can drive the agent. Three properties of the harness are what let a model small enough to fit on a single workstation GPU do useful work, and each gets a part of this series to itself.

The agent never receives a raw shell as its general-purpose escape hatch. Tools are typed, and a turn’s constraints are shared between admission and prompt guidance so that ordinary English is not treated as an authorization parser. A weaker model produces malformed calls more often, and a typed boundary turns those into rejections instead of damage. Part 2 takes that apart.

Context is accounted for rather than hoped about. Since v0.5.2, input plus reserved output is enforced at submission, at settled tool continuation, and at the final provider boundary, and the live budget is inspectable through /context. When a handoff is needed the agent writes its own note, preserved exactly as it authored it. Part 3 follows that mechanism.

Every run seals a receipt. Tool activity, usage, traces, decisions, evidence, and worker results are recorded, which is what converts a cheap second opinion from a claim into a lead you can check. Part 4 covers bounded workers and what their receipts do and do not establish.

None of that makes a small model correct. It bounds what a wrong answer can cost and leaves a record of what was attempted, which is a different and more achievable promise.

What v0.5.0 put in public

PanCode reached v0.5.0 on September 20, 2026, and I wrote separately about what made “public” the right word. For the provider layer the launch changed two things a newcomer meets first. The README was rewritten for a first-time reader and reviewed against the implementation, so the commands on the front page describe the build that ships. And pancode configure opens a launcher whose Quick Connect path takes an endpoint, credentials if the endpoint needs them, and a model selection, then shows you the connection before saving it. LM Studio commonly listens at localhost:1234 and Ollama at localhost:11434; subscription sign-in lives under Settings → Connections.

The same release bundled a local browser application. pancode gui starts a server bound to 127.0.0.1 and prints a private launch link, and it reads the same configuration, sessions, traces, and evidence as the command line. The documentation ships with the package, so asking PanCode how to use PanCode consults the version you are running instead of a guess. The launch notes call the terminal the primary coding interface and the wider application an early preview. PanCode is pre-1.0 and experimental by design; interfaces can move between minor versions.

The provider layer has kept moving since. On September 22, 2026 an inception runtime landed for Inception’s Mercury diffusion language models, authenticated from INCEPTION_API_KEY, with mercury-2.5, mercury-2, and mercury-edit-2 as its known wire models. A diffusion model denoises whole blocks of tokens in parallel instead of emitting them left to right, which is what makes it fast enough for a latency-sensitive slot a frontier model cannot fill. Two surfaces are wired: chat at /v1/chat/completions with tool calling and JSON-schema structured outputs, and fill-in-the-middle at /v1/fim/completions through the same infill() verb that reaches llama.cpp’s. Mercury Edit 2’s next-edit prediction is deliberately left out, because it needs a contract verb of its own and its request format is not covered by the published reference. The runtime shipped in v0.5.3; no rates ship with it, and cost accounting reads the target’s own pricing block as it does for any other target.

Three model families with three different physics, one socket. That is the shape the provider layer is built to hold.

Try it

You need a model service whose tool calling works. The installer brings its own Node.js and needs no root:

curl -fsSL https://pancode.dev/install.sh | sh
cd /path/to/your/project
pancode configure

With Node.js 22.19 or newer already installed, npm install -g pancode works too. pancode configure looks for a model server on the usual local ports and offers what it finds. Pick it, or set up something else, select a model, and review the connection before saving. Then check the installation and start a session:

pancode doctor
pancode

Ask for something bounded on the first turn, such as an explanation of how the repository builds and tests itself. When you want the same work in a browser, open the desktop app, which is in alpha:

pancode gui --open

It is served from your own machine and shares the terminal’s configuration and sessions. For a longer walk through a local server, the GPU tutorial covers runtime ids, quantization, and reading the receipt.

What is left for you

The provider list is long and the tested list is shorter. A useful record of a model names the exact artifact, quantization, runtime, hardware, context window, and observed quirks, and most of what people actually run has never been through that. If you connect PanCode to a local server, a gateway, or a model nobody here has exercised, the useful artifact is that record: what you ran, where it was served, what the tool calls did, and where it failed. A difficult build, an unreliable connection, or a workflow that needs too much babysitting is equally worth reporting. pancode report (or /report inside a session) fills in your version and setup, masks paths, host names, and secrets, and shows you the exact text before anything is sent.

Next in the series Part 2: Typed tools, never a raw shell

Sources, code, and records

  1. source

    PanCode

    PanCode's website.

  2. source

    Run PanCode on your own GPU

    Connecting a local model server with no account or key, from install to the first receipt.

  • 2023–present
    active

    PanCode

    Systems software for coding agents

More on PanCode

  1. essay

    Reliable work from unreliable agents

    A coding agent is a system built around one brilliant, persuasive, unreliable component. The argument of my November 9, 2026 lecture on agentic engineering: five ideas for building trustworthy work around that component, what they could do for science, and the problems still open.

    14 min
  2. essay

    A capable model in a capable harness

    Claude 3.5 Sonnet brought me back to writing code. A capable model still needs a harness that makes its progress checkable and its cost visible, and PanCode is the one I built around models that many people can afford to use.

    4 min
  3. essay

    An accountable agent says what it is waiting on

    Across the PanCode 0.6 line, from v0.6.0 on October 3 to v0.6.9 on November 6, accountability narrowed to two statements an agent should be able to make at any moment: under whose authority it acts, and what it is waiting on.

    4 min