Skip to content

Setting up AI agents for Agda

The comparison post asks which models are worth pointing at Agda and what the trials showed. This is the practical half: how to get from nothing to an agent proving things with a proof assistant connected, in each of the four harnesses I have used, with the price of each route on a named date and a cost table built from sessions that ran rather than from list prices. Each step that was run is a command with the output it gave, and where a route stopped short of a passing test the post says where. The reference material, every plan, flag and file harness by harness, is the setup guide on the server's own site; this post takes one command per step from it, reports the runs that were recorded, and links it for the rest. A section on a local model server closes it, for the reader whose data cannot leave the machine.

Everything here ran on a workstation with Ubuntu 24.04. The harness versions are the ones the guide tested on 11 October 2026: Claude Code 2.1.282, Kimi Code CLI 2.1.1, Codex CLI 0.162.1 and Copilot CLI 1.0.95. Prices were read from the vendors' pages on 13 October 2026, before tax, and they change monthly: the pages are the source, this post is the map.

Five terms, and what leaves the machine

An agent harness is the program that runs a language model as an agent in your terminal: it reads and edits files and runs commands, with your permission. The Model Context Protocol (MCP) is how a harness gives its model tools that another program provides, and that program is an MCP server. The one here is agda-mcp, which answers calls such as check_file (does this file type-check?) and get_goal (what does this hole need?) by running Agda on your files. A registration is the few lines of JSON or TOML that tell a harness how to start the server; the harness starts it when a session begins and stops it when the session ends. An instruction file is a Markdown file the harness reads before the first prompt, CLAUDE.md or AGENTS.md, holding the conventions of a project or of you; a skill is a directory holding a SKILL.md, a procedure the model loads by name when a task matches its description. The server runs on your machine. The model does not.

YOUR MACHINE THE PROVIDER your files agda-mcp Agda the checkout you work in the server, on stdio the type checker runs reads Claude Code Anthropic Claude Code, routed Moonshot Kimi Code CLI Moonshot Codex CLI OpenAI Copilot CLI GitHub's model routing a login, or a Console key Claude Opus 5.5, Sonnet 5.5 the base URL set, a Moonshot key Kimi K3 a Moonshot key, or a membership Kimi K3 a ChatGPT login, or an API key GPT-6.1 Sol, GPT-6 Astra a GitHub login, or your own key GPT-6.1 Sol, Kimi K3, Claude Stays here: the server, Agda, the interfaces it writes, and your files. Leaves, on every request: the prompt, each file the session reads, and each tool result, the server's answers included. MCP over stdio: each harness starts the server when a session begins.
Who talks to whom. Each harness starts the MCP server beside it and reaches one provider across the boundary with one credential; the dashed route is the same Claude Code with one environment variable changed, which is also how a model on the local network is reached (the last section). Nothing the server does leaves the machine except as a tool result inside the next request.

So the first question a setup should answer is what leaves the machine. A session sends its provider the instructions it loaded, every file it reads, the output of every command, and every tool result, the server's verdicts included. Whether the provider may train on that is a setting of the account, and on every personal plan I looked at the default is that it may. The switches to check before a session reads anything private, as the vendors' pages stated them on 11 October, are as follows:

  • Anthropic: on Pro and Max the data is used for training while "Help Improve our AI models" is on, under Privacy in the Claude app's settings; Team, Enterprise and a Console key do not train by default.
  • OpenAI: on Plus and Pro the ChatGPT data controls decide; Business, Enterprise and the API do not train by default.
  • GitHub: since 24 April 2026, Free, Pro, Pro+ and Max sessions may be used for training unless "Allow GitHub to use my data for AI model training" is turned off in the Copilot settings; Business and Enterprise are not. The CLI also syncs sessions to the account unless its remote setting is off.
  • Moonshot: the terms allow training on customer content unless a written agreement says otherwise, and I found no self-serve opt-out.
  • Ollama: a local model sends nothing anywhere.

Before any harness: the server

Every registration below starts the server through the launcher script in the server's repository, agda-native-air, which is public. By default the launcher enters that repository's Nix shell, so agda, GHC and the standard library come from Nix and an Agda you already have is left alone, and it starts the server in the directory the harness started it in. So the server needs a checkout of that repository and one build in it, once; the guide's first section, Before any harness: the server, is the reference, and the commands are these:

git clone https://github.com/formalverification/agda-native-air.git
cd agda-native-air
nix develop .#backend --command bash -c 'cd agda-mcp && cabal build -v0 exe:agda-mcp'
make agda-mcp-smoke   # optional, from the checkout's root: a JSON-RPC round trip, no agent

