Claude Code 2.1.117: Subagents, MCP Fixes, Opus 4.7 Context

Claude Code 2.1.117 brings subagent support for external builds, fixes critical Opus 4.7 context window miscalculation, patches OAuth token refresh, and tightens MCP/plugin marketplace enforcement. 13 new features, 14 bug fixes.

Claude Code 2.1.117: Subagents, MCP Fixes, Opus 4.7 Context

TL;DR

  • Forked subagents now work on external builds with a single env var
  • MCP servers load properly for agent sessions; plugin marketplace enforcement tightened
  • Fixed Opus 4.7 context window miscalculation causing premature autocompact
  • OAuth token refresh, WebFetch hangs, and idle re-render loop all patched

New

  • Forked subagents on external builds — set CLAUDE_CODE_FORK_SUBAGENT=1 to enable subagent forking outside the main Claude Code environment
  • Agent frontmatter MCP loadingmcpServers in agent frontmatter now load for main-thread sessions via --agent
  • Model selection persistence/model selections now stick across restarts even when your project pins a different model; startup header shows the source
  • /resume summarization — large, stale sessions now get a summary offer before re-reading, matching --resume behavior
  • Concurrent MCP connects — faster startup when both local and claude.ai MCP servers are configured
  • Plugin dependency auto-installplugin install on already-installed plugins now installs missing dependencies instead of stopping
  • Marketplace enforcementblockedMarketplaces and strictKnownMarketplaces now enforced on install, update, refresh, and autoupdate
  • Advisor Tool improvements — experimental label, learn-more link, startup notification; fixed "result content could not be processed" errors
  • Retention sweep expansioncleanupPeriodDays now covers ~/.claude/tasks/, ~/.claude/shell-snapshots/, and ~/.claude/backups/
  • OpenTelemetry enhancementsuser_prompt events include command_name and command_source; cost/token/API events include effort attribute when supported
  • Native search tools — macOS and Linux now use embedded bfs and ugrep via Bash tool instead of separate Glob/Grep tools (faster, no extra round-trip)
  • Windows subprocess optimization — cached where.exe lookups per process for faster launches
  • Pro/Max effort default — Opus 4.6 and Sonnet 4.6 now default to high effort instead of medium

Fixed

  • Plain-CLI OAuth sessions no longer die with "Please run /login" when access token expires mid-session — token now refreshes reactively on 401
  • WebFetch hanging on very large HTML pages — input now truncated before HTML-to-markdown conversion
  • Proxy returning HTTP 204 No Content now surfaces a clear error instead of crashing with TypeError
  • /login now works when launched with CLAUDE_CODE_OAUTH_TOKEN env var and that token expires
  • Prompt-input undo (Ctrl+_) no longer does nothing immediately after typing and skips states correctly
  • NO_PROXY now respected for remote API requests when running under Bun
  • Rare spurious escape/return triggers on slow connections fixed
  • SDK reload_plugins no longer reconnects all user MCP servers serially
  • Bedrock application-inference-profile requests with Opus 4.7 (thinking disabled) no longer fail with 400
  • MCP elicitation/create requests no longer auto-cancel in print/SDK mode when server finishes connecting mid-turn
  • Subagents running a different model no longer incorrectly flag file reads with malware warning
  • Idle re-render loop with background tasks fixed, reducing memory growth on Linux
  • VSCode "Manage Plugins" panel no longer breaks with multiple large marketplaces configured
  • Opus 4.7 context window fix — sessions no longer show inflated /context percentages or autocompact early; Claude Code now correctly uses Opus 4.7's native 1M window instead of 200K

Update: npm install -g @anthropic-ai/claude-code@latest

Source: Claude Code