Build This Now
Build This Now
Was ist der Claude Code?Claude Code installierenClaude Code Native InstallerDein erstes Claude Code-Projekt
Claude Code v2.1.122 Release NotesClaude Code Best PracticesClaude Opus 4.7 Best PracticesClaude Code auf einem VPSGit-IntegrationClaude Code ReviewClaude Code WorktreesClaude Code Remote ControlClaude Code ChannelsGeplante Aufgaben mit Claude CodeClaude Code BerechtigungenClaude Code Auto-ModusFeedback-LoopsTodo-WorkflowsClaude Code TasksProjekt-TemplatesClaude Code Preise und Token-NutzungClaude Code Ultra Review
speedy_devvkoen_salo
Blog/Handbook/Workflow/Claude Code v2.1.122 Release Notes

Claude Code v2.1.122 Release Notes

alwaysLoad in MCP config, PostToolUse hooks for all tools, PR URL session lookup, plugin pruning, and multi-GB memory leak fixes.

Hören Sie auf zu konfigurieren. Fangen Sie an zu bauen.

SaaS-Builder-Vorlagen mit KI-Orchestrierung.

Published Apr 29, 20268 min readHandbook hubWorkflow index

Claude Code v2.1.121 and v2.1.122 both landed on April 28, 2026 — eight features and eighteen fixes spanning the CLI, Desktop app, and agent hook system.

Problem: PostToolUse hooks could only intercept MCP tool output. Bash results, file reads, web fetches — the model saw all of those raw, with no way for a hook to touch them. MCP servers loaded lazily by default, so tools from a freshly-connected server sat behind a ToolSearch call instead of appearing immediately. And finding the session that opened a specific PR meant scrolling the /resume list by hand.

Quick Win: Add alwaysLoad to any MCP server in your config and every tool from that server is available at session start, no ToolSearch step required:

{
  "mcpServers": {
    "myserver": {
      "command": "npx my-mcp-server",
      "alwaysLoad": true
    }
  }
}

This is the fastest visible change from these releases. Tools appear instantly. For servers you open in every session, that removes one quiet source of friction. Read Hooks Guide for the full hook system, and MCP Tool Hooks for how PostToolUse behaves across tool types.

What v2.1.121 and v2.1.122 Changed

Two patch releases shipped the same evening. v2.1.121 at 00:31 UTC carried most of the new capabilities: alwaysLoad, the PostToolUse expansion, plugin pruning, /skills search, and the memory leak patches. v2.1.122 at 22:05 UTC followed with Bedrock service tier selection, the PR URL /resume improvement, and a second batch of bug fixes.

The features that matter most for agent orchestration and production deployments are in v2.1.121.

PostToolUse Hooks Now Cover All Tools

Before this release, PostToolUse hooks could replace tool output for MCP tools only. You could write a hook that intercepted a custom MCP call and rewrote the result before the model saw it. That same trick did not work on Bash, Read, Write, WebFetch, or any built-in tool type.

Now, output replacement works across every tool type. The mechanism is hookSpecificOutput.updatedToolOutput returned from your hook script. Your hook receives the tool name, the original result, and the session context. Return updatedToolOutput in the JSON response and Claude sees that instead of the raw tool output:

{
  "hookSpecificOutput": {
    "updatedToolOutput": "your replacement output here"
  }
}

The hook fires after every matching tool completes. It does not block execution. If your hook returns nothing, or returns without updatedToolOutput, the original result passes through unchanged. Your existing MCP PostToolUse hooks work exactly as before.

What "All Tools" Includes

Tool categoryPostToolUse before v2.1.121PostToolUse after v2.1.121
MCP toolsOutput replacement supportedOutput replacement supported
BashInspect onlyOutput replacement supported
Read / Write / EditInspect onlyOutput replacement supported
WebFetch / WebSearchInspect onlyOutput replacement supported
Agent (subagent results)Inspect onlyOutput replacement supported

