CLAUDE-CODE-CLI PUB_DATE: 2026.05.20

CLAUDE CODE V2.1.145: CLEANER OTEL TRACES AND A JSON CLI FOR LIVE AGENTS

Claude Code v2.1.145 changed how agent work shows up in traces and made live sessions scriptable. The release adds a claude agents --json command for listing l...

Claude Code v2.1.145 changed how agent work shows up in traces and made live sessions scriptable.

The release adds a claude agents --json command for listing live sessions, making it easy to wire agents into tmux status bars, pickers, or any orchestration script release notes.

OpenTelemetry spans now include agent_id and parent_agent_id and fix parent/child nesting so background subagents sit under the dispatching Agent tool span — a big step for usable traces details. There’s also a security fix closing a permission-prompt bypass for non-allowlisted env vars, plus quality-of-life updates to plugin discovery and status lines.

[ WHY_IT_MATTERS ]
01.

OTEL span parenting now reflects real agent behavior, so traces are debuggable and useful in prod.

02.

A JSON session list unblocks simple scripts that monitor, resume, or gate agents in CI/CD and tmux.

[ WHAT_TO_TEST ]
  • terminal

    Send spans to your OTEL collector and verify background subagent spans nest correctly under claude_code.tool.

  • terminal

    Use claude agents --json to drive a tmux status or script that alerts when agents await input.

[ BROWNFIELD_PERSPECTIVE ]

Legacy codebase integration strategies...

  • 01.

    Map new agent_id/parent_agent_id to your existing service maps and update dashboards/alerts for nested spans.

  • 02.

    Harden policies: confirm the env-var permission fix behaves with your shell wrappers and audit logging.

[ GREENFIELD_PERSPECTIVE ]

Fresh architecture paradigms...

  • 01.

    Standardize on OTEL-first agent observability with span attributes as primary join keys for agent runs.

  • 02.

    Design automation around agents --json for session discovery, routing, and safe-stop flows from day one.

Enjoying_this_story?

Get daily CLAUDE-CODE-CLI + SDLC updates.

  • Practical tactics you can ship tomorrow
  • Tooling, workflows, and architecture notes
  • One short email each weekday

FREE_FOREVER. TERMINATE_ANYTIME. View an example issue.

GET_DAILY_EMAIL
AI + SDLC // 5 MIN DAILY