Overview
GLM-5.2 is Z.ai's June 16, 2026 flagship release for long-horizon coding and agent work. It succeeds GLM-5.1 with a 1M-token context window, stronger coding scores, and selectable reasoning effort. The practical goal is not merely accepting a larger prompt: Z.ai trained the model on extended engineering trajectories so it can keep planning, testing, and revising across large repositories and multi-hour tasks.
The release also changes the serving architecture. IndexShare reuses one sparse-attention indexer across four transformer layers, while an updated multi-token prediction layer improves speculative decoding. GLM-5.2 remains available through Z.ai's metered API and MIT-licensed weights for self-hosting. At launch it was also available through the GLM Coding Plan, but current Coding Plan requests for GLM-5.2 are automatically routed to GLM-5.3.
What's New
A 1M-Token Context for Long-Horizon Work
GLM-5.2 increases the maximum context from GLM-5.1's 200K tokens to 1M. Z.ai says the training mix covers large implementations, automated research, performance optimization, and complex debugging rather than short synthetic recall tests. Coding Plan users can select GLM-5.2[1m] in Claude Code when the full context window is required.
The larger window is most useful when an agent must retain repository structure, tool output, experiment results, and earlier decisions in one trajectory. It does not remove infrastructure constraints: local and hosted deployments still need sufficient KV-cache capacity, and some official benchmark runs used smaller 256K or 400K windows.
Stronger Coding with Flexible Effort
GLM-5.2 introduces High and Max reasoning-effort choices so developers can trade latency and token use for capability. Official results show a large improvement over GLM-5.1 on terminal and repository-scale tasks. Max is the documented default and recommended setting for deeper coding tasks; High is the lower-effort alternative when you want to balance capability and latency.
IndexShare and Faster Speculative Decoding
IndexShare places a lightweight indexer on the first layer of each four-layer group and reuses its selected token indices across the group. Z.ai reports that this reduces indexer-related per-token FLOPs by 2.9× at 1M context. The updated multi-token prediction layer combines IndexShare, KV sharing, rejection sampling, and an end-to-end training loss, raising acceptance length from 4.56 to 5.47 in the published ablation—an increase of 20%.
Agentic RL with Anti-Hacking Controls
The release expands long-horizon reinforcement learning through Z.ai's open-source slime infrastructure. It also adds online anti-hacking checks to detect agents that try to read protected evaluation files or retrieve target solutions instead of solving a task. Flagged actions are blocked while the rollout continues, helping preserve a useful training signal without discarding the entire trajectory.
Performance Benchmarks
The figures below are Z.ai-reported results and should be treated as vendor evaluations rather than universal measures of production quality.
| Benchmark | GLM-5.2 | GLM-5.1 | Change |
|---|---|---|---|
| Terminal-Bench 2.1 (Terminus-2) | 81.0 | 63.5 | +17.5 points |
| SWE-bench Pro | 62.1 | 58.4 | +3.7 points |
| NL2Repo | 48.9 | 42.7 | +6.2 points |
| DeepSWE | 46.2 | 18.0 | +28.2 points |
| FrontierSWE dominance | 74.4 | 30.5 | +43.9 points |
| PostTrainBench | 34.3 | 20.1 | +14.2 points |
| SWE-Marathon | 13.0 | 1.0 | +12.0 points |
Harnesses, context limits, timeouts, and judging methods differ by benchmark. Use the official footnotes before comparing any single row with results published by another provider.
Availability & Access
- Z.ai web app: GLM-5.2 is available for chat at
chat.z.ai. - GLM Coding Plan: All plan tiers received access at launch, including Claude Code, ZCode, OpenCode, and other supported coding clients.
- Open weights: Z.ai publishes GLM-5.2 and an FP8 checkpoint on Hugging Face under the MIT License, with deployment support for Transformers, vLLM, SGLang, xLLM, and ktransformers.
- Local deployment: The model is a frontier-scale mixture-of-experts system and requires substantial accelerator memory and serving infrastructure, especially at 1M context.
Pricing & Plans
GLM-5.2 remains available through Z.ai's metered API at $1.40 per 1M input tokens, $0.26 per 1M cached input tokens, and $4.40 per 1M output tokens. The current GLM Coding Plan prices below are product-level subscription prices; current plan requests for GLM-5.2 are routed to GLM-5.3.
| Plan | Monthly price | Intended workload |
|---|---|---|
| Lite | $18 | One lightweight repository at a time |
| Pro | $80 | Daily work across one or two projects |
| Max | $168 | Advanced work on multiple or larger repositories |
Annual billing currently lowers the effective monthly prices to $12.60, $56, and $117.60 respectively. Plan quotas and promotions change over time, so buyers should verify the live subscription page before purchase. Open-weight self-hosting has no model license fee but carries significant compute and operations costs.
Best For
- Engineering teams running multi-hour coding agents over large repositories
- Researchers combining code, papers, experiment logs, and tool output in one working context
- Developers who want an open-weight alternative for long-context agent workflows
- Infrastructure teams able to operate large-model inference with strict data control
- Coding Plan users who need selectable reasoning effort for difficult debugging and implementation tasks
FAQ
How is GLM-5.2 different from GLM-5.1?
GLM-5.2 expands context from 200K to 1M tokens, adds High and Max effort controls, and posts substantial vendor-reported gains on long-horizon coding benchmarks. It also introduces IndexShare and an improved speculative-decoding layer for more efficient long-context serving.
Does every GLM-5.2 request use a 1M-token context?
No. The model supports up to 1M tokens, but client configuration and hosted limits still matter. At launch, Claude Code could target GLM-5.2[1m] for the full window. Current Coding Plan requests for previous GLM-5.2 IDs are automatically routed to GLM-5.3; direct API and self-hosted GLM-5.2 still support up to 1M context. Several official evaluations used 256K or 400K contexts.
Can I self-host GLM-5.2?
Yes. Z.ai publishes MIT-licensed weights on Hugging Face and supports several inference frameworks. The practical constraint is hardware: a frontier-scale model plus a long KV cache generally requires multi-GPU or multi-node infrastructure.
Is GLM-5.2 still the latest Z.ai model?
No. GLM-5.3 superseded it on August 14, 2026 with further post-training gains in coding, long-horizon agents, and cybersecurity evaluation.
Which reasoning effort should I choose?
Z.ai documents Max as the default and recommended effort for coding tasks. Use High when lower reasoning intensity is preferred; benchmark comparisons should still match effort level, harness, token budget, and timeout.