This matters most for agent workflows where you want a processing layer between tools and the model. A PostToolUse hook on Bash can strip noise from command output or annotate log lines before the model parses them. A hook on WebFetch can trim a fetched page down to the relevant sections before it hits the context window. A hook on Read can normalize file content into a format your agent expects.

Before, those patterns required wrapping built-in tools behind MCP proxies to get hook access. That workaround is no longer necessary.

alwaysLoad: MCP Tools Without Deferral

Claude Code defers tool loading for MCP servers by default. Tools register lazily and surface through ToolSearch when Claude identifies a need for them. For servers with large tool counts, this keeps the initial context lean. For servers you reach for in every session, the deferral is just overhead — an extra round trip before the first tool call goes through.

The alwaysLoad flag disables deferral for a specific server. All tools from that server load at session start. Set it in your Claude Code settings wherever MCP servers are configured:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx @modelcontextprotocol/server-filesystem",
      "args": ["/Users/you/projects"],
      "alwaysLoad": true
    },
    "large-integration": {
      "command": "npx my-big-server",
      "alwaysLoad": false
    }
  }
}

The flag is per-server. Mix freely: set it on your core tools server, leave it off on a rarely-used integration server with 50+ tools. Servers with under 15-20 tools are good candidates for alwaysLoad. Larger servers are better left on lazy loading unless you know you need immediate access to all of them.

Note: alwaysLoad also addresses a related fix in v2.1.122. ToolSearch was previously missing MCP tools that connected after session start in nonblocking mode. Both issues now have direct solutions: alwaysLoad for servers you want guaranteed upfront, and the ToolSearch fix for servers that connect late.

/resume Now Accepts PR URLs

Finding the session that opened a specific pull request meant scanning the /resume list by timestamp or relying on whatever session name you happened to use. That friction is gone.

Paste any PR URL directly into the /resume search box. Claude Code locates the session that created that PR and surfaces it. Four platforms work: GitHub, GitHub Enterprise, GitLab, and Bitbucket.

The lookup works on the PR URL structure embedded in session history, not on metadata you had to configure. Open /resume, paste the URL, and the session appears. No manual scanning.

This pairs naturally with scheduled tasks or autonomous agent runs that opened PRs without you watching. If something in a PR needs review, you now have a direct path back to the session that built it.

Plugin Pruning

Claude Code auto-installs plugin dependencies when you install a plugin. Those dependencies don't clean up automatically when you remove the plugin that required them. After several installs and removals, ~/.claude/plugins/ accumulates orphaned packages.

Two new commands handle the cleanup:

# Remove all orphaned auto-installed plugin dependencies
claude plugin prune

# Uninstall a plugin and cascade-remove its dependencies
claude plugin uninstall my-plugin --prune

claude plugin prune scans for packages that were auto-installed as dependencies and have no remaining dependents, then removes them. --prune appended to plugin uninstall does the same cleanup in one step at uninstall time.

If you have installed and removed several plugins over the lifetime of your setup, run claude plugin prune once. You'll likely reclaim meaningful disk space.

/skills Gets a Search Box

The /skills panel now has a type-to-filter input. Start typing and the list filters to matching skill names in real time.

This addresses a problem that compounds with skill count. A setup with 40 or 50 skills installed makes scrolling to find a specific one slow, especially on first use in a session. Typing two or three characters narrows the list immediately.

The filter matches on skill names. It doesn't search descriptions or trigger phrases, just the name visible in the panel list.

Memory Leak Fixes

Three separate leaks were patched in v2.1.121. All three could produce multi-gigabyte RSS growth in long-running sessions.

LeakSymptomFix
Image processingUnbounded RSS growth when processing many images across a sessionMemory released after each image is processed
/usage with large transcript histories~2GB memory hit on machines with many old sessionsTranscript data streamed, not held in memory
Long-running tool progress eventsTools failing to clear progress state caused memory to accumulateProgress events cleared correctly when tools complete

