Build This Now
Build This Now
Qu'est-ce que le code Claude ?Installer Claude CodeL'installateur natif de Claude CodeTon premier projet Claude Code
Claude Code v2.1.122 Release NotesBonnes pratiques Claude CodeMeilleures pratiques pour Claude Opus 4.7Claude Code sur un VPSIntégration GitRevue de code avec Claude CodeLes Worktrees avec Claude CodeClaude Code à distanceClaude Code ChannelsTâches planifiées avec Claude CodePermissions Claude CodeLe mode auto de Claude CodeFeedback LoopsWorkflows TodoGestion des tâches dans Claude CodeTemplates de projetTarification et utilisation des tokens Claude CodeClaude 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.

Arrêtez de configurer. Commencez à construire.

Templates SaaS avec orchestration IA.

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

  • Bonnes pratiques Claude Code
    Cinq habitudes séparent les ingénieurs qui livrent avec Claude Code : les PRDs, les règles CLAUDE.md modulaires, les slash commands personnalisés, les resets /clear, et un état d'esprit d'évolution du système.
  • Le mode auto de Claude Code
    Un second modèle Sonnet examine chaque appel d'outil Claude Code avant qu'il s'exécute. Ce que le mode auto bloque, ce qu'il autorise, et les règles d'autorisation qu'il place dans tes paramètres.
  • Claude Code Channels
    Connecte Claude Code à Telegram, Discord ou iMessage avec des serveurs MCP plugin. Walkthroughs de setup et workflows mobiles async qui valent la peine d'être configurés.
  • Meilleures pratiques pour Claude Opus 4.7
    Utilise Claude Opus 4.7 efficacement dans Claude Code : premiers tours, réglages d'effort, pensée adaptative, prompts d'outils, sous-agents, gestion de session et contrôle des tokens.
  • Revue de code avec Claude Code
    Des agents Claude parallèles traquent les bugs sur chaque PR, croisent leurs résultats, et publient un seul commentaire à fort signal. Ce qu'ils trouvent, ce que ça coûte, comment l'activer.
  • Feedback Loops
    Donne à Claude Code un seul prompt qui écrit du code, lance ta commande de test ou de dev, lit la sortie, corrige ce qui casse, et boucle jusqu'à ce que la suite soit au vert.

More from Handbook

  • Principes de base de l'agent
    Cinq façons de construire des agents spécialisés dans le code Claude : Sous-agents de tâches, .claude/agents YAML, commandes slash personnalisées, personas CLAUDE.md, et invites de perspective.
  • L'ingénierie du harness agent
    Le harness, c'est toutes les couches autour de ton agent IA sauf le modèle lui-même. Découvre les cinq leviers de contrôle, le paradoxe des contraintes, et pourquoi le design du harness détermine les performances de l'agent bien plus que le modèle.
  • Patterns d'agents
    Orchestrateur, fan-out, chaîne de validation, routage par spécialiste, raffinement progressif, et watchdog. Six formes d'orchestration pour câbler des sub-agents Claude Code.
  • Meilleures pratiques des équipes d'agents
    Patterns éprouvés pour les équipes d'agents Claude Code. Prompts de création riches en contexte, tâches bien calibrées, propriété des fichiers, mode délégué, et correctifs v2.1.33-v2.1.45.

Arrêtez de configurer. Commencez à construire.

Templates SaaS avec orchestration IA.

Auto Memory dans Claude Code

Auto memory permet à Claude Code de garder des notes de projet en continu. Où se trouvent les fichiers, ce qui est écrit, comment /memory le bascule, et quand le choisir plutôt que CLAUDE.md.

Bonnes pratiques Claude Code

Cinq habitudes séparent les ingénieurs qui livrent avec Claude Code : les PRDs, les règles CLAUDE.md modulaires, les slash commands personnalisés, les resets /clear, et un état d'esprit d'évolution du système.

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

Arrêtez de configurer. Commencez à construire.

Templates SaaS avec orchestration IA.