Skip to content

ZCode Tutorial: GLM’s Claude Code Rival [Hands-On]

ZCode just dropped from Z.ai - the GLM makers. Here's how to actually use it, what breaks on day one, and when to skip it for Claude Code.

7 min readBeginner

The first question everyone’s asking: is ZCode actually Claude Code, or just a lookalike? Neither. ZCode is Z.ai’s own desktop app, built by the team behind the GLM model family, shipped the week of July 1, 2026. It borrows the agent-first idea from Claude Code but the UI – per one Hacker News thread – lands closer to Codex. Early users called it “basically an exact copy of Codex.”

That naming is confusing. The tool trending under “ZCode: Claude Code from the makers of GLM” is actually the official use for GLM-5.2 – the open-weight coding model that scored 62.1 on SWE-bench Pro against GPT-5.5’s 58.6 (per Z.ai’s own benchmarks, published July 2026). This guide walks you through installing ZCode, running your first Goal, and – the part nobody else covers – deciding whether to just use GLM inside Claude Code instead.

What ZCode actually is (and what it isn’t)

ZCode is a free desktop app Z.ai calls an “Agentic Development Environment.” It bundles a file manager, terminal, Git panel, live browser preview, and AI agent chat. Open a project, describe what you need, the agent reads your files, writes code, runs commands, commits changes. Available on macOS, Windows, and Linux (beta as of July 2026).

The model powering it is a separate product. GLM-5.2 is a 753B-parameter Mixture-of-Experts model – roughly 40B parameters active per token, 1M-token context, MIT license. The app is closed-source. The model is not. That distinction matters when we get to the hybrid workflow.

Think of it like a car and an engine sold by the same company. The engine (GLM-5.2) goes into other chassis too – Claude Code, Cursor via OpenRouter, your own scripts. ZCode is Z.ai’s own chassis, tuned to get the most out of the engine. You don’t have to use their car.

Setting up ZCode

Five minutes if nothing breaks. Here’s what to do:

  1. Download from zcode.z.ai. macOS ships Apple Silicon and Intel builds; Windows has 64-bit and ARM64; Linux has x64 and ARM64 (Beta).
  2. Open the app and connect. If you have a GLM Coding Plan already, bind it now – that unlocks the 1.5x quota bonus (valid through July 31, 2026). If not, start the free trial: 5 days, 3M GLM-5.2 tokens/day plus 2M GLM-5-turbo tokens/day, no credit card at signup.
  3. Point it at a real project. Not a fresh empty repo. You want to verify the agent against code you actually know.
  4. Set execution mode. Five modes cycle with Shift+Tab, from ask-before-everything to full access. Start at confirm-before-change. Full access on the first run is how you lose an afternoon.

To try Goal Mode, type /goal and describe a bounded, verifiable objective. Not “rewrite my auth system” – something like “fix all TypeScript errors in the /components directory.” The agent keeps iterating until the goal verifies complete, which only works when “complete” has a clear test.

Before your first real Goal: create an AGENTS.md file at the repo root with your coding conventions, forbidden paths, and test commands. ZCode reads it at the start of every task – it’s the single highest-use setup step for keeping long agent runs on track.

The hybrid trick: GLM inside Claude Code

Actually, the most useful thing about ZCode might be the subscription it comes with, not the app itself.

Your GLM Coding Plan works in Claude Code too. Z.ai’s API is Anthropic-compatible – two environment variables and Claude Code routes through GLM-5.2. Same quota, same model, different use. Edit ~/.claude/settings.json per the official Z.ai docs:

{
 "env": {
 "ANTHROPIC_AUTH_TOKEN": "your_zai_api_key",
 "ANTHROPIC_BASE_URL": "https://api.z.ai/api/anthropic",
 "ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-5.2[1m]",
 "ANTHROPIC_DEFAULT_HAIKU_MODEL": "glm-4.7",
 "API_TIMEOUT_MS": "3000000"
 }
}

Two reasons to care. Claude Code is a more mature CLI with agent primitives ZCode is still building toward. And if ZCode crashes mid-task (see next section), the CLI keeps working with the same underlying model. One subscription, two clients.

