# Claude Code 2.1.330 → 2.1.332 upgrade test: commands run when a skill loads can now be caught by a hook

> Reconciled on 2026-11-25: the terminal build has reached 2.1.332, while the Claude Code bundled in desktop app 7.37095.0 is still 2.1.331. The new PreSkillShellCommand hook can block shell commands injected when a skill loads, and MCP servers can now provide skills; but while the two versions are out of sync, hold off on adding the new hook to your settings.

Published 2026-11-25 · Updated 2026-11-25 · URL https://wizerdbache.com/en/notes/cc-upgrade-2-1-330-to-332/


Reconciliation date: 2026-11-25. The two sides are out of sync again this time: the terminal build, as shown by `claude --version`, is 2.1.332, while the desktop app 7.37095.0 bundles 2.1.331. Upstream, both 2.1.331 and 2.1.332 were published, with no numbers skipped. The desktop app moved from a 6.x build to a 7.x build, as it did last time, and the changelog does not say the overall architecture changed.

[The previous post](https://wizerdbache.com/en/notes/cc-upgrade-2-1-325-to-330/) noted that the text a PreCompact hook prints gets carried into the summary: “usually gets through, but not guaranteed every time.” This round, it made it into 5 of 7 samples, the lowest I have measured. With only two sessions so far, I am not yet treating it as a change in the version, but the conclusion is firmer: anything the model must see after compaction should not rely on this path alone (section 3).

## What to check this time

- Do you want to use the new `PreSkillShellCommand` hook? First confirm that every Claude Code reading the same settings is already on 2.1.332. The official docs state that terminal builds through 2.1.331 that see it show a warning dialog at every interactive startup.
- Are you connected to an MCP server that provides skills? When you sign in with a claude.ai personal plan, use a sufficiently new model, and connect directly to Anthropic, this feature is on by default, and the server's skills appear in your `/` menu as `server:skill`.
- Do you run Stop or SubagentStop hooks that read the transcript, and do you run them in the desktop app? Before, the hook could miss the last reply; 2.1.331 fixed that.
- Do you install plugins from a marketplace in the desktop app with auto-update turned on? Starting with the next session, updated hooks and MCP servers run directly, without asking first.

## 1. A new hook now covers commands injected when a skill loads

*Evidence: official docs, checked against local settings*

**What changed**: a skill or command's content can include `` !`指令` ``, which runs a shell snippet when the skill loads and puts the result into the content. Before, that snippet did not go through the PreToolUse hook, so a guard hook could not see it. 2.1.332 adds the `PreSkillShellCommand` event, which fires before such a snippet runs and can block it. When it blocks, the skill still loads; only that snippet does not run. The official docs also state that terminal builds through 2.1.331 that see this event in settings show a warning at every interactive startup.

**How I checked**: I went through the skills I wrote, and none of them uses commands injected at load. But the official docs say built-in commands such as `/security-review` also use this mechanism, so there is still something for it to cover. The desktop app bundles 2.1.331, and both share the same settings. The docs only say the terminal build shows a warning; they do not say what the desktop app does, and I have not tested it. Until both are on 2.1.332, I have decided not to add it yet.

**What this means for you**: if your skills use `` !`指令` `` and you rely on a PreToolUse hook to block dangerous commands, this has been a blind spot all along, and it is worth adding this hook. But first confirm that every Claude Code reading this settings file is already on 2.1.332 or later.

## 2. MCP servers can now provide skills

*Evidence: official docs, checked against local settings*

**What changed**: an MCP server can provide skills to Claude Code, named `server:skill` (the changelog lists it under 2.1.332, while the official docs say it has been available since 2.1.331 as a public beta). Per the official docs, it is on by default when you sign in with a claude.ai personal plan; team and enterprise plans need the organization to turn it on. It also needs a sufficiently new model and a direct connection to Anthropic, and `claude -p` and the Agent SDK do not support it. For servers that come from a connector or plugin, the name gets an extra prefix, for example `claude_ai_Docs:pdf`. Any frontmatter settings in these skills, such as tool permissions, hooks and model, are always ignored, and `` !`指令` `` inside their content does not run. To block all skills from one server, you can deny `Skill(mcp__<server>__*)` in your permission rules.

**How I checked**: none of the MCP servers I am connected to provides skills, so nothing showed up this time. What I care about more is the always-loaded context: each skill's description is sent into the conversation every turn, and the always-loaded budget I set for myself is already slightly over. The docs do not say whether MCP-provided skills count toward that skill list.

**What this means for you**: after upgrading, if the `/` menu shows an unfamiliar `server:skill`, it comes from an MCP server you are connected to. If you don't need it, block it with the rule above, so it does not quietly take up your context.

## 3. Compaction: several fixes, and one retest

*Evidence: tested live, with a positive control; the fixes listed below are from the changelog only*

**What changed**: when a summary's content quotes certain XML tags, part of the summary could be lost; 2.1.331 fixed this. 2.1.332 fixed three more: when a summary runs past the output limit, after three consecutive truncations it now asks for a shorter one; after automatic compaction fails repeatedly, the conversation ends with “Prompt is too long” (this only fixes the case where compacting once more before the limit lets it continue); and when a subscription plan is far below its weekly limit, idle compaction is skipped.

**How I checked**: the compaction-related hook note I keep says to rerun after upgrading past 2.1.330, and this time it was triggered. I ran six sessions on the terminal build at 2.1.332, and two more on the 2.1.331 bundled in the desktop app, about US$1.42 in total. Results: PreCompact returned “block,” and both versions still blocked manual and auto compaction; the SessionStart hook's output after compaction was still delivered (measured on the terminal build). Both plain text and the `hookSpecificOutput` form get through, while a top-level `additionalContext` does not, same as before. In the calibrated runs with a positive control, the text PreCompact printed made it into the summary in 5 of 7 samples. Earlier builds came in at 8 of 8, 7 of 8, 7 of 8, and 6 of 7.

**What this means for you**: of the fixes above, only the XML-tag one touches summary content, but two sessions are not enough to tell whether it has any effect. My approach has not changed: anything that must survive compaction goes into the post-compaction SessionStart hook or into a file; the text PreCompact prints is only a bonus.

## 4. Desktop app 7.37095.0

*Evidence: changelog only, checked against local settings*

**What changed**:

- The bundled Claude Code 2.1.331 fixes the Stop hook, which reads the transcript, missing the last reply in the desktop app; the SubagentStop hook also waits until the transcript has been fully written.
- Local Code sessions update plugins from marketplaces that have auto-update turned on; updated hooks and MCP servers run directly from the next session, without asking.
- The desktop app sets `CLAUDE_CODE_DISABLE_SHIP` itself, which turns off the `/ship` and `/steward` commands starting from 2.1.331; you only need to set it yourself if your own launcher clears or filters environment variables.
- When a local worktree session starts from another branch, it used to compare against the default branch and open PRs against it; this version fixes that, provided the branch is already pushed to GitHub and `gh` is logged in.

**How I checked**: the first item touches me directly. I have a hook that reads the transcript when a subagent wraps up, to check whether background work has finished. This time the desktop app was on 2.1.331, so the fix is in effect. The second item does not touch me: my mod is loaded by pointing an environment variable in settings at a local folder, not installed from a marketplace.

**What this means for you**: if you installed a plugin with hooks from a marketplace and leave auto-update on, you are effectively letting the author's new hooks go live without your review. If you want to look first, turn off auto-update for that marketplace.

## Other things worth knowing

- When a hook blocks or fails during a turn or after `/compact`, and its output is very large, it used to freeze or overflow the context; now text longer than about 50,000 characters is truncated (2.1.332).
- When you enter a worktree under `.claude/worktrees` with EnterWorktree, or resume there, the CLAUDE.md and rules files are mostly no longer sent a second time (2.1.332).
- Windows: on computers with six or more cores, Glob now walks large local folders in parallel; when a search hits its time limit, it lists what it has already found (2.1.332).
- When the desktop app's Code tab connects to the Anthropic API and a gateway address is set alongside your own settings, a `CLAUDE_CODE_AUTO_COMPACT_WINDOW` value below 200K is ignored and `/autocompact` is used instead (2.1.332, so it had no effect while the desktop app bundled 2.1.331). I don't use a gateway, and my configured value is above 200K, so it is unaffected.

This post picks out only the changes that touched my own settings and habits. For the terminal build, 70 candidate items were in scope, and I recorded a disposition for each one in the reconciliation log (which section it went into, or why it does not apply); the desktop log lists only the relevant items and does not count them one by one. Leaving something out of this post does not mean I did not review it.

## Sources

- [Anthropic. (n.d.). Claude Code changelog. GitHub. Retrieved November 25, 2026.](https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md) (Official changelog (terminal build, 2.1.331–2.1.332))
- [Anthropic. (n.d.). Hooks reference. Claude Code Docs. Retrieved November 25, 2026.](https://code.claude.com/docs/en/hooks) (PreSkillShellCommand section)
- [Anthropic. (n.d.). Connect Claude Code to tools via MCP. Claude Code Docs. Retrieved November 25, 2026.](https://code.claude.com/docs/en/mcp) (Skills provided by an MCP server)
- [Anthropic. (n.d.). Extend Claude with skills. Claude Code Docs. Retrieved November 25, 2026.](https://code.claude.com/docs/en/skills) (Frontmatter ignored by MCP skills, and `!` commands they do not run)
- [Anthropic. (n.d.). Claude desktop changelog. Retrieved November 25, 2026.](https://claude.com/docs/cowork/claude-desktop-changelog) (Official changelog (desktop app 7.37095.0))