The one prerequisite is Nix 2.28 or later, from the Nix download page, with experimental-features = nix-command flakes in its nix.conf. The first nix develop asks once whether to trust the project's binary cache, and saying yes is what makes it download the toolchain prebuilt instead of building it. That first entry is the expensive step (13.9 GiB on disk here, since the shell carries every toolchain the repository uses), and the server's build took 31 seconds after it. Driven directly, with no harness in between, the launcher answered initialize in 2.5 s, and 5.8 s with a search corpus loaded: an index of a library's definitions, built once per library, which adds three search tools to the server's ten, and which comes to 224 MB for my algebra library.

Then register the server in your own project. The launcher starts the server in the directory the session starts in, and Agda finds your .agda-lib by walking up from there, so for Claude Code and Copilot CLI the registration is a .mcp.json at your project's root, as follows:

{
  "mcpServers": {
    "agda": {
      "command": "/path/to/agda-native-air/scripts/run-server.sh",
      "args": ["--timeout", "600"]
    }
  }
}

That form checks your files with the server repository's own Agda, 2.9.0 with the standard library 2.3 patched for it. A project that pins its own Agda names it instead, together with the libraries file that Agda reads:

"args": [
  "--agda-bin", "/path/to/your/bin/agda",
  "--agda-flags", "--library-file=/path/to/your/.agda/libraries",
  "--timeout", "600"
]

Both forms answered on a scratch library, and every response named the library's own directory as the project root; a call with verbose: true names the Agda binary and the libraries file it ran as well, so you can always see which Agda answered. Two things changed after the guide's runs of 11 October, both merged on 12 October, and the guide's text already carries the first. With --agda-bin given, one more entry in the registration, beside "args", lets the launcher skip the Nix shell:

"env": { "AGDA_MCP_BIN": "/path/to/agda-mcp" }

where the path is what cabal list-bin exe:agda-mcp prints in the checkout after the build. The launcher then answers in 17 ms instead of 4.6 s without a corpus, and in 4.1 s instead of 7.8 s with the 224 MB one, where the seconds that remain are the corpus loading; no registration takes the fast path unless it carries that line. And get_goal now prints a hole's context the way an editor does, simplified rather than fully unfolded: on the hole of the trials below, 168 characters where it had been 1,326.

Every harness below gets the same smoke test, run from the root of the server's checkout, with the prompt in a shell variable:

PROMPT='Use the agda MCP server and no other tool.  1. List the names of the tools it offers.  2. Call check_file on agda-dojang/data/fixtures/Fixture01.agda and report its success field and how many holes it lists.  3. Call get_goal on the same file with holeIndex 0 and report the goal and the context.  Answer in five lines or fewer.'

Success is ten tool names (thirteen when the registration loads a search corpus); check_file answering success: false with three holes and UnsolvedInteractionMetas, Agda's exit code 42, because the fixture has three open holes and a file with holes does not check, so false is the server working; and get_goal on hole 0 answering the goal A in the context A : Set, x : A. An answer that names no tools, or a call that is refused or never returns, is a registration problem, and each section's known issues name the ones met. The -i agda-dojang/agda and -l flags in the Kimi Code and Codex registrations below are the server repository's own fixture library and libraries file, which the smoke test in its checkout needs; your project's registration carries your libraries file instead, as above.

Claude Code

The reference harness: every number in my benchmark was measured in it. The guide's section is Claude Code.

Plan and cost. Claude Code needs a Pro, Max, Team, Enterprise or Console account; the free plan does not include it. On 13 October Claude Pro was $20 a month, or $17 a month billed annually, and Max started at $100; Claude Code shares the plan's usage limits. A Console API key bills by the token instead: Opus 5.5 at $4 per million input tokens, $0.20 cached and $20 output; Sonnet 5.5 at $2, $0.10 and $10.

Install. The native installer needs no Node and updates itself:

curl -fsSL https://claude.ai/install.sh | bash   # the recommended native install
brew install --cask claude-code                  # or Homebrew
npm install -g @anthropic-ai/claude-code         # or npm, which needs Node.js 22 or later
claude --version                                 # 2.1.282 here, installed with npm

Sign in. The first claude opens a browser, and claude auth status shows the account in use. Over SSH the browser shows a code to paste at the terminal. An API key goes in ANTHROPIC_API_KEY, which an interactive session asks about once and claude -p uses without asking.

Model and effort. --model takes an alias (opus, sonnet, haiku, fable) or a full model name, and --effort takes low, medium, high, xhigh or max, for that session; /model and /effort change them in a session. The default effort was high, except on Opus 5.5, Sonnet 5.5 and Haiku 5.5, which default to medium. Name both when you report a result: a model at low and the same model at max are two instruments.

