Plan mode, Goal mode and the effort slider: running GLM agents by risk in ZCode
ZCode gives you four controls over how much a GLM agent may do alone: permission modes, Plan mode, Goal mode and reasoning effort. What each one really does, straight from the docs, plus a risk table and command templates.
Written for the people on WURK who use AI to earn: freelancers, builders and anyone who sells work made with models.
If a coding agent is how you earn, the risk it takes with your files is your risk. ZCode gives you four controls over how much a GLM agent may do alone: permission modes, Plan mode, Goal mode and reasoning effort. This article explains each one straight from the docs, and how to match them to the job.
Referral disclosure: the Z.ai Coding Plan link in this article is my referral link (code R0K78RJKNW), and I get credit if you sign up. Z.ai's own terms: 10% off a first paid order for eligible new accounts. Renewals, upgrades and follow-up orders are not eligible. https://z.ai/subscribe?ic=R0K78RJKNW
Two sessions, two ways to waste a day
This opening is a composite scenario, not a report of one real session. In the first session, a developer hands a schema change to an agent running with full access. The agent rewrites fourteen files before anyone has agreed on the approach, and reading the diff takes longer than the work did. In the second session, the same developer, burned once, switches to the strictest mode for a mechanical rename across forty files and spends the afternoon clicking confirm on every read. Same tool, same model family, opposite settings, both wasteful. ZCode's documentation is unusually explicit about the controls between those extremes [1][2]. This article reads them closely: three permission modes, a separate Plan mode, Goal mode, and a reasoning-effort slider, and then matches them to the GLM models on the Coding Plan.
The controls, in one minute
Four controls decide how much a ZCode agent does alone. A permission mode picker at the bottom left of the composer offers Ask before changes (the default), Autonomous mode and Full access, with Plan mode as a separate checkbox at the top of that menu [1][2]. A reasoning-effort slider lives in the model menu, with three levels on GLM-5.4 and Max as the default [1]. The /goal command sets one objective the agent iterates toward in verified rounds [3]. And custom slash commands, plain markdown files you write once, make the agent follow the same instructions every time [4]. Everything described below comes from ZCode's own documentation, checked on 1 December 2026. I did not run ZCode for this piece, and where I add my own working practice it is labeled as mine.
Three permission modes, one risk budget
Ask before changes, the default, confirms before every file edit or command; the docs recommend it for critical code and production config [1][2]. Autonomous mode asks only when an action is risky, and the docs suggest it for everyday iteration [1]. Full access edits files and runs commands with as few interruptions as possible, intended for clear, low-risk tasks; switching to it opens a risk-confirmation dialog, and the mode button keeps a warning style while it is on [2]. Ctrl+Shift+M cycles through the three [1]. My reading, and this is analysis rather than documentation: the picker is a risk budget for the session, not a trust dial for the model. The same model deserves different modes for different blast radii, strict on the billing config, loose on a throwaway prototype.
| Mode | Asks before | Best for |
|---|---|---|
| Ask before changes (default) | Every file edit or command | Critical code, production config |
| Autonomous mode | Only risky actions | Everyday iteration |
| Full access | Almost nothing; risk dialog on switch | Clear, low-risk tasks |
Plan mode: agree before anything moves
In Plan mode the agent only inspects the code and proposes a plan; editing starts after you confirm [1][2]. It is a checkbox at the top of the execution-mode menu, or you can type /plan, and the docs suggest it for complex work where the approach should be agreed first [1][4]. My practice, labeled as mine: a plan review is the cheapest review you will do all day. Read it for three things, the list of files it intends to touch, the order of changes, and what it has deliberately left out of scope. Approving a plan is not a substitute for reading the final diff. It is a substitute for arguing with a diff that should never have been written.
Goal mode: say what done means, then wait
Goal mode exists for work that is easy to state in one sentence but takes many rounds to finish [3]. You type /goal followed by the objective, and the agent works in rounds: it edits files, runs commands and updates its to-dos, and at the end of every round a separate check decides whether the goal is met. If it is not, the next round starts automatically; only when it is met does the task wrap up with a summary [3]. A session has one goal at a time, /goal replace swaps it, /goal resume continues a paused one, and /target is an alias [3]. Two documented limits matter: a goal cannot be set while Plan mode is on, and a /goal sent while a task runs is queued, not executed immediately [3]. The docs' own advice is to write checkable goals, and their examples are worth copying: not 'make it faster' but 'make pnpm test pass and keep first paint under two seconds'; not 'fix some type issues' but 'fix all TypeScript compile errors' [3]. My addition, labeled as analysis: the verifier checks your sentence, so your sentence is the spec. And because a plan meters usage in credits [8], a fuzzy goal is a quota leak paid in rounds.
My diagram from the documented Goal mode flow [3].
| Vague goal | Checkable goal |
|---|---|
| Make it faster | Make pnpm test pass and keep first paint under two seconds |
| Fix some type issues | Fix all TypeScript compile errors |
Reasoning effort: pay for thinking where it pays
Reasoning effort sets how much reasoning the model spends before answering: higher is steadier but slower [1]. GLM-5.4 offers three levels. Low is the fastest, for simple questions and small, clear edits. High balances speed and quality, for everyday development. Max, the default, thinks most thoroughly, for architecture, hard bugs and long-running tasks [1]. You adjust it with the Effort slider at the bottom of the model menu or by pressing Ctrl+T, and other models expose their own levels in the same control, defaulting to the highest one [1]. My analysis: effort multiplies the value of a good brief. On a well-scoped mechanical task a lower level is usually enough, and effort interacts with quota, because deeper thinking and more rounds both draw on the same weekly pool. The metering mechanics behind that pool are covered in my earlier piece on the ZCode token counter, linked at the end.
| Level | Speed | Best for |
|---|---|---|
| Low | Fastest | Simple questions, small clear edits |
| High | Balanced | Everyday development |
| Max (default) | Slowest, deepest | Architecture, hard bugs, long tasks |
Matching model, mode and effort to the job
This section is my working map, a proposal, not Z.ai guidance. The models have documented positioning: GLM-5.4 is the flagship for complex software engineering and agentic tasks, with a stable 1M context and three reasoning levels [7]; the Coding Plan overview describes the plan tiers and how usage is metered in credits, with a weekly allowance [8]. Against that background I match four knobs to the job. Quick mechanical edits: GLM-5.3-Flash, Autonomous mode, low effort. Everyday feature work: GLM-5.3 or 5.4, Autonomous mode, high effort. Approach-sensitive changes: GLM-5.4, Plan mode, max effort, because the plan is where mistakes are cheapest. Long multi-round tasks: GLM-5.4, Goal mode, max effort, with a checkable sentence as the spec. The table below lays this out. When a cheap model fails twice on the same step, I escalate instead of arguing, a routine I described in the escalation article, also linked at the end.
| Job | Model | Mode | Effort |
|---|---|---|---|
| Quick mechanical edits | GLM-5.3-Flash | Autonomous | Low |
| Everyday feature work | GLM-5.3 or 5.4 | Autonomous | High |
| Approach-sensitive changes | GLM-5.4 | Plan | Max |
| Long multi-round tasks | GLM-5.4 | Goal | Max |
Teach the machine your routine: custom commands
Custom commands turn a procedure you repeat into a slash command that runs the same instructions every time [4]. Each command is a markdown file: in the user scope it lives at ~/.zcode/commands/.md and applies to all projects; in a workspace it lives at /.zcode/commands/.md; ZCode also reads a .agents/commands directory [4]. The frontmatter is optional and supports description, argument-hint, skills, model and allowed-tools; unknown fields do not stop the command from working, they just draw a warning [4]. Inside the prompt, $ARGUMENTS is everything typed after the command, $1 and $2 are positional arguments, and a shell command inside exclamation-backticks runs first and inserts its output into the prompt [4]. Below are two command files I use as templates, plus a small validator I wrote (Python 3, no packages) that checks a command file against the documented naming and frontmatter rules. I ran the validator on these two files and its real output is shown. The command files follow the documented format, but I have not run them inside ZCode.
The two command files (save under .zcode/commands/):
---
description: Review the current uncommitted diff for correctness and risk
argument-hint: [focus-area]
---
Review the changes shown by !`git status --short` and !`git diff`.
If $ARGUMENTS names a focus area, review that area first; otherwise review everything.
Report, in order: what each hunk does, correctness risks, missing tests, and anything you would not ship as-is.
Do not edit any files during this review.
---
description: Run the workspace verification commands and summarize failures
argument-hint:
---
Run !`git status --short` to list what is staged and modified.
Run the verification commands listed in the workspace AGENTS.md.
If a check fails, quote the failing output and propose the smallest fix, but do not apply it.
The validator (Python 3, no packages):
"""Validate ZCode custom command files against the documented format.
Rules checked (from the ZCode Commands documentation):
- file name: letters, numbers, hyphens, underscores, 1-50 characters
- frontmatter, if present: known fields only (unknown ones warn, not fail)
- placeholders: $ARGUMENTS, positional $1..$9, and !`command` shell inserts
Python 3, no packages. Exit code 0 when every file passes.
"""
import re, sys
KNOWN = {"description", "argument-hint", "skills", "model", "allowed-tools"}
NAME = re.compile(r"^[A-Za-z0-9_-]{1,50}\.md$")
def check(path):
problems, warnings = [], []
name = path.split("/")[-1]
if not NAME.match(name):
problems.append(f"bad file name {name!r}")
text = open(path, encoding="utf-8").read()
body = text
if text.startswith("---"):
end = text.find("\n---", 3)
if end == -1:
problems.append("frontmatter opens but never closes")
else:
for line in text[3:end].strip().splitlines():
if not line.strip():
continue
field = line.split(":", 1)[0].strip()
if field not in KNOWN:
warnings.append(f"unknown frontmatter field {field!r} (works anyway, docs show a warning)")
body = text[end + 4:]
if not body.strip():
problems.append("empty prompt body")
for tok in re.findall(r"\$\d+", body):
if int(tok[1:]) < 1:
problems.append(f"positional placeholder {tok} starts at $1")
if "$ARGUMENTS" in body and "argument-hint" not in text:
warnings.append("uses $ARGUMENTS but declares no argument-hint")
for cmd in re.findall(r"!`([^`]+)`", body):
if not cmd.strip():
problems.append("empty !` ` shell insert")
return problems, warnings
ok = True
for path in sys.argv[1:]:
problems, warnings = check(path)
status = "PASS" if not problems else "FAIL"
ok = ok and not problems
print(f"{status} {path}")
for p in problems:
print(f" problem: {p}")
for w in warnings:
print(f" warning: {w}")
sys.exit(0 if ok else 1)
Its output on the two files (I ran it):
PASS commands/review-diff.md
PASS commands/pre-commit-check.md
The quiet infrastructure: AGENTS.md, memory and side chats
Three smaller mechanisms decide how much context the agent carries. ZCode reads two AGENTS.md files when a task starts: the global ~/.zcode/AGENTS.md for personal preferences, then the workspace-root AGENTS.md for project stack, conventions and verification commands, concatenated in that order [1]. The /init command creates or updates the workspace file [4]. ZCode does not scan subdirectories or merge multiple levels, so the important rules belong in the root [1], and a CLAUDE.md is copied into AGENTS.md once when migrating a Claude Code project [1]. Separately, project memory lets the agent accumulate reusable facts between sessions; it is off by default, lives only on your machine, never enters Git, adds some token usage, and subagents neither read nor write it [1]. Finally, side conversations (/side or /btw) let you ask something without interrupting a running task: they inherit the main session's history, but they are temporary, support no Goal mode, and vanish when closed [1]. A fork, from the hover menu on a completed message, branches a session instead, and in a Git project it can fork into a new worktree so the experiment never touches your working files [1].
A working day, run by risk
A scenario, to show the shape rather than claim a measurement. 09:30, a schema migration on a client repository: Plan mode, GLM-5.4, max effort. The plan comes back with a file list and an order; one out-of-scope refactor is caught and removed before anything is edited. 11:00, a mechanical serializer rename across many files: GLM-5.3-Flash, Autonomous mode, low effort, done in minutes. 14:00, a failing integration suite: Goal mode with the sentence 'make the integration suite pass without changing its assertions', GLM-5.4 at max effort, running rounds while you answer email. 16:30, a confusing reply in the main task: a /btw side conversation, so the running work is not disturbed. 17:00, /compact to shrink the day's context, and the procedure that worked becomes a saved /command for next time. No timings here are measured; the point is that the settings change with the risk, not with habit.
Where this still hurts
Honest limits, my analysis unless a source is cited. Round verification is a check, not proof: a passing verdict means the goal as written looked met, so a badly written goal passes badly done work. Full access plus untrusted content is the dangerous combination: an agent that edits files and runs commands should not be reading content you do not trust, and the confirmation dialog on that mode exists for a reason [2]. Plan mode slows genuinely simple work; a one-line fix does not need a plan. Goal mode spends quota in rounds, and my token-counter piece showed how quickly long sessions accumulate. Memory being off by default means every new session starts blank until you opt in [1]. None of this argues against the controls. It argues for picking them deliberately instead of leaving the defaults to decide.
A five-line routine, and the disclosure
The routine I keep: pick the mode by risk before picking the model. Send anything approach-sensitive through Plan mode once. Give long work a checkable /goal sentence. Turn effort down for mechanics and up for architecture. Save repeated procedures as /commands. And the disclosure, unchanged from my other Z.ai pieces: starting on the plan is optional, and the invitation links in this article are my referral links, so I get credit if you sign up through them. According to Z.ai's own campaign rules, an invited user who registers through an invitation link or code and pays for a first GLM Coding subscription gets a 10% instant discount on that order; it applies only to new accounts or accounts with no paid subscription history, once per user, not to renewals, upgrades or downgrades, and it cannot be combined with other first-order discount campaigns [9]. I have added nothing beyond those rules, and Z.ai can change them. Sources are listed below; the token-counter and escalation articles follow as reading.
Sources
[1] https://zcode.z.ai/en/docs/agents [2] https://zcode.z.ai/en/docs/safety-confirm [3] https://zcode.z.ai/en/docs/goal [4] https://zcode.z.ai/en/docs/commands [5] https://zcode.z.ai/en/docs/welcome [6] https://docs.z.ai/devpack/tool/zcode [7] https://docs.z.ai/guides/llm/glm-5.4 [8] https://docs.z.ai/devpack/overview [9] https://docs.z.ai/devpack/credit-campaign-rules [10] https://zcode.z.ai/en/docs/configuration
Original article with the same visuals in six languages: https://jackgross-five.vercel.app/posts/zcode-plan-goal-execution-modes-glm-agents
Affiliate links, I may receive referral credits. ZCode invitation: https://zcode.z.ai/invite/ALWM9JUA . Z.ai Coding Plan invitation: https://z.ai/subscribe?ic=R0K78RJKNW






Latest comments
0