Claude Code: Git Worktree Isolation & Background Agent Orchestration
Claude Code 2.1.49 introduces native git worktree support via a new --worktree flag, enabling developers to launch Claude in a fully isolated working environment without touching the main branch. The release formalizes background agent orchestration, allowing agent definitions to declare background: true and be controlled with a dedicated Ctrl+F kill binding. Anthropic also added a ConfigChange hook event for enterprise-grade configuration auditing, alongside multiple WASM memory leak fixes and SDK capability discovery fields.
Sources & Mentions
5 external resources covering this update
Release v2.1.49 · anthropics/claude-code
GitHub
Claude Code by Anthropic - Release Notes - February 2026 Latest Updates
Releasebot
Claude Code Docs, Guides, Tutorials & Best Practices
ClaudeLog
Show HN: Agent-worktree – A Git worktree workflow tool for AI coding agents
Hacker News
CHANGELOG.md at main · anthropics/claude-code
GitHub
Native Git Worktree Support
Claude Code 2.1.49 adds first-class support for git worktrees — a Git feature that creates separate working directories sharing the same repository history. Developers can now launch Claude in an isolated worktree with a single flag:
claude --worktree my-feature
The -w shorthand is also supported. Inside a worktree session, subagents can further declare isolation: "worktree" to spawn in their own temporary worktrees, making it straightforward to run parallel tasks without branch conflicts or accidental file overwrites.
Background Agents as First-Class Citizens
Before 2.1.49, background agents were functional but lacked explicit lifecycle controls. This release promotes them to a first-class orchestration primitive. Agent definition files (.claude/agents/*.md) now accept a background: true field, which instructs Claude Code to always run that agent as a background task regardless of how it is invoked.
Control over running background agents has also improved. A new Ctrl+F keybinding kills all active background agents, requiring a double press within three seconds as confirmation. Previously, pressing Ctrl+C or ESC while background agents were running was silently ignored — this is now fixed. Pressing either key twice within three seconds properly terminates all background agents.
ConfigChange Hook for Enterprise Auditing
A new ConfigChange hook event fires whenever a configuration file is modified during an active session. This enables enterprise security teams to audit settings changes in real time and, if needed, block unauthorized configuration modifications via hook exit codes. The disableAllHooks setting has also been hardened to respect the managed settings hierarchy — non-managed user settings can no longer override hooks that are enforced by enterprise policy.
Memory Leak Fixes and Performance Gains
Two long-standing WASM memory issues have been resolved:
- Tree-sitter parser: WASM memory grew unboundedly during long sessions. Claude Code now periodically resets the tree-sitter parser to reclaim memory.
- Yoga layout engine: The Yoga WASM module's linear memory never shrank after use. This has been fixed, preventing RSS from inflating over time in extended sessions.
Startup performance receives additional attention: MCP authentication failures are now cached to avoid redundant connection attempts, HTTP calls for analytics token counting have been reduced, and MCP tool token counting is batched into a single API call.
SDK Capability Discovery
The SDK model info response now includes three new fields: supportsEffort, supportedEffortLevels, and supportsAdaptiveThinking. SDK consumers can use these to programmatically determine which capability flags a given model supports before making API calls.
Other Notable Changes
- Plugins can now ship a
settings.jsonfile to provide default configuration for their users Simple mode(CLAUDE_CODE_SIMPLE) now includes the FileEdit tool in addition to Bash- Permission prompts for path safety and working directory restrictions now display the reason for the block rather than a bare prompt
- The
--resumesession picker no longer shows raw XML tags for sessions that began with slash commands like/clear - Fixed the
plugin enable/plugin disablecommands to auto-detect the correct scope instead of always defaulting to user scope