← Back to all posts
News

GLM-5.2 Beats GPT-5.5 on Long-Horizon Coding at a Sixth of the Cost, and ZCode Just Made Driving It Free

July 6, 2026 · News
GLM-5.2 Beats GPT-5.5 on Long-Horizon Coding at a Sixth of the Cost, and ZCode Just Made Driving It Free

TL;DR

Z.ai (formerly Zhipu) released GLM-5.2 on June 17, 2026, a 753-billion-parameter open-weight model with a 1-million-token context, tuned hard for long-horizon coding agents and shipped under a permissive MIT license. The headline that has developers paying attention: it beats GPT-5.5 on several agentic coding benchmarks and lands just behind Claude Opus 4.8, at roughly one-sixth the API cost. On July 2 Z.ai made its official harness, ZCode, free to download, so trying the model in a real agent now costs nothing. The honest asterisks: these are vendor benchmarks, the very hardest multi-hour tasks still favor Opus, and the hosted API runs through servers subject to Chinese law. The good news is that MIT weights mean you can sidestep that last one entirely by self-hosting.

agentic coding benchmarks (higher is better) · vendor-reported GPT-5.5 GLM-5.2 Opus 4.8 58.662.169.2SWE-bench Pro 72.674.475.1FrontierSWE 75.376.877.8MCP-Atlas
On these three, the open model (copper) slots above GPT-5.5 and just under Opus 4.8. The y-axis starts near 50 to show the spread.

The model: big, open, and built for long tasks

GLM-5.2 is a 753B-parameter model with a 1M-token context, and its design choices are all about sustaining a coding agent over many steps without falling over. Z.ai highlights an attention scheme it calls IndexShare that cuts per-token compute by about 2.9x at full 1M context, plus a speculative-decoding improvement that raises throughput. In plain terms: the point is to keep a long, multi-file, multi-hour agent session fast and coherent rather than to win a one-shot chat. And unlike the closed frontier, the weights are on Hugging Face under MIT, which is the fact that makes everything else in this post possible.

The benchmark case, told straight

Per Z.ai's reported results, GLM-5.2 clears GPT-5.5 on most agentic coding evals and sits a step below Claude Opus 4.8. The full picture, not just the flattering rows:

BenchmarkGLM-5.2GPT-5.5Opus 4.8
SWE-bench Pro62.158.669.2
FrontierSWE74.472.675.1
MCP-Atlas (tool use)76.875.377.8
Terminal-Bench 2.181.084.085.0
SWE-Marathon (long-horizon)13.012.026.0
GLM-5.2 tops GPT-5.5 on the agentic rows but trails Opus, and on the brutal SWE-Marathon (multi-hour, many-step tasks) Opus is still roughly double everyone.

Read it honestly and the takeaway is clear. GLM-5.2 is a genuine near-frontier coding model that beats GPT-5.5 in the agentic sweet spot, but Opus 4.8 keeps a real lead on the hardest, longest tasks, where SWE-Marathon shows it doubling the field. If your work is normal feature-and-fix agent loops, GLM-5.2 is right there. If it is grueling day-long refactors, the closed frontier still earns its price. And these are Z.ai's own numbers, so treat the shape as reliable and the last decimal as marketing.

The cost is the other half of the story

The reason "a step below Opus" is exciting rather than a shrug is the price tag. GLM-5.2's hosted API runs around $1.40 per million input tokens and $4.40 per million output, against roughly $5 and $25 for Opus 4.8 and $5 and $30 for GPT-5.5. That is where the widely quoted "one-sixth the cost" comes from, and for token-hungry agentic workloads that difference is the entire budget conversation. A model that gets you 90% of the way for a sixth of the spend is not a compromise, it is a strategy.

ZCode goes free

To use a model in an agent you need a harness, and Z.ai now ships its own. ZCode is an agent-first "development environment" where you describe a goal and the agent reads the codebase, plans, edits files, runs terminal commands, and iterates. It launched free to download on July 2, 2026 (version 3.2.2, macOS, Windows, and Linux beta), gives new users a five-day full GLM-5.2 trial, and takes bring-your-own API keys speaking the OpenAI or Anthropic protocols, so it will drive Claude or DeepSeek just as happily. Paid plans run from a $16.20 Light tier to a $144 Max tier. We covered the harness itself in depth, including the genuinely novel bit where you start and steer runs from a chat app, in our earlier piece: Z.ai shipped ZCode, an official harness for GLM-5.2 you can drive from Telegram. This post is about whether the model underneath is worth pointing it at, and the answer is mostly yes.

The catch, and the escape hatch

Here is the part a benchmark chart will not tell you. Z.ai's production API is hosted in China, which means every call through the hosted endpoint is subject to Chinese law, including national-intelligence provisions that can compel the provider to cooperate with government requests. For a hobby project that is a non-issue. For regulated Western work in finance, healthcare, legal, or government, that data-residency reality can rule the hosted API out on its own.

two ways to run GLM-5.2, two different risk profiles GLM-5.2MIT open weights Hosted API (z.ai)fast, ~1/6 cost, zero setup but: runsunder CN law Self-host the weightscode never leaves home but: 753Bis heavy iron
The hosted API is cheap and instant but carries jurisdiction risk; the MIT weights let you self-host and keep code in-house, if you can feed 753B parameters.

This is exactly where open weights earn their keep. Because GLM-5.2 is MIT-licensed, a team with strict data rules can download it and run it on its own infrastructure, and the code never leaves the building. That is a categorical advantage a closed API-only model simply cannot offer at any price. The tradeoff is that self-hosting a 753B model is not a laptop project, so the practical answer for most is the hosted API for anything non-sensitive and self-hosting for the code that must stay put.

The honest caveats

Three to keep in mind. The benchmarks are vendor-reported, so independent testing on your own repos is the only score that counts for you. The long-horizon gap is real: on the hardest multi-hour agent tasks Opus 4.8 is still clearly ahead, so GLM-5.2 is a superb value pick rather than an outright frontier-topper. And "open weights you can self-host" is a real option, not a casual one, given the hardware a 753B model demands. None of that dents the core result, which is that an openly licensed model now beats one of the closed leaders on a chunk of real coding work for a fraction of the money, and the tool to try it is free.

Key Takeaways

  • GLM-5.2 (Z.ai, June 17 2026) is a 753B-parameter, MIT-licensed, 1M-context open model tuned for long-horizon coding agents.
  • It beats GPT-5.5 on several agentic coding benchmarks (SWE-bench Pro, FrontierSWE, MCP-Atlas) and trails Claude Opus 4.8, at roughly one-sixth the API cost.
  • The gap shows on the hardest tasks: on SWE-Marathon, Opus roughly doubles both GLM-5.2 and GPT-5.5, so the closed frontier still leads on grueling multi-hour work.
  • ZCode, Z.ai's official agent harness, went free on July 2 (BYO keys, five-day GLM-5.2 trial), making the model cheap to try in a real agent loop.
  • The hosted API is subject to Chinese law, a real data-residency concern for regulated work; the MIT weights are the escape hatch, letting you self-host if you can run 753B.

Sources: GLM-5.2 (Z.ai on Hugging Face), VentureBeat (benchmarks & cost), ZCode, TechTimes (data-residency risk)

GLM-5.2Z.aiZhipuopen weightscoding agentsZCodebenchmarksChina AI
CONSOLE
$