Day-one pitfalls

ZCode launched the week of July 1, 2026. Point releases are shipping fast. That velocity has costs.

The Apple Silicon crash.Issue #51 on the ZCode feedback repo documents what happens on version 3.1.6: “Cannot connect to API: write EPIPE” errors, “Worked for 0s” messages, and unsaved work gone when the window goes blank/black on restart. The reporter confirmed it’s a client-side bug – hitting the API directly returns HTTP 200, meaning the GLM-5.2 endpoint itself is fine. The crash is in ZCode’s renderer process, not the model layer. If you’re on M-series Mac: save constantly, check for app updates before starting any long Goal.

The quota math. Turns out the “1.5x bonus” headline is less generous once you see the full coefficient table. Off-peak hours – 20 hours per day – consume only 0.67x quota per token. But coding during the peak window (14:00-18:00) burns 2x per token on rolling 5-hour windows instead of the usual 3x. The 1.5x bonus partially offsets the peak multiplier; it doesn’t eliminate it. Long Goals during off-peak are meaningfully cheaper. Save the focused sprint sessions for mornings or evenings.

Bot Channel is WeChat and Feishu only. The main selling point for remote control from your phone doesn’t work on Slack or Discord yet, despite what most Western coverage implies. If you’re outside China, this feature is a QR-code phone pairing setup, full stop.

ZCode vs Claude Code vs the hybrid

Direct comparison at list prices, current as of July 2026 (pricing subject to change – verify at each vendor’s site):

Feature ZCode Claude Code GLM in Claude Code
Entry price $18/mo (Lite, list) Check anthropic.com $18/mo (GLM Coding Plan Lite)
Default model GLM-5.2 (1M ctx) Claude family GLM-5.2 via Anthropic-compatible endpoint
Interface Desktop GUI Terminal CLI Terminal CLI
Goal mode Native /goal No direct equivalent No
Plugin ecosystem Ships with Claude Code marketplace access Native Claude Code plugins Native Claude Code plugins
Free trial 5 days, 5M tokens/day Check anthropic.com Same GLM trial applies

Pick based on where you work. Desktop cockpit with visual Goal tracking? ZCode. Terminal-native and comfortable with CLI agent loops? Claude Code directly. Paying for GLM anyway and want both surfaces for one subscription? The hybrid. The vendor benchmark numbers (GLM-5.2 at 81.0 on Terminal-Bench 2.1 vs. Claude Opus 4.8 at 85.0) are worth reading with appropriate skepticism – vendor-published, and the gap at the very top of repo-level task difficulty is real. Don’t switch full-time on a launch-week trial if your work is in that hardest band.

FAQ

Do I need the GLM Coding Plan to use ZCode?

No – ZCode is free and supports BYOK for Anthropic, OpenAI, OpenRouter, DeepSeek, Moonshot, and any OpenAI/Anthropic-compatible endpoint. You only pay Z.ai if you want GLM-5.2 through their infrastructure.

What’s the practical difference between running GLM-5.2 in ZCode versus in Claude Code?

The model is identical. What changes is the shell around it. ZCode gives you Goal Mode, visual execution controls, and file/terminal/Git panels in one window – good for long multi-hour tasks you want to monitor visually. Claude Code gives you a terminal-native CLI that’s been battle-tested longer, with a more mature plugin ecosystem. Two-hour visual Goal you’ll check on later: ZCode. Twenty-minute bug fix you’ll drive manually: Claude Code.

Is it safe to give ZCode full filesystem access on day one?

No. Start in confirm-before-change mode and stay there until you’ve watched a few Goals complete cleanly. The Apple Silicon crash (issue #51) loses unsaved work – that alone is enough reason to keep the training wheels on for week one.

Next step: Grab the 5-day free trial at zcode.z.ai, open one real project, and run a single bounded /goal in confirm-before-change mode. If it finishes cleanly, add the Claude Code env vars so you can hit the same model from your terminal. Then decide which surface you actually want to live in.