Claude Code 2.1.325 → 2.1.330 upgrade test: hook “blocks” now count for more
Reconciled on 2026-11-21: the terminal build and the Claude Code bundled in the desktop app both reached 2.1.330, and the desktop app itself jumped to a major version starting with 6. These changes are mostly about tighter gatekeeping and steadier compaction: a hook's printed “block” now takes effect in more cases, and auto-compaction rebuilds the system prompt.
Reconciliation date: 2026-11-21. Both sides are in sync this time: the terminal build, as shown by claude --version, is 2.1.330, and the desktop app 6.28899.6 bundles 2.1.330 too. Upstream, all five releases from 2.1.326 to 2.1.330 were published, with no numbers skipped. The desktop app went from 5.11492.5 to a 6.x build, a major version change, but the changelog does not say the overall architecture changed; reading it, every entry is an item-by-item change.
The previous post noted that the text a PreCompact hook prints gets carried into the summary. Across both versions tested, it was missed 1 time in 8, so I took it as “likely to arrive, but not guaranteed every time.” This round came in at 6 of 7, and the conclusion stands. 2.1.328 changed how auto-compaction works (section 2), but this path did not become more reliable, nor less so.
2026-11-21 update: After the first version went out, a reader asked their own AI agent to check the official changelog line by line, and it listed 14 items the post did not mention. I went back to my reconciliation log. Of those, 8 were judgment calls I deliberately left out; 6 were real misses, which I had read but left no record of any judgment on. Those 6 have now been added to the matching sections below. One item on their list needed more detail: 2.1.329 removed the automatic retry when
max_tokenshits its limit, and 2.1.330 restored it. I have put it under “Other things worth knowing.” The reason these were missed and the fix going forward are covered in another post.
What to check this time
- Have you written a hook that prints
"decision": "block"every time? Calls it used to let through may now start getting blocked. - Do you use a schedule or
/loop? Schedules created in this version can run for 30 days while the session stays open; ones created before this version still stop after 7 days. Schedules saved from an older version mostly need to be set up again in a newly logged-in session. - Do you work across folders, or have symbolic links in your paths? The check for whether something counts as inside the working folder has changed, and some paths now ask first.
- Have you set variables in the desktop app’s environment variable editor that change how Claude Code loads? Those are no longer carried into the session; move them to
envin settings. - Do you run several sessions that share a worktree? 2.1.330 fixed a problem that could delete a worktree another session was still using.
1. Hook “blocks” now take effect in more cases
Evidence: changelog only, checked against local settings
What changed: a hook’s return value "decision": "block" now really blocks in more cases. The changelog spells out the consequence: a hook that prints “block” on every run may start blocking calls (2.1.326).
How I checked: I went through my hooks one by one. Only two print block: one checks for background work when a subagent wraps up and blocks at most once per agent; the other blocks only in unattended schedules, and only when there is a task list. Both print block only under certain conditions and were meant to block, so this change does not affect them.
A reminder for you: when writing a hook, don’t treat block as a default you can print without consequence. It used to fail to count in some cases, so you may never have noticed a hook that kept printing it.
2. Auto-compaction now rebuilds the system prompt
Evidence: tested live, with a positive control; the plan mode item is changelog only, checked against local settings
What changed: auto-compaction used to reuse the system prompt from the start of the session. It now rebuilds it, the same way a manual /compact does (2.1.328). In the same period, a freeze of several minutes after compaction was fixed (2.1.330), and a problem where files outside the project that had been read earlier were rejected for editing after compaction was fixed too (2.1.327).
How I checked: my hook notes on compaction say to rerun after any upgrade past the previous version, and this time it was triggered again. I ran six sessions on the 2.1.330 bundled with the desktop app and two more on the terminal build, about US$1.44 in total. Results: PreCompact returned “block,” and manual and auto compaction were still blocked; the SessionStart hook’s output after compaction was still delivered as before. In the two calibrated runs with a positive control, the text PreCompact printed made it into the summary in 6 of 7 samples.
A reminder for you: rebuilding the system prompt is good for long sessions. After compaction, the model sees the current settings rather than the ones from the opening. But anything the model must see after compaction should not rely only on text PreCompact prints.
One more change from the same period: in plan mode, auto-compaction now runs on the model that is answering you. For example, with opusplan, Opus does the compaction, so it may cost more (2.1.326). My default model is haiku and I don’t use opusplan, so the impact is small. If you often run long sessions in plan mode, keep an eye on the cost.
3. Worktrees: no longer deletes ones others are using
Evidence: changelog only, checked against my local usage
What changed: ExitWorktree and the dialog for exiting a worktree could previously delete a worktree that another running session was using. This is fixed in this version (2.1.330). Earlier releases also tightened things along the way: removal is refused while a background subagent or shell command may still be running inside the worktree (2.1.326), and the user is asked first when there may be unsaved work (2.1.327).
How I checked: I often keep several parallel sessions open in the desktop app, each working in its own worktree, so this one hit me directly. During reconciliation I also cleaned up two leftover folders that git no longer recognizes. The files in them differed from the main line only in line endings, so nothing was lost. I can’t tell whether those two leftovers came from this old problem.
A reminder for you: if you also run several sessions at once, before upgrading to 2.1.330, check that no other session is inside a worktree before you exit it.
4. Desktop app: environment variables no longer carried into sessions
Evidence: tested live
What changed: starting with desktop app 6.28899.2, a session no longer carries over environment variables that change how Claude Code loads. The environment editor lists the variables of this kind you have saved and explains where each one should go.
How I checked: I have an environment variable that loads my mods, and it was the one I was most afraid this change would drop. It is set in settings under env, not in the desktop app’s environment editor, so I read it directly inside a session on the new desktop build. The paths for all three mods are still there.
A reminder for you: put Claude Code variables under env in settings, not in the desktop app’s environment editor. If a mod or a setting “suddenly stops having an effect” after an upgrade, check this change first.
5. A few gates made stricter
Evidence: changelog only, checked against local settings
What changed:
- More
rmcommands aimed at the root directory, the home directory, top-level folders, or the working folder now ask first. When no one can answer, they are refused outright (2.1.330). - Bash commands whose variables expand into very long text are refused outright, with a hint to use a shorter value or a file instead (2.1.327).
- More PowerShell tool commands now ask first (2.1.326–2.1.327). A subagent isolated with a worktree is refused some git commands that rewrite shared branches (2.1.326).
- The file tools refuse to write Claude Code’s own login file, such as
.credentials.json, and somecpandmvcommands now ask first (2.1.326). - The check for whether a path counts as inside the working folder has changed, so some paths now ask first. Path checks also refuse some symbolic links (2.1.327).
- A subagent that is woken by a message from a sibling subagent and continues its work now follows the session’s permission settings, so prompts may start appearing. When no one can answer, it is refused (2.1.327).
How I checked: the first four items point the same way as habits I already had: cleanup only archives, never deletes; file contents always go through the file-writing tool, never stuffed into a shell command; branches are merged in the main session, not handed to a subagent; and I have a hook that already blocks writes to files whose names look like credentials.json. The last two are more likely to touch me. I often work across several repos, and worktrees contain links that point to shared folders; I also dispatch background subagents and then send them messages to keep going. During this reconciliation I did not hit any new prompts, but I have not tested this specifically.
A reminder for you: if you have an unattended run and a step stops after an upgrade, first check whether it is stuck on one of these new kinds of prompts. Extra prompts on cross-folder paths can be handled by bringing that folder into the session with --add-dir (the changelog does not say so). A resumed subagent stuck on a permission prompt is most likely caused by the last item.
Other things worth knowing
- Recurring schedules with
/loopcan run for 30 days, up from 7, as long as the session stays open. Schedules created before this version still run for 7 days (2.1.330, synced with desktop app 6.28899.6). - Schedules saved from an older version mostly need to be set up again in a newly logged-in session; they only resume if you return to the original session with
--resume. If you leave with “Exit and stop tasks” (except while Claude is still responding), that also ends this session’s schedules, and resuming it later will not run them either (2.1.329). My long-running schedules go through Windows Task Scheduler and are unaffected. Schedules I set up temporarily inside sessions will need to be rebuilt after the upgrade. - The automatic retry when
max_tokensgoes over the model or gateway limit: removed in 2.1.329, restored in 2.1.330. If requests failed behind a gateway between those two versions becausemax_tokenswent over the limit, this may be the cause; at that time you had to setCLAUDE_CODE_MAX_OUTPUT_TOKENSyourself. I don’t use a gateway, so it doesn’t affect me. - For skills that run with a
modelsetting (other than ones that usecontext: fork), the subagents they launch, compaction, and/recapnow stay on the session’s original model (2.1.330). None of my skills setmodel, so this doesn’t affect me. - When a subagent that has already finished is woken by a message from a sibling subagent, it used to inherit that agent’s model and effort. This is fixed in this version (2.1.327). If you care which model dispatched work runs on, earlier records may need a second look.
- Windows: each PowerShell tool call is up to about half a second faster. When searching local paths, Grep and Glob no longer open a console host every time (2.1.327, 2.1.330).
- Desktop app: after a PR is merged, the session is archived automatically. This could previously delete files a session had newly written but not yet committed. This is fixed in this version (6.6395.0).
This post picks out only the changes that touched my own settings and habits. For every other in-scope item, I recorded a disposition in the reconciliation log (which section it went into, or why it doesn’t apply), so leaving it out of this post does not mean I didn’t review it.
Sources
- Anthropic. (n.d.). Claude Code changelog. GitHub. Retrieved November 21, 2026. (Official changelog (terminal build, 2.1.326–2.1.330))
- Anthropic. (n.d.). Claude desktop changelog. Retrieved November 21, 2026. (Official changelog (desktop app, 6.6395.0–6.28899.6))
← Previous:Claude Code 2.1.322 → 2.1.325 upgrade test: this time the desktop app ran ahead of the terminal
Email subscriptions will open later. For now, you can follow new articles and work with RSS.