Claude Code v2.1.332: skills from MCP servers, a PreSkillShellCommand hook, and freeze fixes#
Published by Alex Sorokoletov
Part of the Claude Code Version Tracker series. | Official Env Vars | Official Changelog
Claude Code 2.1.332, the release after 2.1.331, lets MCP servers publish skills that show as server:skill in the slash menu, adds a PreSkillShellCommand hook that can refuse a skill's inline shell commands as they load, and fixes a long run of freezes and hangs across reads, compaction, hooks and MCP output.[1]
Skills from MCP servers#
An MCP server can now expose skills, in beta.[1] They appear as server:skill in the / menu, while skills from other sources keep their plain names. This adds a second place a skill can come from, alongside the files in your project and configuration directories.
A PreSkillShellCommand hook that can refuse a skill's shell commands#
The new PreSkillShellCommand hook event runs as a skill or command's inline shell commands load, and can refuse them.[1] It joins PreToolUse and PermissionRequest as a hook that returns a decision rather than observing. For a skill, that decision is limited: the hook can block a command, but it cannot pause for approval and it cannot rewrite the command. On 2.1.331 and older, a settings file that names this hook opens a dialog at startup instead.[1]
"Always deliver" for messages held from other sessions#
The prompt for a message held from another session now offers "Always deliver."[1] It has a counterpart in /config under "Messages from your other sessions," with a per-session and an all-sessions form. In a session that runs commands without asking, the setting pauses, and the next held message prompts again; it resumes when the session goes back to asking before it acts.
Freezes and hangs that now end#
A cluster of fixes closes cases where reading or processing input could hang:
| Case | Fix |
|---|---|
| Named pipe reads | Read, @-mentions and compaction no longer hang on a named pipe that nothing writes to, such as a .env mounted by a locked secrets manager; the read fails after 20 seconds. |
| Runaway hook output | A hook that blocks or fails during a turn or after /compact with a very large log no longer overflows context; text over about 50,000 characters is shortened. |
| MCP standard output | A local MCP server flooding its standard output no longer freezes the terminal or stops it answering Ctrl+C. |
| MCP task IDs | Tool calls no longer fail with "malformed task handle" on long task IDs; IDs up to 1,024 characters now work. |
Long @ input | A prompt or piped input holding an @ before a very long unbroken run of characters, such as minified CSS with an embedded font, no longer freezes. |
| Auto-compaction | Turns no longer end in "Prompt is too long" when one more compaction at the context limit could have kept them going. |
Model fallback across third-party providers#
Several fixes keep a session on a working model when Bedrock, Google Cloud's Agent Platform or Foundry refuses the one it asked for, stepping down to the next model in the same family rather than failing.[1]
New environment variable#
| Variable | What It Does |
|---|---|
CLAUDE_CODE_DISABLE_POWERSHELL_LIBRARY_LOAD_GUARD | Turns off a guard in the PowerShell 7 parse that Claude Code runs to check a command against your permission rules. The guard stops the parse when text like [name, path] would make PowerShell load a library file, and Claude Code then says it could not fully check your permission rules. |
A hang becomes a bounded failure#
The fixes that fill most of this release share a shape: an input that had no ceiling now gets one. A named-pipe read stops after 20 seconds, oversized hook output is trimmed at about 50,000 characters, and an MCP task ID is accepted up to 1,024 characters. In an unattended run, the SDK, claude -p, or a cloud session, that turns one of these conditions from an open-ended wait into a bounded failure or a shortened input, so the run ends or continues on its own.
The same release gives a skill two new edges at once. A skill can now arrive from an MCP server, and the PreSkillShellCommand hook can refuse the inline shell commands a skill runs as it loads. The load-time check and the new source land together, so a skill from a server and the gate over its shell commands exist in the same build.
This analysis is conducted for educational and research purposes under fair use principles. All trademarks and software referenced belong to their respective owners.
Sources#
- Claude Code Official Changelog, v2.1.332 release notes
Related Versions#
- Claude Code v2.1.324: the 2.1.325 notes add sandboxed Bash prompts and a /login privacy prompt
- Claude Code v2.1.323: Code Mode, hook heartbeats, background sign-in fixes
- Claude Code v2.1.321: Fable 5.2 default, MCP OAuth secret-leak fix, Bash permission fixes
- Claude Code v2.1.319: background MCP tasks, auto-denied permission prompts
Previous Claude Code analysis: v2.1.331 (November 24, 2026)
All 93 Claude Code analyses: Claude Code Version Tracker · Official Claude Code changelog