GLM 5.2 vs Claude Fable 5: agentic coding, compared
Two of 2026's strongest coding models, side by side. Claude Fable 5 (Anthropic) is the closed frontier leader on benchmarks and speed. GLM 5.2 (Z.ai) is the open-weight flagship that costs roughly a quarter as much to run. On a real plan-and-implement agent task, Fable 5 finished in about 9 minutes for over $10; GLM 5.2 took about 17 minutes for $2.76 — with output just as good for the job. Here's the full breakdown so you can pick the right one for each kind of run.
The two models at a glance
Two different labs, two different bets. Fable 5 is Anthropic's top generally available model — a new tier above Opus they're calling Mythos-class. GLM 5.2 is Z.ai's (formerly Zhipu) open-weight coding flagship, with the weights out under MIT.
Claude Fable 5
Anthropic · released June 9, 2026
Strengths
- SWE-bench Verified 95.0% — state of the art
- SWE-bench Pro 80.0% — clearly ahead on hard refactors
- #1 on FrontierCode / FrontierBench
- Roughly half the wall-clock time of GLM 5.2 in a real run
- 1M context, 128K output — long-horizon agent loops
Watch for
- Output is $50/M — agentic loops are output-heavy
- Closed weights — no self-hosting, vendor lock-in
- Real run cost over $10 vs GLM 5.2's $2.76
Best for: the hardest long-horizon refactors where a wrong turn costs you an hour of cleanup.
GLM 5.2
Z.ai (Zhipu) · released June 13, 2026
Strengths
- SWE-bench Pro 62.1 — beats GPT-5.5's 58.6 on the same suite
- Terminal-Bench 2.1 81.0 — up from GLM 5.1's 62.0
- Top open-weight model on the AA Intelligence Index (51)
- MIT weights — self-host, no per-token bill, no lock-in
- 1M context, 128K output — same windows as Fable 5
Watch for
- Behind Fable 5 on every benchmark (~18 pts on SWE-bench Pro)
- Slower — about 2x the wall-clock time on the test run
- No published SWE-bench Verified number
Best for: plan-and-implement, refactor-and-test runs where good-enough plus cheap wins on volume.
The real run: same task, both models
Same prompt on both, same repo context, same agent harness. The job wasn't a toy benchmark — it was the kind of thing you actually do in a working week: take a half-formed project plan, restructure it, and start writing the code.
| Model | Time | API cost | Output quality |
|---|---|---|---|
| Claude Fable 5 | about 9 min | over $10.00 | Clean plan, usable first pass at the code |
| GLM 5.2 | about 17 min | $2.76 | Equally good plan and first pass for this task |
Fable 5 is clearly the faster model, and on raw benchmarks it's the stronger one too. What's surprising is how little that mattered for this task. GLM 5.2's plan was just as workable, and the code it produced was fine. Going in expecting to pay the Fable 5 tax for quality, it's easy to come out thinking you overpaid.
Full specification comparison
| Claude Fable 5 | GLM 5.2 | |
|---|---|---|
| Maker | Anthropic | Z.ai (Zhipu) |
| Released | June 9, 2026 | June 13, 2026 |
| Tier | Mythos-class (above Opus) | Open weights, MIT licence |
| Architecture | Closed | Sparse MoE, about 40B active / 753B total |
| Context window | 1M tokens | 1M tokens |
| Max output | 128K tokens | 128K tokens |
| Model ID | claude-fable-5 | GLM-5.2 (Z.ai API / HF weights) |
| Self-hostable | No | Yes (MIT weights) |
Pricing, per million tokens
This is where the story changes. Fable 5 is $10 in and $50 out per million tokens. GLM 5.2 is $1.40 in and $4.40 out. Cached input is where Fable 5 claws some back, but it's still several times more expensive.
| Per 1M tokens | Claude Fable 5 | GLM 5.2 | Ratio |
|---|---|---|---|
| Input | $10.00 | $1.40 | about 7x |
| Output | $50.00 | $4.40 | about 11x |
| Cached input | $1.00 | $0.26 | about 4x |
| Batch input | $5.00 | (vendor batch) | n/a |
| Batch output | $25.00 | (vendor batch) | n/a |
Agentic loops are output-heavy. The model reads your files, thinks, edits, reads again. Most of the token spend is output — exactly where Fable 5 is most expensive. That's why the $10+ run vs the $2.76 run lined up so closely with the output-price ratio. The GLM Coding Plan subscription is reportedly about a tenth of Anthropic's Claude Code and Claude Max tiers, if you'd rather pay a flat fee than meter tokens.
Benchmarks, head to head
| Benchmark | Claude Fable 5 | GLM 5.2 | Notes |
|---|---|---|---|
| SWE-bench Verified | 95.0% | not published | Fable 5 state-of-the-art |
| SWE-bench Pro | 80.0 | 62.1 | Same suite; Fable 5 clearly ahead |
| FrontierCode / FrontierBench | #1 | 74.4 (FrontierSWE) | Strong for an open model, behind Fable 5 |
| Terminal-Bench 2.1 | — | 81.0 | Up from GLM 5.1's 62.0; shell + tool work |
| AA Intelligence Index | top tier | 51 (5th overall) | Top open-weight model on the index |
| Wall-clock speed (real run) | ~9 min | ~17 min | Fable 5 roughly 2x faster |
Where Fable 5 wins
On benchmarks, Fable 5 is ahead and it's not subtle. Anthropic puts it state-of-the-art on CursorBench and FrontierBench, and it's the first to break 90 percent on their core analytics benchmark. The independent numbers agree: 95.0% on SWE-bench Verified, 80.0 on SWE-bench Pro, and the #1 spot on FrontierCode. If you're doing the hardest long-horizon refactors — the ones where a model has to hold a plan together across many steps and a wrong turn costs an hour of cleanup — Fable 5 is the safer pick. The gap on SWE-bench Pro is real.
Where GLM 5.2 wins
Price is the obvious one, but it's not the only one. GLM 5.2 is the top open-weight model on the Artificial Analysis Intelligence Index (51, fifth overall, with Fable 5, Opus 4.8, and GPT-5.5 ahead of it). For an open model that's a serious showing. SWE-bench Pro 62.1 beats GPT-5.5's 58.6 on the same suite. Terminal-Bench 2.1 jumped to 81.0 from GLM 5.1's 62.0. The 1M context is usable, not just a spec-sheet number. And the MIT weights mean you can self-host — no per-token bill at all if you have the GPUs, and no vendor lock-in.
The honest verdict
Fable 5 is the better model. The benchmarks say so and a real run feels that way too — faster and a touch more confident on the hard parts. If the task is hard and a wrong step is expensive, pay for Fable 5.
But most agent runs aren't that. They're plan-and-implement, refactor-and-test — the bread and butter where good-enough plus cheap wins on volume. For those, GLM 5.2 is the default. $2.76 instead of $10-plus per run means you can let the agent loop without watching the meter, and that changes how you work. An open model that's this close, this much cheaper, and self-hostable is the thing open weights have been promising to deliver.
If you're running agents on closed frontier models and wincing at the bill, give GLM 5.2 a real task this week and compare. You'll likely keep Fable 5 for the hard ones and switch the rest.
Stop your agent drifting — one rule free
Whichever model you run, the same problem kills agent runs: it forgets your architecture and starts crossing layer boundaries. Copy arch-core-lite.mdc into .cursor/rules/. It stops Cursor (or Copilot in VS) from shipping EF Core in your Domain layer and keeps context scoped per directory.
### 1. Respect layer boundaries
- Domain never references Microsoft.EntityFrameworkCore, HttpClient, IConfiguration...
- Application orchestrates via abstractions only. No direct DbContext use.
- Infrastructure implements interfaces declared higher up.
One-time purchase · 30-day refund · or grab the 3-rule email starter if you want more free files.
Sources & data notes
- GLM 5.2 — Z.ai / Hugging Face model card (MIT weights, 1M context, 128K output).
- GLM 5.2 pricing & SWE-bench Pro 62.1 — agentguides.dev review ($1.40 in / $4.40 out / $0.26 cached).
- GLM 5.2 Terminal-Bench 2.1 81.0, FrontierSWE 74.4, AA Index 51 — lushbinary.com developer guide.
- Claude Fable 5 — Anthropic model docs (released June 9 2026, 1M ctx, 128K out, $10/$50).
- Fable 5 SWE-bench Verified 95.0% / SWE-bench Pro 80.0% — emergent.sh learn; llm-stats.com review (FrontierCode #1, 1932 Elo GDPval-AA).
- Fable 5 cache hit $1/M, batch $5/$25 — Anthropic pricing docs.
- Real-run time and cost figures are from a single operator task (plan redesign + first-pass implementation) on the same repo context and agent harness. Benchmark and pricing data accessed 2026-07-07.