Back to Blog

Claude Code 2.1.121: Opus 4.7 finally uses its full 1M window

Alex Kim
7 min read
Claude Code 2.1.121: Opus 4.7 finally uses its full 1M window

If you upgraded to Opus 4.7 and noticed Claude Code was hitting auto-compact faster than expected, you weren't imagining it. Through 2.1.116, Claude Code was computing your context-window usage against a 200,000-token ceiling instead of Opus 4.7's native 1,000,000. /context showed inflated percentages. Auto-compact fired roughly 5x earlier than it should have.

Claude Code 2.1.117 fixed it. And then 2.1.118, 2.1.119, 2.1.120, and 2.1.121 followed in the next six days.

That's five releases and 150+ individual changes since 2.1.116. Here's what actually matters.

The headline: Opus 4.7's 1M window now works as advertised

The bug was quiet but consequential. From the official changelog of 2.1.117:

Fixed Opus 4.7 sessions showing inflated /context percentages and autocompacting too early – Claude Code was computing against a 200K context window instead of Opus 4.7's native 1M.

If you wrote a post about how the 1M window changes everything (we did, yesterday), this fix is what makes the technique actually pay off in practice. Before 2.1.117, you could load a @file:L10-L50 reference, see /context jump to 18%, and think "wait, why is that so high?" Because Claude Code was dividing your usage by 200K instead of 1M. Five times the apparent fill. Five times sooner to hit auto-compact.

Update to 2.1.121 (or any version since 2.1.117) and you'll watch /context finally show numbers that match reality.

Four memory leaks fixed (2.1.121)

If your Claude Code process has been climbing into multi-GB territory after a few hours, this release is for you.

  • Unbounded RSS growth on image-heavy sessions – fixed. Sessions that processed lots of images were accumulating image data in memory without releasing it.
  • /usage leaking up to 2GB on machines with large transcript histories – fixed. Running /usage to check session cost shouldn't double your memory footprint.
  • Long-running tools that don't emit progress events were leaking memory while waiting – fixed.
  • find exhausting open file descriptors on large directory trees was crashing macOS and Linux native builds host-wide. Reduced peak FD usage in 2.1.121.

Add the fix where the Bash tool became permanently unusable when its starting directory got deleted mid-session, and the --resume crash on corrupt transcript lines, and 2.1.121 looks like a stability release on top of the feature work.

claude ultrareview now runs in CI (2.1.120)

/ultrareview was an interactive command. As of 2.1.120, you can run it non-interactively from a script:

claude ultrareview path/to/changes
claude ultrareview --json HEAD~1..HEAD > review.json

It prints findings to stdout, exits 0 on completion, exits 1 on failure. Pair with a GitHub Action or pre-merge hook and you get a multi-agent code review on every PR without anyone running it manually.

This is also the release where Windows users no longer need Git for Windows installed. If Git Bash isn't available, Claude Code falls back to PowerShell as the shell tool.

MCP and hooks got dramatically more programmable

Three changes across 2.1.118 and 2.1.121 expand what hooks and MCP can do:

alwaysLoad for MCP server config (2.1.121). Setting alwaysLoad: true on an MCP server makes all its tools skip tool-search deferral and stay available immediately. The trade-off: tool-search reduces token cost by deferring tools, but for small servers you call constantly, the round-trip overhead isn't worth the savings.

PostToolUse hooks can replace tool output for all tools (2.1.121). Previously this was MCP-only. Now any PostToolUse hook can return hookSpecificOutput.updatedToolOutput and Claude sees the modified version of any tool's result. Useful for redaction, trimming, or post-processing.

Hooks can invoke MCP tools directly (2.1.118). Use type: "mcp_tool" in your hook config to call an MCP tool from a hook without a shell shim. Combined with the previous change, hooks become a much more capable orchestration layer.

The smaller but still notable: claude plugin prune (2.1.121) removes orphaned auto-installed plugin dependencies, and plugin uninstall --prune cascades. If you've been collecting dead plugin deps after experimenting with marketplaces, this cleans them up.

Quality-of-life that compounds

