Agda beyond Claude¶
For most of this year a coding agent has done part of my Agda work: proofs in universal algebra and lattice theory, with an MCP server that hands the agent the proof state and lets the type checker judge every step. The agent has been Claude Code, and the model whatever Anthropic's best was that month. This post looks past that: which models outside Anthropic are worth trying for this kind of work, open-weight ones especially; and how much of a working setup carries over to another harness or another provider. The yardstick throughout is the one that matters for formal verification: does the proof type-check, with the statement it was asked to prove still intact.
Prices, scores and release dates below were checked on 4 October 2026 against the sources at the end. Anything I call an estimate is arithmetic, not a measurement. The trials themselves come last, and that section is the one that will keep changing.
The yardstick¶
A leaderboard tells you how a model does on someone else's problems. I wanted to know how it does on mine, so the instrument here is a benchmark I built for the purpose: 81 Agda proof obligations in three tiers. Fifty-five come from libraries, the standard library and my own algebra library, and twelve of those are built so that the lemma a proof needs is imported but never named, which tests search rather than memory. Twelve more are composition rows, whose proofs string two to four library lemmas together. Fourteen are posed in group theory and universal algebra with no proof on disk anywhere, so there is nothing to copy.
Each obligation is a module with one hole. The model gets one fresh session
per obligation, the file, and the server's tools, and the judge is the type
checker: the final file is checked with Agda's --safe flag and then passed
through three gates. The statement must be the one that was asked, since a
model that weakens a lemma and proves that has proved nothing; no escape hatch
such as a postulate may appear; and a file that proves the statement by naming
the library's own lemma for it is reported as restated, never as solved.
The runs below are from late September 2026, with the agent given the server and nothing else.
| Tier | Opus 5 | Sonnet 5 |
|---|---|---|
| Library, 55 obligations | 55 | 44 |
| Composition, 12 | 12 | 3 |
| Hard, 14, no proof on disk | 14 | not run |
Two things stand out. One tier down inside a single vendor's lineup costs a lot on this work, and it costs most where a proof has to find and combine library lemmas: nine of Sonnet 5's twelve composition files fail the statement-preservation gate. And every number is the type checker's, so there is no judgment call to argue about, which is what makes formal verification such a good place to measure models. Anthropic's newer models, and OpenAI's, ran on the same 81 obligations in October; their rows are in the last section.
Nothing public measures models on Agda. The closest proxy I found is ProofBench from Vals AI: a hundred graduate-level Lean 4 proofs across probability, measure theory, analysis, algebra, algebraic geometry, number theory and logic, every one of them machine-checked. Its run of 1 October 2026 puts Sonnet 5 at 77% and Opus 5.5 at 100%, the same order my bench found, so I take it as a fair first sort of the field.
The numbers behind the chart, in rank order:
| Model | Kind | Accuracy | Cost per problem |
|---|---|---|---|
| Claude Sonnet 5.5 | Anthropic | 100% | $0.56 |
| Claude Opus 5.5 | Anthropic | 100% | $0.96 |
| Claude Fable 5.1 | Anthropic | 100% | $2.70 |
| GPT-6.1 Sol | closed | 99% | $0.23 |
| Gemini 4 Argon | closed | 99% | $0.78 |
| GPT-6 Astra | closed | 99% | $1.71 |
| Claude Opus 5 | Anthropic | 99% | $2.11 |
| Kimi K3 | open weights | 87% | $1.65 |
| Claude Sonnet 5 | Anthropic | 77% | $1.37 |
| MiMo-V2.6-Pro | open weights | 70% | $0.25 |
| DeepSeek V4 Flash (0731) | open weights | 56% | $0.04 |
| DeepSeek V4 Pro (0813) | open weights | 50% | $0.06 |
| GLM-5.3 | open weights | 49% | $2.08 |
| Gemini 3.1 Pro (preview) | closed | 26% | $0.78 |
| Qwen 3.8 27B | open weights | 16% | $2.30 |
Gemini 3.1 Pro, the Google model anyone can call today, sits at 26%, which is a reminder that a vendor's announced model and its generally available one can be two different things.
The field, October 2026¶
| Model | Weights | $ per M tokens, in / cached / out | ProofBench | Why it is here | |
|---|---|---|---|---|---|
| 1 | GPT-6.1 Sol (OpenAI, 29 Sep 2026) | closed | 2 / 0.10 / 10 | 99%, $0.23 | Near the frontier at about a quarter of Opus 5.5's cost per problem; in Codex and Copilot. |
| 2 | Kimi K3 (Moonshot, 16 Jul 2026; weights 27 Jul) | open, Kimi K3 License | 3 / 0.30 / 15 | 87%, $1.65 | The strongest open-weight model on formal proofs; runs inside Claude Code unchanged. |
| 3 | Gemini 4 Argon (Google, 30 Sep 2026) | closed | not public | 99%, $0.78 | Frontier level, but released only to vetted security teams so far. |
| 4 | MiMo-V2.6-Pro (Xiaomi, 22 Sep 2026) | open, MIT | 0.435 / 0.0036 / 0.87 | 70%, $0.25 | Top open-weight model on Artificial Analysis's index; about twenty times cheaper than Opus 5.5 on my workload. |
| 5 | Leanstral 1.5 (Mistral, July 2026) | open, Apache 2.0 | free API endpoint | not listed; PutnamBench 587 of 672 | A Lean proof agent, 119B total and 6.5B active, built to drive MCP tools; it tests whether Lean skill transfers to Agda. |
Opus 5.5, for scale, costs $4 / $0.20 / $20 per million tokens (input, cached input, output) and scores 100% at $0.96 a problem. Sonnet 5.5 also scores 100%, at $0.56, and is the cheaper option inside Anthropic; on my bench it came within five rows of the ceiling, at under a third of Opus 5's cost.
On Artificial Analysis's intelligence index, Opus 5.5 leads at 58; GPT-6 Astra and Gemini 4 Argon score 53 and GPT-6.1 Sol 52; the best open-weight models are MiMo-V2.6-Pro at 46, GLM-5.3 at 45 and Kimi K3 at 44. Two runners-up deserve a look. DeepSeek V4.x is the cheapest, under a permissive license, at 50 to 56% on ProofBench. GLM-5.3 scores 49%, and its maker documents it as a drop-in model for Claude Code.
GPT-6.1 Sol¶
OpenAI's harness is Codex CLI, which is open source, runs on a ChatGPT plan or
an API key, and has a headless mode, codex exec --json, that streams events.
The model is also in GitHub Copilot's CLI and agent mode. GPT-6 Astra ($10 /
$50 per million tokens, 99% at $1.71 a problem) is the heavier sibling for the
hardest rows. On the public evidence it should come close to Opus 5 on my
bench: it scores 99% on ProofBench, level with Opus 5, and Logical
Intelligence's Aleph prover, driving the older GPT-5.2, solved 668 of 672
PutnamBench problems. That was a guess when I wrote it. On Agda, through
Codex, Sol solved 80 of the 81 obligations and restated the last, for less
than any other model that ran.
Kimi K3¶
A mixture-of-experts model from Moonshot with 2.8 trillion parameters, 104 billion of them active per token, a one-million-token context and MXFP4 weights, released in July 2026 under a license that allows commercial use with conditions for very large services. At four bits the weights come to about 1.5 TB, so hosting it yourself is out of the question. The routes are Moonshot's API, which speaks Anthropic's Messages protocol so that Claude Code can use it unchanged; GitHub Copilot, which lists it; and the usual hosts. It scores 87% on ProofBench, the only open-weight model above Sonnet 5 and 13 points below the frontier. Given what the gap from Sonnet to Opus cost on the composition tier, I expected it to land between them and to lean harder on the gates; the bench row never ran, for the reason in the last section. Price is not its selling point: on ProofBench it cost more per problem than Opus 5.5 ($1.65 against $0.96), presumably because it spends more tokens. Its case is open weights and a second supplier. For price alone, MiMo-V2.6-Pro is the pick, at 70%.
The harness is where the work lives¶
After months with one agent, the thing of value turned out not to be the model.
It is the harness around it: the skills (procedures in the SKILL.md format
that the Agent Skills standard now defines), the instruction file, the MCP
server registration, the hooks, the briefs that launch a session, and the
memory it keeps between sessions. A model is a route. Claude Code changes
route with one environment variable, and the two other harnesses I looked at,
Codex CLI and Copilot CLI, bring their own routes while reading most of the
same files. All three reach the proof assistant the same way, over MCP.
What carries over, as follows:
- Skills. Codex reads Agent Skills from
~/.agents/skillsand from.agents/skillsin each directory from the working directory up to the repository root; it follows symlinks and requires only anameand adescriptionin the front matter. Copilot reads.github/skills,.claude/skillsand.agents/skillsin a repository, and~/.copilot/skillsand~/.agents/skillsfor personal ones. Of the 61 skills I had on 9 October, 44 never mentioned Claude at all; the rest were the ones to read for a tool or a path that only Claude Code has. - Instructions. Codex reads
AGENTS.md, with~/.codex/AGENTS.mdfor global guidance, and a setting (project_doc_fallback_filenames) can nameCLAUDE.mdinstead; Copilot readsAGENTS.md,CLAUDE.mdand.github/copilot-instructions.md. Codex caps the instructions it reads at 32 KiB by default, which my global and project files together stay under. - The MCP server. It is a plain stdio server, so it registers in Codex as
a
[mcp_servers.<name>]table inconfig.toml. One snag: my registrations pass the working directory through${PWD}, which Claude Code expands and Codex may not, so the robust fix is for the launcher to default to its own working directory. - Everything else. The session briefs are plain Markdown and move unchanged. Memory is readable Markdown, but nothing would maintain it. Hooks are harness-specific; mine only provision a toolchain in a cloud container, so there is little to lose.
One thing does not carry over. The house style and the attribution rules in the instruction file bind only a model that follows them, and I have not measured how well the others do. The honest fix is mechanical gates, a grep for the em-dash and a check on commit trailers, rather than more prose.
Measuring a new model¶
The bench already does most of the work. The harness spawns one non-interactive Claude Code session per obligation with the server's tools and the one file, caps turns, wall time and cost, and hands the final file to the judge.
There are two routes in. The first needs no code: a subject session inherits
its environment, so three variables point every subject at another provider's
Anthropic-compatible endpoint, Moonshot's for Kimi K3 or an Ollama server for
a local model. ANTHROPIC_BASE_URL names the endpoint, ANTHROPIC_AUTH_TOKEN
holds the provider's key, and ANTHROPIC_API_KEY is set empty, so that an
Anthropic key in the environment is not sent instead.
export ANTHROPIC_BASE_URL='https://api.moonshot.ai/anthropic'
export ANTHROPIC_AUTH_TOKEN="$(cat ~/.config/moonshot/api-key)" # a file only you can read
export ANTHROPIC_API_KEY=''
# then the bench as usual, with the provider's model id (kimi-k3 here):
# a two-row cost pair first, and the three tiers after it
Two gaps had to be closed before such a run could be quoted, and both are closed now. The client's cost figure is its own list-price arithmetic, not the provider's bill, so every row is also priced from its tokens at the provider's rates; and the run record names the endpoint.
The second route is for a model with no Anthropic-compatible endpoint, which is OpenAI's case. A Codex subject has to replace five things the harness tells Claude Code with flags:
| The subject needs | claude -p today |
Codex |
|---|---|---|
| the model | --model M |
--model gpt-6.1-sol |
| the server, and only it | --mcp-config, --strict-mcp-config |
an mcp_servers table in the run's config |
| tool limits | --allowedTools |
--sandbox, --ask-for-approval |
| a transcript | --output-format stream-json |
--json |
| a cost cap | --max-budget-usd |
none found; price from tokens |
That run compares harness plus model rather than the model alone, and its report says so.
What would my workload cost? Taking the tokens of the archived Opus 5 runs and pricing them at each model's list rates gives a first estimate. The method reproduces the client's own totals for those runs, so the first row is a check.
| Model | Library tier, 55 rows | Hard tier, 14 rows |
|---|---|---|
| Opus 5, as reported (the check) | $7.07 | $7.71 |
| Opus 5.5 | $4.82 | $5.49 |
| GPT-6.1 Sol | $1.79 | $1.98 |
| Kimi K3, Moonshot's API | $3.30 | $3.48 |
| MiMo-V2.6-Pro | $0.22 | $0.25 |
Treat these as first estimates. Another model spends its own tokens, as Kimi K3's ProofBench cost shows. The binding limit on a subscription is also its usage window rather than the price per token, so a second supplier buys capacity as much as savings.
The plan, and what happened¶
The plan for the first month, in the order I meant to take it, with what happened under each step. First the bench as it stood in mid-October, since three of the steps were to feed it.
| Model | Harness, effort | Library, 55 | Composition, 12 | Hard, 14 | At list prices |
|---|---|---|---|---|---|
| Claude Opus 5, September | Claude Code, high |
55 | 12 | 14 | $18.82 |
| Claude Sonnet 5, September | Claude Code, high |
44 | 3 | not run | $7.54, two tiers |
| Claude Sonnet 5.5 | Claude Code, high |
51 | 11 | 14 | $5.16 |
| Claude Opus 5.5 | Claude Code, medium |
37 (51) | 4 (12) | 10 (14) | $8.36 |
| GPT-6.1 Sol | Codex CLI, low |
54 | 12 | 14 | $4.07 |
| GPT-6 Astra | Codex CLI, low |
not run | not run | 14 | $5.76, one tier |
The September rows ran on Agda 2.8.0 and the October rows on 2.9.0; re-judging the September files under 2.9.0 moved no verdict. What the table says is as follows:
- Every final file checks, in every row, with its statement kept. What separates the counts is restatement (a file that proves the statement by naming the library's own lemma) and the protocol's gates, never a proof the type checker refused.
- The frontier is at the ceiling. Four models solved, or would have solved, at least 76 of the 81, and every model that ran the hard tier, the one with no proof on disk, wrote fourteen proofs that check. ProofBench's split holds: the models it puts at 99 or 100% are the ones near the ceiling here, and Sonnet 5, at 77%, is the one well below it. Within the top group these tiers no longer rank the models.
- Opus 5.5's low counts are one slip, not its proofs. In 29 of its 81
sessions it called a server tool by its bare name; the client refused the
call, the session went on under the full name, and the protocol's
isolation gate counts any name outside the tools it presented as foreign.
The counts in parentheses leave the refused calls out. It also ran at
medium, the client's default for it, one level below the others. - Price is where the models differ. Through Codex, GPT-6.1 Sol did the 81 for $4.07 at OpenAI's list prices, against $5.16 for Sonnet 5.5, $8.36 for Opus 5.5 and $18.82 for Opus 5. The first estimates above missed by as much as a factor of 2.2, in both directions: Opus 5.5's hard tier cost $2.51 against $5.49 estimated, and Sol's library tier $2.09 against $1.79, because each model spends its own tokens.
-
A Codex row is Codex with the model, at Codex's default effort,
low, so it varies the harness and the effort as well as the model. -
Copilot CLI, at no new cost. With the MCP server registered, give GPT-6.1 Sol and Kimi K3 an ordinary formalization task, and check that the project's skills load from
.claude/skills.Done. The task was one lemma about subgroups, stated in full, for a new module of my algebra library, and "done" meant that the module and the whole library type-check. Both models reached the server through the project's own registration, and both final files passed the project's gates, for one premium request a session. GPT-6.1 Sol worked the hole the way the server is built for (the goal, a candidate term, a check, then the library's gate through the server) and ran no Agda from the shell. Kimi K3 found the server's tools with a tool search, checked its module once through the server, and ran the library gate from the shell, where the instruction file puts it. The skills loaded from
.claude/skills, except 17 of 46 that Copilot refused because their front matter was not strict YAML, which step 4 fixed. Every first draft checked, so the lemma measured reach and habit, not proving power; the companion post has the sessions in detail. -
Kimi K3 on the bench, through the environment variables: the two-row cost pair first, then the three tiers.
Dropped. By the time it was ready, the table above had every frontier model at or near the ceiling of all three tiers, and I closed the comparison on the arms that had run. Kimi K3 did real work twice instead: the lemma of step 1, and a library task in Moonshot's own harness, Kimi Code CLI, which ran for eleven hours, cost $31.28 at list, stopped three times when the prepaid balance ran out, and was finished from its handoff note by Opus 5.5 in fifty minutes. The companion post's cost table has both.
-
A Codex subject for GPT-6.1 Sol, and GPT-6 Astra on the hard tier.
Done, and it gave the table its best row. A first Codex session, on the lemma of step 1, connected the server and never used it:
codex execsent its first request before the server was up, the model looked for the tools 8 ms too early, and it fell back to the shell for the whole task.required = truein the registration makes Codex wait. With that, the Codex subject ran the 81 obligations, and GPT-6.1 Sol solved 80 and restated the 81st, a row both Sonnets restate too, in the fewest turns of any model on every tier, with no gate and no cap reached. GPT-6 Astra matched it on the hard tier at five times the price ($5.76 against $1.09), and Sol athigheffort solved the same fourteen rows in 26% more turns, so on that tier the effort shows its cost and not its worth. On a ChatGPT Plus login none of this is a bill: the five Codex runs used 86 points of one five-hour window and 14 of the weekly one. -
The second link targets:
.agents/skills,AGENTS.md, a generated Codex registration for the server, and the mechanical style gates.Done by 12 October. Each skill, instruction file and registration is still kept once. A second link puts the skills where Codex and Copilot look (
.agents/skillsin each checkout, and~/.agents/skills),AGENTS.mdisCLAUDE.mdunder the name Codex reads, and the Codex registration is generated for each checkout from the one JSON source, with the working directory written out, since Codex expands no variable. Two things were bigger than I expected. Copilot parses a skill's front matter as strict YAML and silently leaves out a skill it cannot parse, which was 26 of my skills, every one an unquoted description holding a colon. And 17 skills told the model to use a tool that only Claude Code has, once the search looked past the obvious names; each now says "in Claude Code" and gives the other harnesses' way beside it. A lint fails both now. The style rules became gates that bind any harness: a commit-message hook refuses an AI co-author trailer, a pre-commit hook refuses an author other than me, and the lint fails an em-dash. The hooks have work to do, since Codex can carry its own instruction to end every commit with aCo-authored-by: Codextrailer, and Copilot adds one unless a setting says not to. -
A Jetson AGX Orin on my desk as a model server: JetPack 7, Ollama, one calibration run on the bench, then an embedding model.
Set aside. The Orin is not yet serving a model on the network, so this post leaves it out.
One more thing I learned on the way. Copilot's code review also reads Agent Skills, but only from the repository, and a skills directory that is kept out of git is invisible to it.
Appendix: installing the harnesses and reaching the models¶
What each route needs is now a post of its own, Setting up AI agents for Agda: the plan or key each provider sells and its price on a named date, the install and sign-in of each harness, the model and its effort, how instruction files and skills carry across, the server's registration with the proof that it connected, a first task and how to read what the agent did, a cost table built from real sessions, and the local model server. Two of the routes need a subscription, and each vendor sells a tier called Pro at a different price: OpenAI's plans are ChatGPT plans, all of which include Codex, but GPT-6.1 Sol and GPT-6 Astra start at ChatGPT Plus, $20 a month, and OpenAI's Pro starts at $100; GitHub Copilot Pro, a GitHub plan, is $10 a month. The reference material behind both posts, every plan, flag and file harness by harness, is the setup guide on the server's own site.
Sources¶
- ProofBench leaderboard, Vals AI, run of 1 October 2026.
- Artificial Analysis leaderboard and its large open-weight models page.
- GPT-6.1 Sol at DevDay, Unite.AI, and OpenAI's DevDay recap.
- GPT-6 Astra pricing, CloudZero.
- Gemini 4 Argon's limited release, VentureBeat.
- Kimi K3 model card, its pricing and license, and Kimi agent support.
- MiMo-V2.6 release, Unite.AI.
- Leanstral announcement, Mistral, and Leanstral 1.5, MarkTechPost.
- Aleph on PutnamBench, Logical Intelligence.
- Evaluation of LLMs for Mathematical Formalization in Lean, arXiv 2606.05632.
- When Agda met Vampire, arXiv 2602.18844.
- ChatGPT plans and Codex pricing, OpenAI, and Copilot plans, GitHub, read 10 October 2026.
- Codex skills and a Codex CLI guide.
- Copilot Agent Skills and Copilot's model list, 3 October.
- GLM in Claude Code, Zhipu AI, and Claude Code with Ollama.
This post grew out of a brief that a Claude Code session wrote for me on 4 October 2026 from the sources above and my own benchmark records. Claude Fable 5.1 drafted it from the brief, with its figures, on 9 October; Claude Opus 5.5 filled in the results on 4 November from the bench's archived reports, and prepared it for publication on 24 November. The trials, the numbers from my bench and the judgments are mine.