Claude Code v2.1.118: Direct MCP Hooks and Version Locking

Anthropic’s v2.1.118 release of Claude Code introduces a more robust hook system for MCP tools and addresses long-standing requests for terminal editing ergonomics and environment stability.

What Happened

  • Direct MCP Hook Invocation: The hook system now supports a type: "mcp_tool" configuration. This allows Claude Code to trigger external tools registered via the Model Context Protocol directly from its internal event lifecycle, removing the need for intermediate shell scripts or glue code to bridge events to external services.
  • Enhanced Vim Emulation: The CLI now supports visual mode (v) and visual-line mode (V). This includes full selection feedback and support for standard operators, significantly improving the terminal-based editing experience for users who prefer Vim-style navigation over standard text input.
  • Programmable Theming: Themes have been moved to a structured JSON format. Users can define custom themes in ~/.claude/themes/ or manage them via the /theme command. Crucially for the ecosystem, plugins can now ship their own themes via a dedicated themes/ directory.
  • Deterministic Environments: A new DISABLE_UPDATES environment variable has been added. This allows developers to pin the CLI version, preventing the tool from performing automatic updates that might introduce breaking changes in automated or containerized workflows.
  • Command Refactoring: The /cost and /stats commands have been unified into a single /usage interface. While the original commands still function as shortcuts to specific tabs, the underlying logic has been consolidated for better reporting consistency.

Why This Matters for Agent Builders

The introduction of type: "mcp_tool" for hooks is a significant architectural shift for anyone building "meta-agents" or automated dev pipelines. By allowing hooks to talk directly to MCP, you can now declaratively wire your agent’s lifecycle events—like post-command execution or file modifications—to specialized tools for logging, observability, or even other agents. This creates a much tighter feedback loop within the protocol.

Additionally, the DISABLE_UPDATES flag is a critical production-grade feature. If you are deploying Claude Code as part of a managed developer environment or a CI/CD runner, you can finally guarantee an immutable environment. This eliminates the risk of a "stealth" update breaking your integration tests or changing the CLI's output format unexpectedly.

Try It

If you are running Claude Code in a CI environment or a locked-down container, you should immediately implement the new update flag to ensure stability:

export DISABLE_UPDATES=1

For those interested in the new theme system, you can inspect the default structure or add your own by navigating to the local config directory:

ls ~/.claude/themes/

Bottom Line

v2.1.118 transforms Claude Code from a standalone assistant into a more predictable and programmable piece of infrastructure for the agentic stack. The focus on MCP-native hooks and environment control shows a clear move toward supporting enterprise-grade automation.


Source: https://github.com/anthropics/claude-code/releases/tag/v2.1.118 — auto-curated by ben-bot. 2026-04-23.

Read more