Production users running Claude Code in always-on setups, scheduled tasks, or CI environments are most likely to have hit these. If your Claude Code process was growing to 4-8GB RSS over hours, these are the fixes that matter. Update to v2.1.121 or later and restart the Claude Code process once to reclaim any RSS that built up before the patch.

Other Fixes Worth Knowing

FixWhat it does
ANTHROPIC_BEDROCK_SERVICE_TIERNew env var selects Bedrock service tier: default, flex, or priority
Malformed hooks in settings.jsonA bad hooks entry no longer disables the entire hooks configuration
/branch forks from rewound sessionsFixed "tool_use ids without tool_result blocks" errors on branched sessions
Images sent to newer modelsResize limit corrected to 2000px max (was 2576px)
Remote control idle redrawsFixed double redraws per second that could flood tmux control pipes and pause the terminal
!exit / !quit in bash modeThese now run as shell commands instead of terminating the CLI
Vertex AI structured outputFixed invalid_request_error: output_config: Extra inputs are not permitted
ToolSearch in nonblocking modeMCP tools that connect after session start now appear in ToolSearch results

The malformed hooks fix deserves attention if you manage settings.json by hand or generate it programmatically. Previously, a single bad entry in the hooks array disabled all hooks silently. Now Claude Code skips the bad entry and runs the rest. If you've ever wondered why a hook stopped firing after a config edit, this was likely the cause.

Frequently Asked Questions

Does PostToolUse output replacement work for all hook configurations? Yes. Any PostToolUse hook entry in settings.json can return hookSpecificOutput.updatedToolOutput to replace what Claude receives from that tool. Return nothing and the original output passes through. The hook target tool type no longer matters.

Does alwaysLoad affect startup time? It can, for servers with many tools. All tools load at session start instead of on demand, so a server with 50 tools adds that registration overhead upfront. For servers with under 15-20 tools, the difference is negligible in practice.

What does claude plugin prune actually delete? It removes packages under ~/.claude/plugins/ that were auto-installed as dependencies and have no remaining plugins depending on them. It does not touch plugins you installed directly. Running it is safe — it only targets orphaned auto-installed packages.

Does the PR URL lookup in /resume require special setup? No setup needed. Paste a PR URL from GitHub, GitHub Enterprise, GitLab, or Bitbucket into the /resume search box. The match uses the PR URL stored in session history from when the session opened that PR.

Do the memory leak fixes require any config change? No config change. Update to v2.1.121 or later. If you have a long-running Claude Code process that accumulated RSS before the update, restart it once to reclaim the memory.

Were v2.1.121 and v2.1.122 released together intentionally? They shipped the same day but as separate versions. v2.1.121 carried the feature work. v2.1.122 followed the same day with Bedrock additions and the remaining bug fixes. The two releases form a natural pair and are covered together here.

What This Means for Agent Workflows

PostToolUse output replacement on all tools changes what's possible in agent orchestration. Hooks are no longer limited to the MCP surface — every tool call is a potential processing point. Annotate Bash output before the model reads it. Strip irrelevant sections from web fetches. Normalize file content into the format your agent expects. The hook layer becomes a true pipeline between tools and model.

Pair that with alwaysLoad on your core MCP servers and agent sessions start with full tool access — no ToolSearch detour on the first call. The combination trims latency from the opening moves of any agentic run.

The memory leak fixes make long sessions safer to operate. Multi-hour scheduled tasks that process images or accumulate large transcripts were candidates for RSS bloat before these patches. That risk is addressed.

Update to v2.1.122. Audit your PostToolUse hooks for any tool type you've been wanting to intercept. Add alwaysLoad to the MCP servers you open in every session.

Sources

  • Claude Code v2.1.122 release notes — GitHub
  • Claude Code changelog — code.claude.com