Instructions and skills. CLAUDE.md in the start directory and in every directory above it, and ~/.claude/CLAUDE.md in every session; skills from ~/.claude/skills/ and from .claude/skills/ up to the repository root, symlinks followed.

Registering the server. The .mcp.json above, at the project's root. Claude Code connects a project's server only once you approve it: the first interactive claude in the folder asks, after the folder-trust prompt, and records the answer in .claude/settings.local.json. Then:

claude mcp list        # every server, with its state

reads ✔ Connected for agda, ⏸ Pending approval before you approve, and ✘ Failed to connect with CONNECTION_CLOSED when the launcher failed, which in a fresh worktree usually means the server was never built there. Claude Code waits 30 s for a server to start; the guide's runs saw the launcher take 2.5 to 16 s, and once 32 s with a dirty working tree in the server's checkout, which a later measurement did not reproduce; MCP_TIMEOUT=120000 claude covers the worst case.

Smoke test. From the server checkout's root:

claude -p "$PROMPT" --model sonnet --effort low \
  --allowedTools "mcp__agda__check_file mcp__agda__get_goal" --output-format json

It answered in 15 s and four turns, as follows:

1. Tools: check_file, check_project, get_goal, fill_hole, resolve_name, definition_of, exports_of, normalize, type_of, get_dependencies, get_diagnostics, search_by_name, search_by_type.
2. check_file: success=false (exitCode 42, UnsolvedInteractionMetas), 3 holes listed.
3. get_goal (holeIndex 0): goal is `A`, context is `A : Set`, `x : A`.

Known issues. Claude Code defers MCP tools by default, so the model sees the server's tool names without their descriptions until it searches for them; "alwaysLoad": true on the server's entry loads them up front. Each tool's description, and the server's instructions, are cut at 2,048 characters.

Claude Code pointed at another provider

Claude Code sends its requests to any endpoint that speaks Anthropic's Messages API once three environment variables say so: ANTHROPIC_BASE_URL names the endpoint, ANTHROPIC_AUTH_TOKEN holds the provider's key, and ANTHROPIC_API_KEY is set to the empty string so that an Anthropic key in your environment is not sent instead. Then --model names the provider's model. The guide's section is Claude Code with another provider's endpoint. Moonshot's Kimi K3 is the case here; the local case, Ollama, is the last section of this post.

Plan and cost. Moonshot's platform bills by the token from a prepaid balance, with no subscription. On 13 October kimi-k3 was $3.00 per million input tokens, $0.30 cached and $15.00 output, with a context of 1,048,576 tokens. The tier matters as much as the price: below $10 of cumulative top-up the account may run one request at a time, three a minute and 1.5 million tokens a day, which an agent session exhausts at once; from $10 it may run 15 at a time and 100 a minute with no daily cap. Top up $10, not $1.

Install. Nothing more. Keep the key in a file outside every repository that only you can read, and write a settings file that holds no secret:

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.moonshot.ai/anthropic",
    "ANTHROPIC_MODEL": "kimi-k3",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "kimi-k3",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "kimi-k3",
    "ANTHROPIC_DEFAULT_FABLE_MODEL": "kimi-k3",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "kimi-k3",
    "CLAUDE_CODE_SUBAGENT_MODEL": "kimi-k3"
  }
}

Sign in. The key comes from the platform console. Use it one session at a time, through a launcher, so that a plain claude in another terminal stays on your Anthropic login:

# ~/.config/moonshot/api-key holds the key (chmod 600), outside every repository
claude-kimi() {
  ANTHROPIC_AUTH_TOKEN="$(cat ~/.config/moonshot/api-key)" ANTHROPIC_API_KEY="" \
    claude --settings ~/.config/moonshot/claude-kimi.json "$@"
}

Moonshot's own guide puts these variables in ~/.claude/settings.json, which moves every session to Moonshot and keeps the key in that file. Do not.

Model and effort. --model kimi-k3, or kimi-k3[1m] to tell Claude Code the window is a million tokens. K3 takes low, high and max, with max the default, and refuses xhigh.

Instructions and skills. Claude Code's own, unchanged.

Registering the server. Unchanged, with one difference: with the base URL pointed away from Anthropic, Claude Code turns tool search off, so the server's tools load up front with their descriptions.

Smoke test. On 11 October the request reached Moonshot with the key and Moonshot answered 429, "suspended due to insufficient balance", so the route is verified as far as the provider's billing check and no further. A local listener standing in for Moonshot's endpoint had already shown what such a session sends: the model id and the key as a bearer token, and nothing of the Anthropic login. The funded session on this model is the one in the cost table, and it ran in Moonshot's own harness, next.

