Claude Code 2.1.145 adds claude agents --json and Bash tool execution
Anthropic released Claude Code 2.1.145 with JSON session listing for scripting, Bash execution inside Tool, and richer OTEL span metadata. Update if you rely on automation, and review the fix for the environment-variable approval bypass plus the UI bug fixes.

TL;DR
- ClaudeCodeLog's release thread says Claude Code 2.1.145 shipped 20 CLI changes, led by
claude agents --json, a Bash-executing Tool path, and a fix for an environment-variable approval bypass. - According to ClaudeCodeLog's changelog post, the release also adds
agent_idandparent_agent_idtoclaude_code.toolOTEL spans and fixes parenting so background subagents nest under the dispatching Agent span. - ClaudeCodeLog's changelog post lists a long tail of UI and workflow fixes, including Windows PowerShell resume handling, task ordering, PR badge refresh, Agent Teams non-ASCII names, and
/reviewon repos with Classic Projects. - In ClaudeCodeLog's further changes post, the CLI surface also grows a
--strictoption plus several new environment variables, while prompt tokens rise by 5,453, or 8.5%.
The GitHub release is already live in the v2.1.145 tag. You can also inspect the CLI surface diff, the metadata diff, and the prompt stats diff.
claude agents --json
The most obviously scriptable addition is claude agents --json. In ClaudeCodeLog's changelog post, it is framed as a way to list live Claude sessions for things like tmux-resurrect, status bars, and session pickers.
That is a small CLI flag with very practical consequences. Claude Code already had visible multi-agent behavior, but JSON output turns live sessions into something shell scripts and terminal tooling can consume directly.
Tool and OTEL spans
The same changelog adds agent_id and parent_agent_id attributes to claude_code.tool spans, then fixes trace parenting so background subagents sit under the Agent tool span that launched them. That should make distributed traces less confusing when a foreground agent fans work out to background helpers.
ClaudeCodeLog's further changes post also points to a new prompt string describing a Tool that runs a given Bash command and returns its output. Paired with the tracing changes, 2.1.145 looks a bit more automation-first than the version bump suggests.
Permission and UI fixes
The security-relevant item is the Bash permission bypass. ClaudeCodeLog's changelog post says bare variable assignments to non-allowlisted environment variables had been auto-approved, and 2.1.145 closes that path.
The rest of the fix list is mostly quality-of-life, but it is broad:
- MCP prompt slash commands now name missing required arguments instead of surfacing raw validation errors, per ClaudeCodeLog's changelog post.
- Whole-file reads that exceed the token limit now return a truncated first page with a
PARTIAL viewnotice, according to ClaudeCodeLog's changelog post. - Windows PowerShell 5.1 now uses
;as the command separator for the cross-project resume hint, in ClaudeCodeLog's changelog post. - Agent Teams with non-ASCII teammate names no longer fail API calls, per ClaudeCodeLog's changelog post.
/plugindiscovery screens now preview commands, agents, skills, hooks, and MCP or LSP servers before install, according to ClaudeCodeLog's changelog post.
CLI surface and prompt growth
The quieter changes are in the diff metadata. ClaudeCodeLog's further changes post says 2.1.145 adds a --strict option and seven environment variables: ANTHROPIC_ENVIRONMENT_ID, ANTHROPIC_ENVIRONMENT_KEY, CLAUDE_CODE_HOST_AUTH_ENV_VAR, CLAUDE_CODE_HOST_AUTH_REFRESH_TIMEOUT_MS, CLAUDE_CODE_SDK_HAS_HOST_AUTH_REFRESH, DISPLAY, and SCREENSHOT_DIR. It also removes CLAUDE_CODE_PLAN_MODE_INTERVIEW_PHASE.
The same post says the bundle grew by 122.1 kB, or 0.5%, while prompt files rose by three and prompt tokens rose by 5,453, or 8.5%. Tool-related prompt share climbed from 60.0% to 63.1%, which fits the release's overall shape: more plumbing for agents, more shell integration, and more metadata hanging off the CLI surface.