Claude Code v2.1.161 发布
Claude Code v2.1.161 发布了多项功能改进与问题修复。功能方面,现在可将 OTEL_RESOURCE_ATTRIBUTES 的值作为指标数据点的标签,支持按团队或代码库等维度查看使用情况;`claude agents` 命令在分发任务时会显示“已完成/总数”;`/mcp` 改进了连接器列表的展示;并行工具调用时,单个 Bash 命令的失败不再取消同批次的其他调用;全屏模式在 Linux 上优化了剪贴板支持。本次更新还修复了包括管理策略阻止第三方会话、后台子智能体输出损坏以及终端渲染性能在内的多个问题。
What's changed
OTEL_RESOURCE_ATTRIBUTES values are now included as labels on metric datapoints, so you can slice usage metrics by custom dimensions like team or repo
claude agents rows now show done/total before the detail when work is fanned out; peek shows the longest-running item
/mcp now collapses claude.ai connectors you've never signed in to behind a "Show unused connectors" row
Parallel tool calls: a failed Bash command no longer cancels other calls in the same batch — each tool returns its own result independently
Fullscreen mode: clipboard now uses wl-copy/xclip/xsel on Linux when available, copies to both the clipboard and PRIMARY selection for middle-click paste, and the "hold {key} for native selection" hint now shows the correct key per terminal
Fixed the /effort dialog, workflow animations, and prompt keyword shimmer not honoring the "Reduce motion" setting
Fixed forceLoginOrgUUID/forceLoginMethod managed-settings policies blocking third-party provider sessions (Bedrock, Vertex, Foundry, Mantle) alongside the org pin (regression in 2.1.146)
Fixed background subagent output corrupting claude -p stdout when using --output-format text or json
Fixed /usage-credits starting a re-login for Team and Enterprise admins instead of pointing to the organization's usage settings page
Fixed /autofix-pr reporting "cannot run on the default branch" when the session is inside a git worktree or another repository
Fixed --resume picker not showing sessions from the current directory when it isn't a git worktree (e.g., jj workspaces)
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 OpenTelemetry log events (user_prompt, api_request, tool_result, tool_decision) being silently dropped when emitted before telemetry initialization completed