Known issues. An empty balance is a 429 that Claude Code retries for about three minutes before it gives up. A session pointed elsewhere loses the Claude app's connectors, Remote Control and fast mode, and says so when it starts.

Kimi Code CLI

Moonshot's own harness, the kimi command, and the one that ran the open-weight session in the cost table. The guide's section is Kimi Code CLI.

Plan and cost. The platform key above, or a Kimi membership, whose coding allowance has a key and an endpoint of its own; the two kinds of key are not interchangeable.

Install.

curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash   # needs no Node.js
kimi --version                                                 # 2.1.1 here

Sign in. /login in a session offers a device-code flow for a membership or a platform key. The key is stored under ~/.kimi-code/, and Kimi Code does not read keys from environment variables.

Model and effort. -m <alias> for one run, default_model in ~/.kimi-code/config.toml, or /model in a session. Each model's entry in the configuration lists the effort levels it supports (for K3, low, high and max, default max), and [thinking] effort chooses one.

Instructions and skills. AGENTS.md, not CLAUDE.md; skills from .agents/skills/ and .kimi-code/skills/ in the project and from the two directories of the same names under your home, and not from .claude/skills/.

Registering the server. .kimi-code/mcp.json at the project's root, in the mcpServers shape of .mcp.json plus two timeouts in milliseconds, and it loads only in a folder you have trusted:

{
  "mcpServers": {
    "agda": {
      "command": "/path/to/agda-native-air/scripts/run-server.sh",
      "args": [
        "--agda-flags", "-i agda-dojang/agda --library-file=agda/libraries -l agda-dojang -l standard-library",
        "--timeout", "600"
      ],
      "startupTimeoutMs": 120000,
      "toolTimeoutMs": 1860000
    }
  }
}

Smoke test. kimi -p "$PROMPT" --output-format stream-json < /dev/null was stopped on 11 October first by the folder's trust ("this folder is not trusted; skipped 1 project-level MCP server: agda") and then by the account's balance, so the guide's run has not passed. The real session of the same day did connect: its log records the thirteen tools discovered at the start, and 70 check_file calls over the eleven hours that followed.

Known issues. An empty balance stops kimi -p at once with the provider's 429, with no retry. In -p mode nothing asks for approval; tool calls run under its auto permission policy.

Codex CLI

OpenAI's harness. The guide's section is OpenAI Codex CLI.

Plan and cost. Codex comes with ChatGPT plans, not with a subscription of its own, and ChatGPT Plus at $20 a month is the least plan with GPT-6.1 Sol in it; Free and Go do not have it, and OpenAI's Pro starts at $100. On Plus the pricing page estimated 15 to 160 local messages with GPT-6.1 Sol in five hours, by the size of the task. An API key bills by the token instead: GPT-6.1 Sol at $2.00 per million input tokens, $0.10 cached and $10.00 output; GPT-6 Astra at $10.00, $1.00 and $50.00.

Install.

npm install -g @openai/codex                           # 0.162.1 here, under Node.js 22
codex --version

Sign in. codex login through the browser, codex login --device-auth on a machine without one, and codex login status prints the method in use (Logged in using ChatGPT here). The credential sits in ~/.codex/auth.json in plain text unless you move it to the system's keyring; treat that file like a password.

Model and effort. -m gpt-6.1-sol for one run, or model in the configuration; model_reasoning_effort takes low, medium, high, xhigh, max or ultra, as far as the model supports them, and -c sets any key for one run, its value parsed as TOML: -c 'model_reasoning_effort="high"'.

Instructions and skills. ~/.codex/AGENTS.md, then one AGENTS.md per directory from the project root down to where it starts, 32 KiB in all by default, and no CLAUDE.md unless a setting names it; skills from ~/.agents/skills/ and .agents/skills/, symlinked skill folders followed. One trap: a .agents that is itself a symlink keeps Codex's sandbox from starting ("crosses writable symlink"), so make it a real directory holding a skills link.

Registering the server. Codex does not read .mcp.json. The registration is a table in ~/.codex/config.toml, or in a project's .codex/config.toml, which Codex reads only for a project you trust:

[mcp_servers.agda]
command = "/path/to/agda-native-air/scripts/run-server.sh"
args = [
  "--agda-flags", "-i agda-dojang/agda --library-file=agda/libraries -l agda-dojang -l standard-library",
  "--timeout", "600",
]
startup_timeout_sec = 120
tool_timeout_sec = 1860
required = true
default_tools_approval_mode = "approve"

