2.1.143 untested · changelog-derived

Claude Code 2.1.143

Plugin dependency management on disable/enable with transitive chain resolution and force-enable. This addresses a common footgun where uninstalling a plugin that others depend on silently breaks dependent plugins, and now provides copy-pasteable hints for safe uninstall chains.

15 new primitives 3 workflow recipes 26 fixes

New primitives

claude plugin disable with dep enforcementcommand

Refuses to disable a plugin when another enabled plugin depends on it; provides copy-pasteable chain to disable dependents first

Added plugin dependency enforcement: `claude plugin disable` now refuses when another enabled plugin depends on the target (with a copy-pasteable disable-chain hint), and `claude plugin enable` force-enables transitive dependencies
claude plugin enable with transitive depscommand

Force-enables transitive dependencies when enabling a plugin

Added plugin dependency enforcement: `claude plugin disable` now refuses when another enabled plugin depends on the target (with a copy-pasteable disable-chain hint), and `claude plugin enable` force-enables transitive dependencies
/plugin marketplace cost projectioncapability

Shows per-turn and per-invocation token cost estimates in browse pane for plugin context usage

Added projected context cost (per-turn and per-invocation token estimates) to the `/plugin` marketplace browse pane
worktree.bgIsolation: "none" settingsetting

Lets background sessions edit the working copy directly without `EnterWorktree`, for repos where worktrees are impractical

Added `worktree.bgIsolation: \"none\"` setting to let background sessions edit the working copy directly without `EnterWorktree`, for repos where worktrees are impractical
CLAUDE_CODE_POWERSHELL_RESPECT_EXECUTION_POLICY env varenv-var

Opt-out flag; disables PowerShell `-ExecutionPolicy Bypass` pass-through

PowerShell tool now passes `-ExecutionPolicy Bypass`. Opt out with `CLAUDE_CODE_POWERSHELL_RESPECT_EXECUTION_POLICY=1`
CLAUDE_CODE_STOP_HOOK_BLOCK_CAP env varenv-var

Override for the 8-consecutive-block limit that now caps repeated stop-hook looping

Fixed stop hooks that block repeatedly looping forever — the turn now ends with a warning after 8 consecutive blocks (override via `CLAUDE_CODE_STOP_HOOK_BLOCK_CAP`)
claude agents --add-dir flagflag

Apply custom directory to agent dashboard and background sessions dispatched from it

`claude agents` now accepts `--add-dir`, `--settings`, `--mcp-config`, and `--plugin-dir` and applies them to the dashboard and to background sessions dispatched from it
claude agents --settings flagflag

Apply custom settings.json to agent dashboard and background sessions dispatched from it

`claude agents` now accepts `--add-dir`, `--settings`, `--mcp-config`, and `--plugin-dir` and applies them to the dashboard and to background sessions dispatched from it
claude agents --mcp-config flagflag

Apply custom MCP config to agent dashboard and background sessions dispatched from it

`claude agents` now accepts `--add-dir`, `--settings`, `--mcp-config`, and `--plugin-dir` and applies them to the dashboard and to background sessions dispatched from it
claude agents --plugin-dir flagflag

Apply custom plugin directory to agent dashboard and background sessions dispatched from it

`claude agents` now accepts `--add-dir`, `--settings`, `--mcp-config`, and `--plugin-dir` and applies them to the dashboard and to background sessions dispatched from it
claude agents --permission-mode flagflag

Set default permission mode for sessions dispatched from agent view

`claude agents` accepts `--permission-mode`, `--model`, `--effort`, and `--dangerously-skip-permissions` to set defaults for sessions dispatched from the view
claude agents --model flagflag

Set default model for sessions dispatched from agent view

`claude agents` accepts `--permission-mode`, `--model`, `--effort`, and `--dangerously-skip-permissions` to set defaults for sessions dispatched from the view
claude agents --effort flagflag

Set default effort level for sessions dispatched from agent view

`claude agents` accepts `--permission-mode`, `--model`, `--effort`, and `--dangerously-skip-permissions` to set defaults for sessions dispatched from the view
claude agents --dangerously-skip-permissions flagflag

Set permission bypass default for sessions dispatched from agent view

`claude agents` accepts `--permission-mode`, `--model`, `--effort`, and `--dangerously-skip-permissions` to set defaults for sessions dispatched from the view
CLAUDE_CODE_USE_POWERSHELL_TOOL=0 opt-outenv-var

Disable PowerShell tool (which is now enabled by default on Windows for Bedrock/Vertex/Foundry)

The PowerShell tool is now enabled by default on Windows for Bedrock, Vertex, and Foundry users. Opt out with `CLAUDE_CODE_USE_POWERSHELL_TOOL=0`.