A handful of 2.1.117 changes change the default experience:

  • Default effort raised from medium to high for Pro and Max subscribers on Opus 4.6 and Sonnet 4.6. The model spends more thinking budget per turn by default. Override per-session with /effort.
  • Native builds replace Glob and Grep with embedded bfs and ugrep through the Bash tool – faster searches without a tool round-trip on macOS and Linux. Windows and npm-installed builds unchanged.
  • /resume now offers to summarize stale, large sessions before re-reading them, matching --resume behavior.
  • Forked subagents on external builds via CLAUDE_CODE_FORK_SUBAGENT=1.

And 2.1.119 was the polish release. Forty-five entries in that changelog. The ones to know:

  • /config settings persist to ~/.claude/settings.json properly with override precedence.
  • prUrlTemplate setting points the footer PR badge at custom code-review URLs (handy for self-hosted GitLab, Bitbucket, GHE).
  • --from-pr accepts GitLab, Bitbucket, and GitHub Enterprise URLs, not just github.com.
  • PostToolUse hooks include duration_ms in the input – you can finally measure how long tools actually took.
  • MCP servers reconfigure in parallel instead of serially during subagent spawn.

Vim, themes, and /usage

2.1.118 was the "small but appreciated" release:

  • Vim visual mode and visual-line mode (v and V) with selection and operators
  • /cost and /stats merged into /usage (the old commands still work as typing shortcuts to the right tab)
  • Custom named themes via /theme or hand-edited JSON in ~/.claude/themes/. Plugins can ship themes via a themes/ directory.
  • DISABLE_UPDATES env var to block all update paths including manual claude update (stricter than DISABLE_AUTOUPDATER)

If you've been wishing for a vim visual mode, it's there now.

Five releases at a glance

VersionDateThemeStandouts
2.1.121Apr 27Stability + MCP polish4 memory leaks fixed, alwaysLoad MCP option, PostToolUse output replacement for all tools, claude plugin prune, /skills filter
2.1.120Apr 25CI + Windowsclaude ultrareview non-interactive, Windows works without Git Bash, ${CLAUDE_EFFORT} in skills
2.1.119Apr 24Polish (45 changes)/config persistence, prUrlTemplate, GitLab/Bitbucket --from-pr, hook duration_ms, parallel MCP reconfigure
2.1.118Apr 23UXVim visual mode, /cost+/stats/usage, named themes, hooks call MCP directly
2.1.117Apr 22The big oneOpus 4.7 1M context fix, default effort high, bfs/ugrep replace Glob/Grep on native builds

The 2.1.117 release alone has more substance than most weekly drops. The Opus 4.7 fix is the single most-cited reason to update if you're on the new model.

Should you update?

Yes. Three checks first:

  1. If you have custom managed-settings or proxy config, retest after upgrading. 2.1.119 and 2.1.121 changed several edge-case behaviors – NO_PROXY enforcement, DISABLE_TELEMETRY propagation, telemetry attributes, OAuth token-refresh under contention. None of these break the happy path, but they may affect your specific setup.
  2. If you script around /cost or /stats output, both still work as typing shortcuts to /usage, but the structured output changed. Re-validate any parsing.
  3. If you have Plugin marketplaces with broken entries, 2.1.120 changed how malformed marketplace.json entries are handled (the entry is shown but installing prompts you to update). Mostly harmless, but worth noting.

For everyone else, claude --version to confirm 2.1.121 and move on.

The pattern is clear: Opus 4.7 dropped 10 days ago, and Anthropic has shipped almost daily since to harden the runtime around it. That's the right priority for a model migration.

What's next

If you're getting Claude Code working in production and want the systematic version, the 10-episode "Production Claude Code" series just kicked off. Episode 1 (yesterday) covered the 1M context window. Episode 2 covers steering with modes – plan mode, auto mode, and /less-permission-prompts.

Until then: update, watch /context actually behave correctly, and enjoy a session that doesn't leak 2GB of RAM.

#claude-code#anthropic#Release Notes#AI Development#Claude Opus 4.7#Context Window
Live Workshop

Production-Grade Claude Code in 5 Days

Set up Claude Code the right way – from someone who ships with it daily.

$297$497Early BirdNext cohort: June 2026 Cohort

100% satisfaction guarantee. Full refund if you're not happy after the first session.