[mcp_servers.agda.tools.check_project]
approval_mode = "prompt"

Every line after the first three is there for a reason. The startup timeout is 10 s by default, and the launcher took 2.5 to 16 s in the guide's runs, once 32. The tool timeout is 60 s by default and a first check of a large library can take minutes. required = true is the one that matters most: without it codex exec sends its first request before the server is up, and the model finds no tools. In the Codex trial of the lemma below, the model looked for them 8 ms before Codex had them, wrote "No Agda MCP tools are exposed in this session, so I'll use the CLI loop", and never looked again. And the server's tools carry no read-only annotation, so Codex asks before every call unless the approval mode says otherwise, which codex exec cannot do; check_project runs your whole gate and stays on a prompt.

Smoke test. With every key passed by -c, so that nothing is written to any file:

codex exec --json -m gpt-6.1-sol -c 'model_reasoning_effort="low"' -s read-only \
  -c 'mcp_servers.agda.command="/path/to/agda-native-air/scripts/run-server.sh"' \
  -c 'mcp_servers.agda.args=["--agda-flags", "-i agda-dojang/agda --library-file=agda/libraries -l agda-dojang -l standard-library", "--timeout", "600"]' \
  -c 'mcp_servers.agda.startup_timeout_sec=120' \
  -c 'mcp_servers.agda.tool_timeout_sec=660' \
  -c 'mcp_servers.agda.required=true' \
  -c 'mcp_servers.agda.tools.check_file.approval_mode="approve"' \
  -c 'mcp_servers.agda.tools.get_goal.approval_mode="approve"' \
  "$PROMPT" < /dev/null

It answered in 22 s, as follows:

Tools: `check_file`, `check_project`, `definition_of`, `exports_of`, `fill_hole`, `get_diagnostics`, `get_goal`, `normalize`, `resolve_name`, `type_of`.
`check_file`: `success: false`; 3 holes.
`get_goal` (holeIndex 0): goal `A`.
Context: `A : Set`, `x : A`.

Known issues. Whenever standard input is not a terminal, codex exec appends it to the prompt and waits for an end of input that never comes; end the command with < /dev/null. On Ubuntu 24.04 Codex's sandbox runs commands under bubblewrap, which the default AppArmor policy stops from creating its namespaces, so every sandboxed command fails while codex doctor reports the sandbox healthy; the fix is one AppArmor profile from Ubuntu's apparmor-profiles package, and it needs root. Even with the sandbox working, it mounts the Nix store read-only, so with a single-user Nix install, as here, a command that runs nix runs only outside the sandbox, once approved.

Copilot CLI

GitHub's harness, and the one that reaches the most models under one plan. The guide's section is GitHub Copilot CLI.

Plan and cost. Copilot plans are GitHub's, not OpenAI's. On 13 October Copilot Pro was $10 a month with 1,500 GitHub AI Credits, Pro+ $39 with 7,000, and Max $100 with 20,000; a credit is worth a cent, is spent by the token at the model's price, and does not carry over. Copilot Free includes the CLI, with the model chosen for you. A legacy annual plan still counts premium requests instead, a flat one per prompt whatever the prompt costs in tokens, and that is the accounting the trials below ran under; on a plan billed in credits the same sessions would be charged by the token, which I have not measured. Which models a plan offers is the plans page's to say, and it moves: on 11 October GPT-6.1 Sol needed Pro+ or Max, and Kimi K3 came with Pro.

Install.

npm install -g @github/copilot                 # needs Node.js 22 or later; 1.0.95 here
copilot --version

Sign in. copilot login offers a browser flow and a device-code flow, and the token goes to the system keychain. A fine-grained personal access token with the "Copilot Requests" permission, in COPILOT_GITHUB_TOKEN, overrides the stored login; a classic token does not work.

Model and effort. --model gpt-6.1-sol (or kimi-k3, claude-sonnet-5.5) and --reasoning-effort, from none to max as far as the model supports them.

Instructions and skills. The widest reader of the four: AGENTS.md, CLAUDE.md, .github/copilot-instructions.md and ~/.copilot/copilot-instructions.md; skills from .github/skills/, .agents/skills/ and .claude/skills/ in the repository, and from ~/.copilot/skills/ and ~/.agents/skills/. A skill whose front matter is not strict YAML (an unquoted colon in a description) is dropped, and copilot skill list names the ones it refused.