Continue in Workflow

  • Claude Code Best Practices
    Fünf Gewohnheiten trennen Entwickler, die mit Claude Code liefern: PRDs, modulare CLAUDE.md-Regeln, Custom-Slash-Commands, /clear-Resets und eine System-Evolutions-Denkweise.
  • Claude Code Auto-Modus
    Ein zweites Sonnet-Modell prüft jeden Claude Code-Tool-Aufruf, bevor er ausgeführt wird. Was der Auto-Modus blockiert, was er erlaubt, und die Erlaubnisregeln, die er in deine Einstellungen schreibt.
  • Claude Code Channels
    Claude Code per Plugin-MCP-Server in Telegram, Discord oder iMessage einbinden. Setup-Anleitungen und die asynchronen Mobil-Workflows, die das Einrichten lohnenswert machen.
  • Claude Opus 4.7 Best Practices
    Opus 4.7 optimal in Claude Code einsetzen: erster Turn, Effort-Einstellungen, adaptives Thinking, Tool-Prompting, Subagenten, Session-Resets und Token-Kontrolle.
  • Claude Code Review
    Parallele Claude-Agenten jagen Bugs in jedem PR, prüfen Ergebnisse gegenseitig und posten einen einzigen aussagekräftigen Kommentar. Was es findet, was es kostet, wie du es aktivierst.
  • Feedback-Loops
    Gib Claude Code einen einzigen Prompt, der Code schreibt, deinen Test- oder Dev-Befehl ausführt, die Ausgabe liest, alles Kaputte behebt und schleift, bis die Suite grün ist.

More from Handbook

  • Grundlagen für Agenten
    Fünf Möglichkeiten, spezialisierte Agenten in Claude Code zu erstellen: Aufgaben-Unteragenten, .claude/agents YAML, benutzerdefinierte Slash-Befehle, CLAUDE.md Personas und perspektivische Aufforderungen.
  • Agent-Harness-Engineering
    Der Harness ist jede Schicht rund um deinen KI-Agenten, außer dem Modell selbst. Lern die fünf Steuerungshebel, das Constraint-Paradoxon und warum das Harness-Design die Performance des Agenten mehr bestimmt als das Modell.
  • Agenten-Muster
    Orchestrator, Fan-out, Validierungskette, Spezialistenrouting, Progressive Verfeinerung und Watchdog. Sechs Orchestrierungsformen, um Claude Code Sub-Agenten zu verdrahten.
  • Agent Teams Best Practices
    Bewährte Muster für Claude Code Agent Teams. Kontextreiche Spawn-Prompts, richtig bemessene Aufgaben, Datei-Eigentümerschaft, Delegate-Modus und Fixes für v2.1.33-v2.1.45.

Hören Sie auf zu konfigurieren. Fangen Sie an zu bauen.

SaaS-Builder-Vorlagen mit KI-Orchestrierung.

Auto Memory in Claude Code

Auto Memory lässt Claude Code laufende Projekt-Notizen speichern. Wo die Dateien liegen, was geschrieben wird, wie /memory es umschaltet und wann du es statt CLAUDE.md nutzen solltest.

Claude Code Best Practices

Fünf Gewohnheiten trennen Entwickler, die mit Claude Code liefern: PRDs, modulare CLAUDE.md-Regeln, Custom-Slash-Commands, /clear-Resets und eine System-Evolutions-Denkweise.

On this page

What v2.1.121 and v2.1.122 Changed
PostToolUse Hooks Now Cover All Tools
What "All Tools" Includes
alwaysLoad: MCP Tools Without Deferral
/resume Now Accepts PR URLs
Plugin Pruning
/skills Gets a Search Box
Memory Leak Fixes
Other Fixes Worth Knowing
Frequently Asked Questions
What This Means for Agent Workflows
Sources

Hören Sie auf zu konfigurieren. Fangen Sie an zu bauen.

SaaS-Builder-Vorlagen mit KI-Orchestrierung.