claudekit / updates / claude-code-2-1-161
[ PATCH · ]

Claude Code 2.1.161

`OTEL_RESOURCE_ATTRIBUTES` values are now included as labels on metric datapoints so usage can be sliced by custom dimensions like team or repo, and a failed Bash in a parallel tool batch no longer cancels its siblings. Fullscreen Linux clipboard now uses `wl-copy`/`xclip`/`xsel` and copies to both the clipboard and PRIMARY selection. Plus fixes for `claude mcp` printing secrets to the terminal and the `forceLoginOrgUUID`/`forceLoginMethod` managed-settings regression (2.1.146) that blocked Bedrock, Vertex, Foundry, and Mantle sessions.

Official announcement →

This article is a summary based on official documentation.

What changed

Claude Code 2.1.161 shipped on June 2, 2026. Telemetry, parallel tool calls, and clipboard handling all got more robust, and a wide round of fixes landed across managed settings, third-party provider sessions, MCP secret handling, and background subagents.

Improvements

  • OTEL_RESOURCE_ATTRIBUTES are now metric labels

    Values set via OTEL_RESOURCE_ATTRIBUTES previously attached to resource metadata only, so usage metrics couldn’t be sliced by custom dimensions. Those same keys/values are now included as labels on metric datapoints, letting dashboards filter and aggregate by dimensions like team or repo.

  • claude agents rows show done/total first when work is fanned out

    When a row had work fanned out, it wasn’t obvious how much was left. Each row now shows done/total before the detail, and peek surfaces the longest-running item.

  • /mcp collapses claude.ai connectors you’ve never signed in to

    Inactive claude.ai connectors crowded the list and made it hard to find the servers actually in use. They’re now collapsed behind a “Show unused connectors” row.

  • A failed Bash in a parallel tool batch no longer cancels its siblings

    A single failing Bash call used to cancel every other tool in the same batch, dropping their results. Each tool in a parallel batch now returns its own result independently.

  • Fullscreen Linux clipboard uses native helpers

    Fullscreen copy on Linux relied on OSC 52 alone, which several terminals don’t handle. The clipboard path now uses wl-copy/xclip/xsel when available, copies to both the clipboard and the PRIMARY selection (so middle-click paste works), and the hold {key} for native selection hint shows the correct key per terminal.

  • Rendering performance

    Terminal rendering was improved by stabilizing the layout engine’s JIT compilation profile, and rendering large file writes is faster.

  • [VSCode] Tip to disable terminal GPU acceleration when glyphs render garbled

    A new tip suggests disabling terminal GPU acceleration (or running /terminal-setup) when VS Code’s integrated terminal shows garbled glyphs.

Bug fixes

Auth & managed settings

  • forceLoginOrgUUID/forceLoginMethod managed-settings policies blocking third-party provider sessions (Bedrock, Vertex, Foundry, Mantle) alongside the org pin (regression in 2.1.146) — fixed.
  • /usage-credits starting a re-login for Team and Enterprise admins instead of pointing to the organization’s usage settings page — fixed.
  • claude mcp list/get/add printing secrets to the terminal${VAR} references are no longer expanded, and credential headers and URL secrets are redacted.

MCP & telemetry

  • OpenTelemetry log events (user_prompt, api_request, tool_result, tool_decision) being silently dropped when emitted before telemetry initialization completed — fixed.

Sessions, resume & background agents

  • --resume picker not showing sessions from the current directory when it isn’t a git worktree (e.g., jj workspaces) — fixed.
  • Background subagent output corrupting claude -p stdout when using --output-format text or json — fixed.
  • Workflow agents spawned with isolation: "worktree" in background sessions being blocked from editing files inside their own worktree — fixed.
  • Background sessions dispatched from claude agents booting on a stale model from the daemon’s environment instead of the model in settings.json — fixed.
  • Potential crash when rendering Write tool results after resuming a session — fixed.
  • Completed subagents getting stuck showing as running when an error occurs while finalizing their result — fixed.

Slash commands & platform

  • /autofix-pr reporting “cannot run on the default branch” when the session is inside a git worktree or another repository — fixed.
  • /effort dialog, workflow animations, and prompt keyword shimmer not honoring the “Reduce motion” setting — fixed.
  • Windows hooks that invoke bash explicitly (e.g., /usr/bin/bash script.sh) failing with “command not found” or “cannot execute binary file” — fixed.
  • EADDRINUSE errors from tools that bind Unix sockets under $TMPDIR when CLAUDE_CODE_TMPDIR is set to a deep path — fixed.

Notes

  • forceLoginOrgUUID/forceLoginMethod regression resolved — managed-settings policies that pinned an org since 2.1.146 were also blocking third-party provider sessions (Bedrock, Vertex, Foundry, Mantle). Upgrading restores those sessions with no settings change.
  • claude mcp secret exposure fixed — list/get/add no longer expand ${VAR} references and redact credential headers and URL secrets. Environments that captured the previous output to logs should audit historical logs for leaked secrets.
  • OTEL_RESOURCE_ATTRIBUTES — set custom keys/values to slice usage metrics by dimensions like team or repo. The same values are now attached as labels on metric datapoints, so dashboards can aggregate by them.
  • Parallel tool call behavior change — a failed call no longer cancels its siblings, so partial failures in a batch still return the rest of the results.
  • Fullscreen Linux clipboardwl-copy/xclip/xsel are used automatically when installed, and content is copied to the PRIMARY selection too so middle-click paste works.