Keep the coding harness you already built while GLM-5.3 moves expensive API work to a much cheaper model in minutes.
By Nate
Published: 2026-08-21
URL: https://natesnewsletter.substack.com/p/glm-5-3-claude-code-codex
You can save hundreds of dollars on Codex or Claude Code by moving expensive work to GLM-5.3. You don’t have to give up the setup you already use.
I learned that the expensive way. I expected one overnight Codex run to cost about $20. Codex kept validating, and I woke up to a token bill of more than $300. API runs keep reading, checking, repairing, and trying again long after they’ve blown through the number you had in your head.
GLM-5.3 gives you a cheap place to send that work. Z.AI’s GLM Coding Plan starts at $18 a month. The overrun on my one night—more than $280—would pay for fifteen months of GLM. Move one tenth of a comparable night’s work to GLM and the plan has already paid for itself, with more than $12 left over. Move half and the net savings exceed $132. The $18 tier meters on a five-hour refresh and a weekly cap, so it won’t replace your main plan. Usage also costs half as much outside Z.AI’s peak hours, which are weekday afternoons in Singapore. For most of the US that means the cheap window is most of your working day.
The best part is that you don’t have to switch coding tools to get those savings. GLM-5.3 runs inside Claude Code and Codex. Your files, project instructions, permissions, MCP servers, hooks, tests, and review flow stay where they are. You add a private launcher or a GLM profile, then send GLM the jobs that don’t need your most expensive model.
The setup takes a few minutes. Here’s what’s inside:
- A working second launch path in both tools. Claude Code and Codex, each pointed at GLM, with your normal setup untouched and reversible in one step.
- What follows the model and what doesn’t. Your files and rules come along. The conversation stays behind, and that distinction decides how you use it.
- A six-line handoff. The template that gives a fresh model a clean job instead of a transcript to decode.
- Four real jobs, sorted. Which two belong in the cheap queue, which two stay with your strongest model, and why the line falls there.
- A scorecard that measures the right thing. Cost per accepted result. A cheaper model that needs two retries and an hour of cleanup didn’t save you anything.
- The exact configuration, in the companion guide. Every command, every file, every value, tested against a paid key, kept current, and written as prompts you paste into an agent so you don’t type any of it.
Subscribers get the full deep-dive and guide, plus membership to my Slack community!
LINK: [Grab the guide and set it up in one paste]
Config is where this goes wrong. You retype a base URL off a video, transpose one character, and lose forty minutes deciding whether the failure is your typo or the model. Or worse, the API key ends up somewhere it should never live. The guide removes that whole class of problem: every setup step is a prompt you hand your agent, and the agent does its own configuration and reports what it changed.
What the guide covers:
- Setup you paste. Every configuration step is written as a prompt you hand the agent you already have open. It saves your key outside the project, writes the launcher, adds the Codex provider without clobbering your existing settings, and reports back exactly what it changed.
- Commands that were actually run, with dates and results. Executed against a paid Z.AI key, with what each one returned and how long it took.
- The map of what fails. The model name that returns an error. The vendor installers that hijack every Claude session on your machine. The config block that looks right and silently does nothing. You find these out up front instead of at 2am.
- The way back. Both paths are reversible, and the guide tells you exactly what to close and what to delete to return to your normal setup.
- A no-subscription fallback, if you would rather pay per token than add another monthly plan.
- Values that get maintained. Endpoints and model names change. The guide gets updated. This post won’t.
Two more guides pair with this one. Ringer answers the question that comes next, which is what to do once you have a cheap capable model: point a swarm of workers at real parallel work without paying the frontier bill for it. Visible delegation is the handoff pattern that works today.
The harness is what makes savings possible
You already have a harness, even if you never use that word. Claude Code and Codex are the software around the model. The model generates the next answer; the harness lets it read your files, edit code, run commands, call tools and MCP servers, follow project instructions, ask for permission, launch workers, run tests, and return a diff you can review.
That harness is the expensive part you’ve already built. It contains months of CLAUDE.md or AGENTS.md instructions, permissions, hooks, skills, tests, integrations, and working habits. It’s also the environment your team knows how to supervise. A cheaper model doesn’t save much if you have to abandon all of that, rebuild it in another tool, and relearn how the work comes back.
GLM-5.3 removes that setup cost because it runs inside the harness you already use. Z.AI supports both Claude Code and Codex, with an Anthropic-compatible endpoint for Claude Code and a Responses-compatible endpoint for Codex. You keep the working system and change the model handling one job.
The savings live in that split. Your strongest model can keep the architecture decisions, ambiguous failures, and final review. GLM can take documented migrations, tests, lint fixes, mechanical refactors, and other work that doesn’t need your most expensive model. You save money without starting over.
GLM keeps the whole setup except the conversation
When GLM takes a job, the model changes but Claude Code or Codex stays in control. The interface, repository, commands, tools, permissions, MCP servers, and review flow remain familiar.
Your written project knowledge stays available too. Claude Code can load CLAUDE.md, rules, skills, hooks, tests, documentation, scripts, and the code itself. Codex can load AGENTS.md, skills, tests, project instructions, hooks, documentation, and the same repository. A different model can read that material because it lives in files rather than one chat.
The one thing GLM doesn’t automatically inherit is the old conversation. It won’t know which theories another model rejected, what you corrected, or which decision was made 30 turns ago unless you write those facts down. So give GLM a clean job with a clear handoff. Don’t drop it into the middle of a sprawling investigation.
Start GLM on a clean job
Suppose your Claude session has spent an hour investigating an intermittent authentication bug. It has ruled out two theories, learned that one scary log line is harmless, found a race after a particular retry, and recorded that another team owns the middleware. A fresh GLM session doesn’t know any of that.
Start substantial work on the model you expect to finish it. A handoff such as “update these 38 API calls to the new field name and run these tests” gives GLM a clean seam into the project. “Continue what we have been doing for the last 40 turns” doesn’t.
When important facts do need to cross the boundary, put them in the handoff or the project files. Further down, I’ll give you the six lines that do it. First, let’s get GLM running inside the harness you already have.
Add GLM-5.3 to Claude Code
I would keep the normal Claude Code setup exactly as it is and create a reversible second launch path for GLM. Do not overwrite the normal settings while you are experimenting, and never put the API key in the repository or a shared launcher. Because the new session will send prompts and code to Z.AI, check your company policy, repository restrictions, and client commitments before using it on sensitive work.
The mechanism is a handful of environment variables. You point Claude Code at Z.AI’s Anthropic-compatible endpoint instead of Anthropic’s, map its model choices onto GLM-5.3, and pass your Z.AI key. That’s the whole change. Save those variables behind a command name you’ll remember, such as claude-glm, and you have two doors into the same tool. Plain claude still opens a normal Anthropic session. claude-glm opens a Z.AI one.
One thing to avoid on the way in. Don’t run Z.AI’s vendor installer scripts. They write the provider override into your global Claude settings, which redirects every Claude session on your machine instead of one. The guide names them and gives you the launcher that doesn’t do that.
The first time you launch, Claude Code will flag that it doesn’t recognize the model name and tell you your claude.ai connectors are off. Both are expected. It’s never heard of the outside model, and shutting off connectors is a safety feature, because a swapped model shouldn’t be reaching services linked to your Claude account.
GLM-5.3 always reasons, and you can’t turn it off. Effort runs high by default and replies include a thinking block before the answer. Leave room for both.
The GLM session can open the same repository, read the same durable project instructions, and use the Claude Code environment you already understand. It won’t inherit the old Anthropic conversation or cache, which is why I would use the normal Claude session as the lead and the GLM session as a bounded worker.
Claude Code’s subagent behavior reinforces this choice. A normal subagent starts with fresh context and a delegated task. Anthropic also has experimental forked subagents that inherit the parent conversation and reuse its cache, but forks use the same model as the parent. Claude Code documents model selection for named subagents; it doesn’t currently document a separate provider endpoint for one subagent under an Anthropic parent.
You can build a gateway or custom integration around that, but I wouldn’t ask a beginner to start there. Open two sessions instead.
Keep ordinary Claude in charge of the ambiguous work. Give the GLM session a self-contained implementation, test, migration, or exploration job.
Worth being clear about what you’re handing over. The GLM session inherits the same file access, local tools, and hooks your normal session has, and anything it writes to memory lands in your real memory store. Give it a worktree or a scratch copy, not your main checkout, and keep anything that can deploy or touch production in a session you trust.
Ask the GLM session to return the files it changed, the checks it ran, and anything it couldn’t resolve. Let the stronger lead review consequential work.
Add GLM-5.3 to Codex with a profile
One thing to settle before you start. These instructions are for the Codex CLI. The Codex desktop app can’t currently point at a different model provider, so the swap doesn’t work there.
Codex gets there with two small pieces of personal configuration. You define Z.AI as a model provider in your own Codex config, rather than the project’s, and create a profile that selects GLM through it. Launch with that profile and the whole job runs on GLM. Plain codex keeps using OpenAI, and the two run side by side in separate sessions.
The placement matters more here than in Claude Code, because the file you’re editing is shared with the Codex desktop app and there’s a gotcha that will look correct and silently do nothing. The guide walks it, and starts you with a read-only test that proves the connection before you edit any config file at all.
Keep your OpenAI session open as the lead. Let it define or review the job, hand the work to a GLM run, then inspect what came back. If both will edit at the same time, give the GLM run a Git worktree.
I’ve been running this on a paid Z.AI key. Both paths work: the Claude Code launcher and the Codex profile.
Start with a harmless job anyway. Confirm the session is really running GLM, and inspect what it returns before you trust it with anything larger.
Six lines that define the job
When a second model starts without the first conversation, the handoff decides how much work gets repeated.
I use six lines:
Goal:
Current state:
Relevant files:
Constraints:
Done when:
Checks to run:
Imagine the job is to update 38 API calls after a field rename. The goal is the rename. The current state says the branch is clean and identifies the two affected folders. The relevant files point the worker toward the implementation and tests. The constraint says not to change the public API. “Done when” says the old field no longer appears and the existing tests pass. The final line gives the exact commands.
Six lines is enough context to begin. It’s also much better than pasting a transcript of the whole parent conversation and asking the second model to figure out which parts matter.
The six-line test is useful before you write anything. If you cannot describe the job without reproducing the whole conversation, the work is probably too entangled to hand off cheaply. Keep it in the primary thread or start the whole job with GLM from the beginning.
A good handoff does more than preserve quality because it exposes whether the work was actually ready to delegate. If “done” is a feeling, the worker cannot verify it. Unknown relevant files suggest that discovery may be the real job, while changing constraints mean you’re handing off judgment rather than implementation.
That distinction tells you what belongs in the cheaper queue.
Which coding jobs to send GLM
I wouldn’t route work by asking whether it’s “easy.” Some large migrations are intellectually simple but tedious. Some one-line changes are dangerous because they touch authentication, money, or production state.
The better questions are whether the target is clear and whether the result can be checked.
A strong GLM candidate has an explicit objective, known permissions, relevant examples in the repository, and an acceptance test you can state before the model starts. The job can be large. It just cannot depend on the worker inventing the goal as it goes.
Keep the strongest model in charge when the hard part is deciding what the job should be, reconciling hidden state, weighing risky tradeoffs, or recognizing that the evidence conflicts. A cheaper worker can still collect logs, trace code paths, or build a first map. It should not silently become the decision-maker because it was available.
Four common software jobs make the boundary easier to see.
Start with documented migrations
The repository has 38 calls to an old field, the new name is documented, and the public API must not change. Search can prove that the old name is gone, while the existing test suite can catch breakage.
It makes an excellent first worker job. The specification is stable, the model can inspect examples, and failure produces evidence. Even if the first attempt misses three calls, the check tells you exactly what remains.
Add tests after the behavior is settled
If the product behavior is specified and representative tests already exist, GLM can add cases, cover an untested branch, or reproduce an established testing pattern. The worker is encoding a decision the team already made.
A cheaper model can absorb a surprising amount of backlog here. The acceptance standard still matters. Run the tests, inspect whether the assertions test behavior rather than implementation trivia, and reject a large pile of shallow coverage.
Keep ambiguous production failures with the lead
An authentication bug may involve timing, stale sessions, misleading logs, environment differences, and code owned by several teams. The problem statement changes as evidence arrives. A cheaper worker can gather logs or trace calls, but I would keep the main investigation with the strongest model I trust.
GLM can debug fine. The difficult part is deciding which evidence matters and revising the hypothesis without losing state. Long handoffs and repeated rediscovery are exactly what erase the price advantage.
Architecture and security aren’t worker jobs
Don’t begin by asking a new worker to redesign authentication, choose a data boundary, or make an irreversible production decision. Those jobs combine ambiguity with consequences. They need strong reasoning, explicit human review, and often a second independent opinion.
Once the decision is made, pieces of the implementation may move into the cheaper queue. The architecture stays with the lead, while a documented migration, test expansion, or mechanical refactor can go to the worker. The point is to separate judgment from execution.
Is GLM-5.3 actually cheaper
The $18 price is easy to understand, which is precisely why it can mislead you.
Per-token rates are published everywhere. They don’t tell you how many times an agent will read, check, repair, and check again before it stops. My overnight validator made that difference painfully concrete: the model can keep taking individually reasonable turns until the final bill bears little resemblance to the estimate you started with.
The real cost of a coding result includes the model or subscription cost, the context you had to reconstruct, the retries, the human review, the repair work, the delay, and the chance that a plausible mistake escapes. If the model is five times cheaper but needs two retries and an hour of cleanup, it may have lost.
I saw this in the multi-model testing behind my Chinese-model bakeoff guide. A GLM worker reported that it had found 213 quotations. The validator caught 13 passages that had been stitched together or paraphrased as direct quotes. The work was useful, the first result was unacceptable, and the check made the difference visible. The retry passed.
A frontier worker made its own separate error in the same system. Both workers needed the same acceptance standard, which changes the unit of comparison from token price to accepted result.
For each model, record whether the first attempt passed, how long the run took, how many redirects or retries it needed, how much human review and repair it created, which checks passed, and whether you accepted the result for real use. Then estimate the cost of getting to that accepted state.
MeasureNormal modelGLM-5.3First attempt met the written acceptance checkYes / NoYes / NoElapsed run timeRedirects or retriesHuman review and repair timeTests or checks passedResult accepted for useYes / NoYes / NoEstimated total cost of the accepted result
You don’t need perfect accounting to learn something. A simple scorecard will tell you whether the cheap run is obviously saving time, obviously creating work, or close enough that you need more examples.
The review burden belongs in the calculation even when nobody bills by the hour. A worker that generates ten pull requests can make the system slower if a senior engineer has to inspect all ten. Ten pull requests is activity.
The metric is accepted work.
Run three to five real comparisons
Choose a task you recognize well enough to grade. Don’t start with a toy prompt, and don’t start with the most dangerous change in the repository. Pick something real, bounded, and reversible.
Good first candidates include adding tests for specified behavior, updating a documented dependency behind a stable test suite, applying a field-name migration, fixing lint failures, or implementing one approved ticket with explicit acceptance checks.
Write the six-line handoff before either model starts. Run the normal model and GLM on the same class of task. You don’t need them to edit the same branch at the same time. The point is to compare how each handles equivalent work under the same definition of done.
Start with three to five cases. Include an ordinary case, a difficult case, and one ugly edge case. If the worker fails in the first two obvious ways, stop. You don’t win a prize for running seventeen more tests that confirm the same limitation.
If the model performs well, increase the ambition. Give it a larger migration, a more complicated set of missing tests, or a longer read-heavy exploration. Back off when failure, review time, or context reconstruction begins to erase the advantage.
I would also set an attempt budget. One retry after a clear, machine-detectable failure can be economical. Five rounds of vague correction usually mean the job, handoff, or model is wrong. At that point, return the work to the lead and keep the failure as a future test case.
Over time, you’ll build a small replay set for your repository: jobs you already understand, checks you trust, and results you can compare after a model or provider changes. It beats someone else’s global benchmark. And it tells you exactly which work this model can do inside your system.
Make project context portable across models
The more you rely on multiple models, the more valuable your project files become.
CLAUDE.md and AGENTS.md should contain the rules a new session cannot safely guess: how to run tests, which folders are off-limits, what “done” means, which public interfaces must stay stable, how the team handles secrets, and what evidence a completed task must return. Architecture decisions should live in documentation. Repeated failure lessons should become tests or short notes. Known commands should not have to be rediscovered in every conversation.
This doesn’t mean dumping the whole organization into one enormous instruction file. The point is to move durable decisions out of temporary conversation and put them near the work that needs them.
When those decisions live in files, Claude, Codex, GLM, or another future model can load them. The model may reason differently, but it doesn’t begin from zero. When they live only in chat history, your model choice is constrained by wherever the conversation happens to be.
Portable context has an economic return because it lowers switching cost, reduces repeated explanation, shortens handoffs, and gives a worker a better chance of succeeding on the first attempt. It also makes your project less dependent on one provider keeping the same prices, limits, and product forever.
The benefit compounds beyond GLM-5.3. The same discipline can route work to a less expensive OpenAI or Anthropic model, bring a new frontier model into the system without rebuilding the whole workflow, or give you another path when a provider has an outage or changes a limit.
The model market will keep changing. The project’s written understanding should survive it.
Once this works, you can change models without changing how you work
I’ve spent years building products. Tiny startups, and systems used by more than a hundred million people. Software companies have always liked bundles. Bundles make the product easier to sell and the customer harder to move. Over time, the interface, workflow, service, and data become so entangled that switching one part feels impossible.
What I appreciate about both Claude Code and Codex right now is that each makes some form of unbundling possible. The tools have different personalities, and those differences remain useful even when another provider supplies the model.
Claude Code often feels like a cockpit to me. I stay close to the work, steer it, and change direction as the problem becomes clearer. Codex feels more like an operations desk: I dispatch jobs, let them run, inspect what comes back, and keep several threads moving.
Those work styles live partly in the harness. They don’t disappear because GLM supplies the intelligence for one session or worker. I can keep steering in Claude Code or dispatching in Codex without giving up the environment to try a different economic model underneath it.
That changes what may become durable in AI coding. Model leadership can move every few months, and prices or limits can change much faster. The harness, project context, tests, tools, permissions, and review habits may become the stable layer.
This doesn’t make the model interchangeable. Different models will continue to have different strengths, failure modes, and costs. My Opus 4.8 benchmark article made the same point from the other direction: a winning model still should not receive every job. The harness and workload can change the recommendation.
The practical advantage comes from building a working environment where the next model can earn a role without forcing you to rebuild everything around it.
Start with one real, bounded job
Set up the second launch path while keeping your normal configuration intact. Pick one task with a clear target and a check you trust, write the six-line handoff, then run it through GLM-5.3 and fill out the scorecard.
If the worker succeeds, give it something harder. If it fails, look at the failure before you blame the model: the task may have been too ambiguous, the handoff may have omitted a constraint, the tests may have been too weak, or the model may simply have reached its limit on your code.
That is the useful answer. You’re trying to find the boundary.
Keep architecture, security decisions, hidden-state failures, and final consequential review with the strongest model and human judgment available. Move documented migrations, tests, lint fixes, bounded implementation, and read-heavy exploration as the cheaper worker earns them.
Don’t measure how busy the worker looks. Measure the result you accepted, the time it took, and the work it created for everyone else.
The $18 plan matters because it makes this experiment cheap enough to run. The larger opportunity is that the model no longer has to own the whole working environment. Your files, rules, tools, and habits stay put. Intelligence becomes something you route.
Once that is true, the most expensive model no longer gets every job by default.
It has to earn the work.
Coming up
Sunday I’m going after the forward-deployed engineer, the role people are quoting a million dollars for. My read: the money is paying for translation. Someone has to sit inside a customer’s mess and turn it into something a system can actually execute.
Then Monday on YouTube I’m taking on Stripe’s claim that the singularity started January 1. I think they’re right, and I’ll show you the numbers that moved me.
Related reading
- Cheap intelligence won’t matter if your context is trapped. The GLM-5.2 briefing that set up this argument.
- Claude vs Codex: inside the trillion dollar battle for agents. Where the cockpit and ops-desk distinction comes from.
- Keep optimizing execution onto cheap models. Routing to cheap models is the easy half. The leverage sits in the layer you aren’t budgeting for.
- You can’t trust one token number across your tools. The dashboard that keeps Codex, Claude, and ChatGPT honest.
I make this Substack thanks to readers like you! Learn about all my Substack tiers here