Registering the server. Copilot reads a project's .mcp.json in any directory from the start directory up to the repository root, once you have trusted the folder at its first launch; in an untrusted folder it skips the file without a word, and copilot -p cannot ask, so a headless run in a fresh checkout needs GITHUB_COPILOT_PROMPT_MODE_WORKSPACE_MCP=true. copilot mcp add agda -- <command> <arguments> registers a server for every project instead, in ~/.copilot/mcp-config.json. The model sees the tools as agda-check_file, and permission patterns are agda(check_file) for one tool and agda for the whole server.

Smoke test.

copilot -p "$PROMPT" --model gpt-6.1-sol --reasoning-effort low \
  --allow-tool='agda(check_file)' --allow-tool='agda(get_goal)' \
  --output-format json < /dev/null

It answered in 16 s and counted one premium request, as follows:

Tools: check_file, check_project, definition_of, exports_of, fill_hole, get_dependencies, get_diagnostics, get_goal, normalize, resolve_name, search_by_name, search_by_type, type_of.
Fixture01.agda: `success: false`; holes listed: **3**.
Hole 0 goal: `A`.
Context: `A : Set`, `x : A`.

Known issues. Copilot sends the server's own instructions to the model only for servers it has allowlisted; each tool's own description says what its green answer means, so the model loses nothing here. Its path check is per tool: it refused a view of a file outside the checkout and let a shell redirection to the same file through. It adds a Co-authored-by trailer to the commits its agent makes unless includeCoAuthoredBy is false in its settings. And it has a bring-your-own-key mode (COPILOT_PROVIDER_BASE_URL) that sends requests to a provider of your choice instead of GitHub's routing, with the project's server connecting as usual; on 11 October that route too stopped at Moonshot's balance check.

What each harness reads

INSTRUCTIONS SKILLS THE REGISTRATION THE TRUST GATE Claude Code 2.1.282 Kimi Code CLI 2.1.1 Codex CLI 0.162.1 Copilot CLI 1.0.95 ~/.claude/CLAUDE.md, and CLAUDE.md up the tree (AGENTS.md only where none) ~/.claude/skills/, and .claude/skills/ up to the repository root; links work .mcp.json at the root; claude mcp add; or --mcp-config for one session the folder's trust prompt; then each project server, approved once; -p never asks AGENTS.md, or .kimi-code/ AGENTS.md; ~/.kimi-code/ and ~/.agents/AGENTS.md .agents/skills/ and .kimi-code/skills/, and both names under ~; no .claude/ .kimi-code/mcp.json, or ~/.kimi-code/mcp.json, with two timeouts in milliseconds "Trust this folder" at the first kimi; kimi -p skips the project's servers otherwise ~/.codex/AGENTS.md, then AGENTS.md from the root down (32 KiB); no CLAUDE.md ~/.agents/skills/ and .agents/skills/ up to the root a linked .agents: no sandbox [mcp_servers.agda] in ~/.codex/config.toml or in .codex/config.toml (trusted) [projects."<path>"] with trust_level = "trusted" in ~/.codex/config.toml, or -c AGENTS.md, CLAUDE.md, and copilot-instructions.md under .github/ and under ~/.copilot/ .github/, .agents/, .claude/ skills/ in the repository; ~/.copilot/ and ~/.agents/ .mcp.json up to the root, or ~/.copilot/mcp-config.json (copilot mcp add writes it) the folder, at first launch; copilot -p cannot ask, so a variable loads the file
What each harness reads, from the vendors' pages of 11 October 2026 and the listings each harness printed at a checkout on 12 October. The last column is the gate a project's own registration sits behind: every harness loads a server from a project file only in a folder you have trusted, and a headless run cannot ask.

The figure is the portability story in one place, and the comparison post's section The harness is where the work lives says what it means for a working setup: keep each skill, instruction file and registration once, and link it into every place a harness reads. Two things the figure cannot show. Codex caps the instructions it reads at 32 KiB; and, as the comparison post notes, Copilot's code review reads skills only from the repository itself, so a skills directory kept out of git is invisible to it.

A first task, and how to read what the agent did

The smoke test proves the plumbing. The first real task should be small and should have a gate the model cannot argue with: one lemma, stated in full, in a module of your own, with "done" meaning that the module and the whole library type-check. The trials of 10 October used exactly that, a lemma about subgroups whose statement was given verbatim with no mention of the server and whose reference proof is ten lines, and the question they asked is the one worth asking of any harness: does the model call check_file, or does it run agda from a shell?

The answer is in the harness's own transcript, which every one of them keeps, as follows:

Harness Where the session is What to look for
Claude Code ~/.claude/projects/<directory>/<session>.jsonl tool_use blocks named mcp__agda__check_file; the usage on each assistant message
Kimi Code CLI ~/.kimi-code/sessions/<workspace>/<session>/agents/main/wire.jsonl mcp.tools_discovered at the start; a usage.record per request; turn.ended with its reason
Codex CLI ~/.codex/sessions/<y>/<m>/<d>/rollout-*.jsonl turn_context (model, effort, sandbox); the token_count totals; the server calls inside the code-mode exec items, as tools.mcp__agda__<tool>(...) in their scripts, with the answer in the matching custom_tool_call_output
Copilot CLI ~/.copilot/session-state/<session>/events.jsonl tool.execution_start events named agda-check_file; a session.usage_record per turn

Three things to read off a transcript before trusting a session's claim. First, the verdict's source: the server's answer to check_file carries the exit code it was derived from, and, called with verbose: true, the exact agda command it is equivalent to, so a green claim can be checked rather than believed. Second, the tool mix: a session that checks by running nix develop --command agda pays for the shell's start each time (about 20 s in the Kimi session, against 2 to 8 s through the server), while inside the shell with warm interfaces a batch agda took 2.6 to 4 s in the Opus session, no slower than the server; and a session that never calls the server at all is telling you about the registration, not about the model. Third, the tokens, which are the bill. Whether the server earns its setup is a fair question, and these sessions answer it narrowly: where a model called it, the gain was a warm check in seconds and a diagnostic with a position and a code, and where a model went around it the cause was the registration, not a preference. The September post on building the server has the longer record.

What the recorded sessions showed, one per harness, is as follows:

  • Claude Code (Opus 5.5 at xhigh, finishing the library task in the cost table): 124 tool calls, 8 of them check_file and 7 normalize. Four of six new modules checked on the first call, the diagnostics named the root cause every time, and the final whole-library gate ran from the shell.
  • Kimi Code CLI (Kimi K3 at max, the same task, before it): 239 tool calls, 70 of them check_file, at a median of 5.6 s (most between 2 and 8 s, one of 35 s), and none of the server's other tools, since the names it needed came from grep.
  • Codex CLI (GPT-6.1 Sol at xhigh, the lemma): 30 shell commands and no server call, for the reason in its section, and a proof that was green on the first draft anyway.
  • Copilot CLI (GPT-6.1 Sol at xhigh, the lemma): 32 tool calls, 5 of them to the server, in the order the project's instruction file asks for (check a module through the server, then run the library's own gate): a definition lookup, get_goal, fill_hole (accepted on the first candidate), check_file, and check_project on the whole library. Kimi K3 at max on the same lemma made 42 calls, one of them check_file, and ran the library gate from the shell as that file orders.

What a session costs

List prices say what a token costs; a session says how many tokens a task takes, and the second number is the one nobody publishes. The table holds every session with a real bill or a real plan behind it.

Session, date Harness, model, effort Plan or key What it took At list prices
One library task, unfinished, 11 Oct Kimi Code CLI 2.1.1, Kimi K3, max a Moonshot platform key, prepaid 231 requests over three turns, each ended by a 429 for want of balance; 4 h 35 min active in 11 h 20 min; 2.26 M uncached and 64.5 M cached input tokens, 343 k output $31.28; the bill was over $30, across three top-ups
The same task, finished, 11 Oct Claude Code 2.1.282, Claude Opus 5.5, xhigh Claude Max 111 requests, a pull request 50 minutes in; 0.5 M cache writes, 40.4 M cache reads, 311 k output $18.44, as Claude Code itself reported; nothing beyond the plan
A dark theme for a web app, 10 Oct Codex CLI 0.162.1, GPT-6.1 Sol, xhigh ChatGPT Plus 3 h 11 min; 19.5 M input tokens, 19.2 M of them cached; 85 k output $3.37 equivalent; nothing beyond the plan
A VS Code companion extension, 10 Oct Codex CLI 0.162.1, GPT-6.1 Sol, xhigh ChatGPT Plus 2 h 42 min; 30.4 M input, 29.8 M cached; 191 k output; plus two sub-agents and an automatic reviewer $6.02 equivalent for the worker, about $10 with the rest; nothing beyond the plan
One lemma, 10 Oct Copilot CLI 1.0.95, GPT-6.1 Sol, xhigh a Copilot plan counting premium requests 8 min 36 s, 17 turns, 32 tool calls one premium request
The same lemma, 10 Oct Copilot CLI 1.0.95, Kimi K3, max the same 19 min 24 s, 33 turns, 42 tool calls one premium request
The same lemma, 10 Oct Codex CLI 0.162.1, GPT-6.1 Sol, xhigh ChatGPT Plus 4 min 28 s; 1.26 M input, 1.17 M cached; 9.7 k output $0.40 equivalent; nothing beyond the plan
55 benchmark obligations, three times over, 21 Sep Claude Code 2.1.261, Claude Sonnet 5, the default Claude Max 977 turns, 812 tool calls $12.41, as Claude Code reported

