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.
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=1to enable subagent forking outside the main Claude Code environment - Agent frontmatter MCP loading —
mcpServersin agent frontmatter now load for main-thread sessions via--agent - Model selection persistence —
/modelselections 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
--resumebehavior - Concurrent MCP connects — faster startup when both local and claude.ai MCP servers are configured
- Plugin dependency auto-install —
plugin installon already-installed plugins now installs missing dependencies instead of stopping - Marketplace enforcement —
blockedMarketplacesandstrictKnownMarketplacesnow 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 expansion —
cleanupPeriodDaysnow covers~/.claude/tasks/,~/.claude/shell-snapshots/, and~/.claude/backups/ - OpenTelemetry enhancements —
user_promptevents includecommand_nameandcommand_source; cost/token/API events includeeffortattribute when supported - Native search tools — macOS and Linux now use embedded
bfsandugrepvia Bash tool instead of separate Glob/Grep tools (faster, no extra round-trip) - Windows subprocess optimization — cached
where.exelookups per process for faster launches - Pro/Max effort default — Opus 4.6 and Sonnet 4.6 now default to
higheffort instead ofmedium
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 /loginnow works when launched withCLAUDE_CODE_OAUTH_TOKENenv var and that token expires- Prompt-input undo (
Ctrl+_) no longer does nothing immediately after typing and skips states correctly NO_PROXYnow respected for remote API requests when running under Bun- Rare spurious escape/return triggers on slow connections fixed
- SDK
reload_pluginsno 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/createrequests 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
/contextpercentages 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