← Back to the briefs
Coding

Anthropic adds MCP server skills and inline shell command hooks in Claude Code v2.1.332

Anthropic released Claude Code v2.1.332, introducing beta support for skills provided by Model Context Protocol servers alongside a new hook event to intercept inline shell commands.

MCP Server Skills and Shell Hooks

Anthropic updated Claude Code to version 2.1.332, adding beta support for skills hosted on Model Context Protocol servers. These capabilities show up in the slash command menu formatted under server and skill names, leaving other skills with their standard labels.

The release also introduces the PreSkillShellCommand hook event. This hook enables environments to evaluate and reject inline shell commands embedded within a command or skill during the loading process.

Runtime Stability and Tool Handling

To prevent hangs and context overflow during execution, large hook logs exceeding roughly 50,000 characters are now shortened. In addition, the tool search mechanism inside Code Mode now preserves full MCP tool descriptions where possible to prevent flawed calls caused by truncated text, while task handles accept identifiers extending up to 1,024 characters.

The update resolves a bug where subagents operating in Code Mode failed with stalled alerts when scripts ran past ten minutes. It also addresses freezes when matching permission rules or hook conditions with multiple wildcards against lengthy terminal commands, and stops unbounded hangs on unwritten named pipes by failing after twenty seconds.

Deployment Boundaries and Worktree Safety

For enterprise deployments, self-hosted runner OAuth tokens now allow an additional oat02- prefix pattern alongside existing tokens. Workflows moving to Sonnet 5 or Sonnet 5.5 on platforms such as Bedrock Mantle, Google Cloud Agent Platform, and Foundry will launch in auto mode by default unless users set an explicit flag to disable it. Within Code Mode, Claude now prompts operators for confirmation before discarding worktree modifications.

Our assessment

Teams integrating external MCP servers should audit how tool descriptions map into the slash command menu to avoid namespace collisions. Administrators enforcing strict command execution policies should consider deploying the new PreSkillShellCommand hook to block unauthorized inline shell scripts before execution begins. Furthermore, infrastructure operators using token filtering or log scrubbers must verify whether their pattern rules handle the expanded token prefix format.

Source: Anthropic original publication.

Original source

Read the original material

Anthropic (opens in a new tab)

The article date belongs to Agentic Horizon. The source publication date is listed separately. Vendor claims remain attributed; we have not independently tested the reported capability.

Search the publication

Find a story by title, topic, or keyword.

Press Escape to close

Ask HorizonYour site guide
Your guide to the publication

Ask Horizon.

Ask a question about the publication.

Privacy