Workflow recipes

Plugin-safe fleet management in monorepo
claude agents --add-dir + claude agents --mcp-config + claude agents --permission-mode + claude plugin disable dependency enforcement

Agents dispatched from the dashboard can now carry uniform MCP server, permissions, and directory context without manual setup, plus plugin dependency enforcement prevents silent breakage when multiple agents share plugin dependencies. This unlocks safe, scalable multi-agent setups in large codebases.

In a monorepo with shared tooling, start claude agents with --mcp-config pointing to a team-standard config, --add-dir for shared scripts, and --permission-mode auto. Dispatch multiple background workers from the dashboard; each inherits the fleet defaults. When refactoring shared plugins, claude plugin disable now blocks unsafe removal, showing the exact chain to disable dependents first. Workflow: one settings source → N workers → safe plugin mutations.

Persistent background workers in worktree-hostile environments
worktree.bgIsolation: "none" + /bg preserving --mcp-config, --settings, --plugin-dir

Repos with complex layouts or shared filesystem constraints (monoliths, git-filter-branch artifacts, NFS mounts) can now run background agents directly on the working copy without the overhead of git worktrees, while still preserving full transitive configuration across sleep/wake cycles.

In a constrained repo, set worktree.bgIsolation: "none" in settings.json. Dispatch /bg with custom MCP and settings. The background session edits the live working copy, and when it idles/wakes, it remembers its MCP servers, settings, and plugins without re-initialization. Reduces startup latency and filesystem overhead for long-running daemons.

Cost-aware plugin marketplace browsing for context-sensitive agent design
/plugin projected context cost + claude agents --model + --effort defaults

Before assembling a fleet of agents, browse the plugin marketplace with cost projections to estimate context footprint, then dispatch workers with matching model/effort tiers. Prevents context bloat and mismatches in heterogeneous agent roles.

Use /plugin to browse available plugins and see per-turn/per-invocation token costs. Design agent cohorts: high-context workers on higher-effort models, low-context workers on base models. Dispatch each cohort via claude agents with --model and --effort matching the cost profile. Reduces wasted context and improves cost predictability.

Agentic relevance

2.1.143 heavily hardens background agent dispatch, persistence, and isolation semantics — the `/bg` command and `claude agents` dashboard now preserve transitive configuration state (MCP, settings, permissions, fallback models) across respawn, and add new controls for dashboard-dispatched sessions. Plugin dependency graphs are now safe to manipulate. For agents: leverage `worktree.bgIsolation: "none"` in monorepo/monolith contexts where worktree isolation is overhead, and use the new `claude agents` flags to set uniform defaults for a fleet of dashboard-spawned workers.

Hardening & fixes (26)

  • Fixed corrupt `.credentials.json` with non-array `scopes` hanging CLI on startup or silently aborting OAuth token refresh
  • Fixed right-click paste in `claude agents` on Windows Terminal and WSL
  • Fixed Esc/Ctrl+C not cancelling pending `/loop` wakeup while idle
  • Fixed `/goal` evaluator firing while background shells or delegated subagents running
  • Fixed `NO_COLOR`/`FORCE_COLOR` env vars stripping Claude Code UI colors (now apply to subprocesses only)
  • Fixed agent view spawning repeated PowerShell processes on Windows
  • Fixed `/bg` without prompt sending "continue" to forked session (fork now waits for input)
  • Fixed `--agent <name>` not finding plugin-contributed agents without `plugin:` prefix
  • Fixed deleting session from agent view not removing transcript file
  • Fixed stale-fragment rendering when scrolling in attached background sessions on Windows Terminal
  • Fixed background agents false-positive worker-stall detection after host sleep or macOS App Nap
  • Fixed 5xx error messages pointing at status.claude.com instead of configured gateway
  • Worktree cleanup no longer falls back to `rm -rf` when `git worktree remove` fails (prevents file loss)
  • Fixed background sessions on macOS getting permission errors reading `~/Documents`, `~/Desktop`, `~/Downloads` with Full Disk Access granted
  • Background sessions now preserve model and effort level after waking from idle
  • Shift+Tab in attached agent sessions now includes auto mode in the cycle
  • Fixed background sessions silently capturing IDE file references into warm spare's input
  • `/bg` now preserves `--mcp-config`, `--settings`, `--add-dir`, `--plugin-dir`, `--strict-mcp-config` across respawn
  • Background sessions from `claude agents` now honor `permissions.defaultMode` from settings.json
  • Fixed Windows: pressing ← in `claude agents` while response streaming could leave agents list unresponsive
  • `/bg` and `←`-detach preserve `--fallback-model` for graceful overload degradation
  • `/bg` and `←`-detach preserve `--allow-dangerously-skip-permissions` in Shift+Tab cycle
  • `claude --bg --dangerously-skip-permissions` now persists across retire→wake
  • Background sessions preserve model and effort after idle; Shift+Tab cycle now includes auto mode (both behavior changes to existing background-session handling, not new primitives)
  • Fixed background daemon spawn fallback when `~/.local/bin/claude` launcher missing/non-executable
  • Fixed `claude agents --allow-dangerously-skip-permissions` defaulting to bypass instead of making it available in permission cycle

