Build This Now
Build This Now
O que é o Código Claude?Instalar o Claude CodeInstalador Nativo do Claude CodeO Teu Primeiro Projeto com Claude Code
Next.js DevTools MCPNext.js Agent SetupSubscription BillingMulti-Tenant SaaSAI Chat FeatureRate LimitingStripe WebhooksSemantic SearchRealtime UpdatesDrip Email Sequencesv2.1.122 Release NotesClaude Code Dynamic Workflows: Como Orquestrar 1.000 Subagentes Num Codebase RealMelhores Práticas do Claude CodeBoas Práticas para o Claude Opus 4.7Claude Code num VPSIntegração GitRevisão de Código com ClaudeWorktrees no Claude CodeControle Remoto do Claude CodeChannels do Claude CodeChannels, Routines, Teleport, DispatchTarefas Agendadas no Claude CodePermissões do Claude CodeModo Auto do Claude CodeAdicionar Pagamentos Stripe Com o Claude CodeFeedback LoopsFluxos de Trabalho com TodosTarefas no Claude CodeTemplates de ProjetoPreços e Consumo de Tokens no Claude CodePreços do Claude Code: O Que Vais Mesmo PagarClaude Code Ultra ReviewConstruir Uma App Next.js Com o Claude CodeSupabase DatabaseVercel DeepsecTest-Driven DevelopmentComo Construir um MVP de SaaS Com o Claude CodeAdicionar Autenticação Com o Claude Code (Supabase Auth)Adicionar Email Transacional Com o Claude Code (Resend + React Email)Construir Uma API Type-Safe Com o Claude Code (oRPC + Zod)File UploadsBackground Jobs (Inngest)Admin DashboardFull-Text SearchClaude Agent SDKKiro Migration GuideClaude Research AgentLeave Grok BuildRoute Subagent ModelsClaude Monorepo SetupCI Repair AgentVisual Regression TestsAgent Cost DashboardCursor Migration GuideComércio Agêntico: Como Construir uma App Que Agentes de IA Podem Pagar1M ContextUser API KeysAudit LogsCSV Import PipelineDatabase MigrationsProduction Error TrackingFeature FlagsGitHub ActionsHeadless ModeMax Plan vs APICaching and RevalidationIn-App NotificationsOutbound WebhooksPrompt CachingRoles & PermissionsMarketplace PaymentsUsage-Based BillingQuanto Custa Construir um SaaS com Claude Code em 2026Parallel AI AgentsCoding Agent Injection
speedy_devvkoen_salo
Blog/Handbook/Workflow/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.

Quer o framework por trás destes projetos?

Obtenha o sistema Claude Code que usamos para planejar, construir, testar e lançar software em produção.

Veja o que construímos para empresas →
speedy_devvkoen_salo
speedy_devvWritten by speedy_devvPublished 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

  • Comércio Agêntico: Como Construir uma App Que Agentes de IA Podem Pagar
    Um guia em português simples sobre comércio agêntico em 2026: o que fazem o x402, o ACP e o Machine Payments Protocol, mais um passo a passo de fim de semana para lançar uma API paga que agentes de IA podem comprar.
  • Melhores Práticas do Claude Code
    Cinco hábitos separam os engenheiros que entregam com Claude Code: PRDs, regras modulares em CLAUDE.md, slash commands personalizados, resets com /clear e uma mentalidade de evolução do sistema.
  • Modo Auto do Claude Code
    Um segundo modelo Sonnet revê cada chamada de ferramenta do Claude Code antes de ser executada. O que o modo auto bloqueia, o que permite e as regras de permissão que cria nas tuas definições.
  • Channels, Routines, Teleport, Dispatch
    As quatro funcionalidades de Claude Code que a Anthropic lançou em março e abril de 2026 e que transformam a CLI numa camada de coordenação orientada a eventos entre telemóvel, web e desktop.
  • Claude Code 1M Context in Practice: When Bigger Isn't Better
    The 1M-token context window is GA at flat pricing, but bigger isn't always better. A decision framework, token-cost math, and when to use /compact, subagents, and dynamic workflows instead.
  • How to Build an Admin Dashboard With Claude Code
    Ship an internal admin panel with Claude Code: role-gated routes, a searchable users and orders table with pagination, impersonation-safe RLS, and metrics tiles pulled through a type-safe API.

More from Handbook

  • Técnicas de Pensamento Profundo
    Frases de gatilho como think harder, ultrathink e think step by step empurram o Claude Code para raciocínio expandido e mais computação em tempo de inferência, no mesmo modelo.
  • Padrões de Eficiência
    Frameworks de permutação transformam 8 a 12 builds manuais numa template CLAUDE.md que o Claude Code usa para gerar as variações 11, 12 e 13 a pedido. Capturas uma vez.
  • Modo Fast do Claude Code
    O modo fast encaminha os teus pedidos ao Opus 4.6 por uma via de serviço prioritária no Claude Code. Mesmo modelo, mesmo teto de qualidade, respostas 2.5x mais rápidas a uma taxa de tokens mais elevada.
  • Otimização da velocidade
    A seleção do modelo, o tamanho do contexto e a especificidade do pedido são as três alavancas que decidem a rapidez com que o Código Claude responde. /modelo de haiku, /compacto, e /claro coberto.

Quer o framework por trás destes projetos?

Obtenha o sistema Claude Code que usamos para planejar, construir, testar e lançar software em produção.

Veja o que construímos para empresas →
speedy_devvkoen_salo

Drip Email Sequences

Wire a multi-step lifecycle drip as a durable Inngest step function that sleeps between sends, cancels when the user converts, and delivers every email through Resend.

Claude Code Dynamic Workflows: Como Orquestrar 1.000 Subagentes Num Codebase Real

Uma análise técnica de como os dynamic workflows do Claude Code usam scripts de orquestração em JavaScript para coordenar até 1.000 subagentes em paralelo, fora da janela de contexto do modelo.

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

Quer o framework por trás destes projetos?

Obtenha o sistema Claude Code que usamos para planejar, construir, testar e lançar software em produção.

Veja o que construímos para empresas →