Claude Code 2.1.143: Plugin Dependencies, Context Costs, Worktree Fixes

Claude Code 2.1.143 adds plugin dependency enforcement, projected context costs in the marketplace, and fixes 20+ issues across background sessions, PowerShell, worktrees, and Windows Terminal compatibility.

Claude Code 2.1.143: Plugin Dependencies, Context Costs, Worktree Fixes

TL;DR

  • Plugin dependency enforcement now prevents disabling plugins that others depend on
  • Projected context costs added to plugin marketplace browse pane
  • Multiple background session, PowerShell, and worktree fixes across Windows, macOS, and WSL

New

  • Plugin dependency enforcementclaude plugin disable now refuses when another enabled plugin depends on the target, with a copy-pasteable disable-chain hint; claude plugin enable force-enables transitive dependencies
  • Projected context cost display — per-turn and per-invocation token estimates now shown in the /plugin marketplace browse pane
  • Worktree background isolation optionworktree.bgIsolation: "none" setting lets background sessions edit the working copy directly without EnterWorktree, for repos where worktrees are impractical
  • PowerShell execution policy bypass — PowerShell tool now passes -ExecutionPolicy Bypass by default; opt out with CLAUDE_CODE_POWERSHELL_RESPECT_EXECUTION_POLICY=1
  • Background session state persistence — model and effort level now preserved after waking from idle
  • Shift+Tab agent mode cycling — attached agent sessions now include auto mode in the cycle
  • PowerShell tool enabled by default — now enabled on Windows for Bedrock, Vertex, and Foundry users; opt out with CLAUDE_CODE_USE_POWERSHELL_TOOL=0
  • Enhanced claude agents flags — now accepts --add-dir, --settings, --mcp-config, --plugin-dir, --permission-mode, --model, --effort, and --dangerously-skip-permissions for dashboard and background session defaults

Fixed

  • Corrupt .credentials.json with non-array scopes value hanging CLI on startup or silently aborting OAuth token refresh
  • Right-click paste in claude agents on Windows Terminal and WSL
  • Stop hooks that block repeatedly looping forever — turn now ends with warning after 8 consecutive blocks (override via CLAUDE_CODE_STOP_HOOK_BLOCK_CAP)
  • Esc/Ctrl+C not cancelling pending /loop wakeup while Claude is idle between iterations
  • /goal evaluator firing while background shells or delegated subagents still running
  • NO_COLOR/FORCE_COLOR in settings.json env stripping Claude Code's UI colors — now apply to subprocesses only
  • Agent view spawning repeated PowerShell processes on Windows when listing sessions
  • /bg without prompt sending "continue" to forked session — fork now waits for input
  • --agent <name> not finding plugin-contributed agents without plugin: prefix
  • Deleting session from agent view not removing its transcript file
  • Stale-fragment rendering when scrolling in attached background sessions on Windows Terminal
  • Background agents false-positive worker-stall detection storm after host sleep or macOS App Nap
  • 5xx error messages pointing at status.claude.com instead of naming configured gateway or cloud provider
  • Background sessions silently capturing IDE file references into warm spare's input, prepending reference to next prompt from claude agents
  • Worktree cleanup no longer falls back to rm -rf when git worktree remove fails, preventing loss of gitignored or in-progress files
  • Background-job sessions on macOS getting "Operation not permitted" errors when reading files under ~/Documents, ~/Desktop, or ~/Downloads, even with Full Disk Access granted
  • Windows: pressing ← in claude agents while response streaming could leave agents list unresponsive to input
  • Background daemon spawn now falls back to running binary when ~/.local/bin/claude launcher missing or non-executable
  • claude agents --allow-dangerously-skip-permissions defaulting dispatched sessions to bypass mode instead of making it available in permission cycle

Preserved Across Background Sessions

  • /bg and ←-detach now preserve --mcp-config, --settings, --add-dir, --plugin-dir, and --strict-mcp-config, so backgrounded sessions keep MCP servers and settings across respawn
  • /bg and ←-detach now preserve --fallback-model, so backgrounded workers degrade to fallback model on overload instead of hard-failing
  • /bg and ←-detach now preserve --allow-dangerously-skip-permissions, so forked worker keeps bypass-permissions available in Shift+Tab cycle
  • --dangerously-skip-permissions now persists across retire→wake
  • Background sessions launched from claude agents now honor permissions.defaultMode from settings.json (was previously overridden to auto mode)

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

Source: Claude Code