Raw changelog

## 2.1.143

- Added plugin dependency enforcement: `claude plugin disable` now refuses when another enabled plugin depends on the target (with a copy-pasteable disable-chain hint), and `claude plugin enable` force-enables transitive dependencies
- Added projected context cost (per-turn and per-invocation token estimates) to the `/plugin` marketplace browse pane
- Added `worktree.bgIsolation: "none"` setting to let background sessions edit the working copy directly without `EnterWorktree`, for repos where worktrees are impractical
- PowerShell tool now passes `-ExecutionPolicy Bypass`. Opt out with `CLAUDE_CODE_POWERSHELL_RESPECT_EXECUTION_POLICY=1`
- Background sessions now preserve the model and effort level you set after waking from idle
- Shift+Tab in attached agent sessions now includes auto mode in the cycle
- Fixed a corrupt `.credentials.json` with a non-array `scopes` value hanging the CLI on startup or silently aborting OAuth token refresh
- Fixed right-click paste in `claude agents` on Windows Terminal and WSL
- Fixed stop hooks that block repeatedly looping forever — the turn now ends with a warning after 8 consecutive blocks (override via `CLAUDE_CODE_STOP_HOOK_BLOCK_CAP`)
- Fixed Esc/Ctrl+C not cancelling a pending `/loop` wakeup while Claude is idle between iterations
- Fixed `/goal` evaluator firing while background shells or delegated subagents are still running
- Fixed `NO_COLOR`/`FORCE_COLOR` in settings.json `env` stripping Claude Code's own UI colors — they now apply to subprocesses only
- Fixed agent view spawning repeated PowerShell processes on Windows when listing sessions
- Fixed `/bg` without a prompt sending "continue" to the forked session — the fork now waits for input
- Fixed `--agent <name>` not finding plugin-contributed agents without the `plugin:` prefix
- Fixed deleting a session from agent view not removing its transcript file
- Fixed stale-fragment rendering when scrolling in attached background sessions on Windows Terminal
- Fixed background agents false-positive worker-stall detection storm after host sleep or macOS App Nap
- Fixed 5xx error messages pointing at status.claude.com instead of naming the configured gateway or cloud provider
- The PowerShell tool is now enabled by default on Windows for Bedrock, Vertex, and Foundry users. Opt out with `CLAUDE_CODE_USE_POWERSHELL_TOOL=0`.
- `claude agents` now accepts `--add-dir`, `--settings`, `--mcp-config`, and `--plugin-dir` and applies them to the dashboard and to background sessions dispatched from it
- `claude agents` accepts `--permission-mode`, `--model`, `--effort`, and `--dangerously-skip-permissions` to set defaults for sessions dispatched from the view
- `claude --bg --dangerously-skip-permissions` now persists across retire→wake
- Fixed background sessions silently capturing IDE file references into the warm spare's input, which caused the reference to be prepended to the next prompt dispatched 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
- Fixed background-job sessions on macOS getting "Operation not permitted" errors when reading files under `~/Documents`, `~/Desktop`, or `~/Downloads`, even with Full Disk Access granted.
- `/bg` now preserves `--mcp-config`, `--settings`, `--add-dir`, `--plugin-dir`, and `--strict-mcp-config`, so backgrounded sessions keep their MCP servers and settings across respawn.
- Background sessions launched from `claude agents` now honor `permissions.defaultMode` from settings.json (was previously overridden to auto mode)
- Fixed: on Windows, pressing ← in `claude agents` while a response was streaming could leave the agents list unresponsive to all input
- `/bg` and `←`-detach now preserve `--fallback-model`, so backgrounded workers degrade to the fallback model on overload instead of hard-failing.
- `/bg` and `←`-detach now preserve `--allow-dangerously-skip-permissions`, so the forked worker keeps bypass-permissions available in its Shift+Tab cycle.
- Fixed: background daemon spawn now falls back to the running binary when the `~/.local/bin/claude` launcher is missing or non-executable
- Fixed `claude agents --allow-dangerously-skip-permissions` defaulting dispatched sessions to bypass mode instead of making it available in the permission cycle