The equivalents are arithmetic: the transcript's token counts at the list prices below. Claude Code does the same arithmetic itself and reports it at the end of a session, which is where the two Claude figures come from; done again from the transcript, the Opus session comes to $18.32, with every cache entry written for a one-hour lifetime at twice the input price, and to $16.81 at the five-minute rate. What a subscription actually limits is its five-hour and weekly usage windows, and I did not record how much of them that session used.

Model, prices read 13 Oct Input Cached input Output
Kimi K3, Moonshot's platform $3.00 $0.30 $15.00
Claude Opus 5.5 $4.00 $0.20 $20.00
Claude Sonnet 5 $2.00 $0.20 $10.00
GPT-6.1 Sol $2.00 $0.10 $10.00

Four things the table says that the list prices do not, as follows:

  • The cached-input price is the one that matters. In every session, 92 to 99 percent of the input tokens were cache hits, because a harness re-sends the whole conversation on every request. Kimi K3's $0.30 cached price is three times GPT-6.1 Sol's, and that, not the $3 input price, is where $19 of the $31 went.
  • A subscription caps the month; a prepaid key does not. Every session on a plan cost nothing beyond the plan, and the three Codex workers together would have been about $10 at list. The one session on a key cost more than that, because nothing stopped it but the balance, three times.
  • A session that does not finish still costs what it costs. The Kimi session's work survived in a handoff note and about nine hundred lines that checked, and another model finished the task from there in fifty minutes; the $31 bought the design, not the result.
  • Effort is part of the price. The Codex sessions ran at xhigh, the configured default, the Kimi sessions at max, K3's highest, and the smoke tests at low took 15 to 22 s. Name the effort beside the model whenever you report a cost, as the guide's Reporting a result asks.

A local model server

For the reader whose data cannot leave the machine, the last route is the same Claude Code as above with its base URL pointed at a model server on your own hardware, and nothing else changed. I have not run it yet, so this section says only what the guide reads.

Plan and cost. Ollama is free and runs on your own hardware, and for a local model nothing leaves the machine. Its :cloud models run on Ollama's servers instead, and "disable_ollama_cloud": true in ~/.ollama/server.json keeps every request local.

Install. On the machine that will serve the model, curl -fsSL https://ollama.com/install.sh | sh, then pull a model. ollama launch claude installs Claude Code beside it if you want the harness there too.

Sign in. None. ANTHROPIC_BASE_URL is that machine's address and port 11434, ANTHROPIC_AUTH_TOKEN is ollama (required, and not checked by a local server), and ANTHROPIC_API_KEY is empty, for the one session, in a settings file like the one above.

Model and effort. claude --model <a model you have pulled>. Ollama's default context is 4k tokens on a machine with less than 24 GiB of video memory, far too small for a coding agent; its pages ask for at least 64k (OLLAMA_CONTEXT_LENGTH=64000 ollama serve). Whether the effort setting reaches the model, the pages do not say.

Instructions, skills, and the server. Claude Code's own, unchanged, with tool search off as for any other endpoint.

Smoke test. Not run.

Known issues. Ollama's Anthropic compatibility supports neither tool_choice nor prompt caching, so every request re-reads the whole conversation at full price, which on your own hardware is time rather than money.

  • The setup guide on the server's site: every plan, flag and file above in full, one section per harness, each step marked run or read with its date.
  • The browser IDE project's agents page: what each harness actually loaded in one repository, which of its gates run under each sandbox, and what leaves the machine from there.
  • The comparison post, Agda beyond Claude: which models and why, what carries across harnesses, and the benchmark.
  • The September posts on building the server and on the type checker as a reward signal.

Sources

  • The vendors' pages behind the plan-and-cost steps, read on 11 October, are listed in the guide's Sources; the prices above were read again on 13 October from Anthropic's pricing and prompt caching pages, OpenAI's API pricing and plans pages, Moonshot's pricing page, and GitHub's plans and billing pages.
  • The sessions in the cost table are the harnesses' own transcripts, read on 13 October, at the locations the table above names.

This post was drafted by Claude Fable 5.1 in a Claude Code session on 13 October 2026, from the guide, the agents page, the harnesses' own session records and the field reports, and its figures were drawn in that session; Claude Opus 5.5 prepared it for publication on 24 November. The sessions it reports were run by me, and the judgments are mine.