{"version":"2.1.261","anchor":"new-per-phase-cpu-telemetry-gated-behind-claude-code-remote","canonical_anchor":"new-per-phase-cpu-telemetry-gated-behind-claude-code-remote","heading":"New per-phase CPU telemetry, gated behind CLAUDE_CODE_REMOTE","tier":"internal","area":"Telemetry","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.261\/e\/new-per-phase-cpu-telemetry-gated-behind-claude-code-remote","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.261","markdown":"### New per-phase CPU telemetry, gated behind CLAUDE_CODE_REMOTE\n\nRemote sessions now report per-phase CPU usage split between CLI and tool subprocesses.\n\nWhen the environment sets `CLAUDE_CODE_REMOTE` and the active transport is the remote\/websocket-style transport class, Claude Code now reads the process's cgroup cpuacct usage file (`\/sys\/fs\/cgroup\/cpuacct${d}\/cpuacct.usage`, located via `\/proc\/self\/cgroup`) and compares it against `process.cpuUsage()` to split CPU time into CLI versus tool-subprocess buckets per session-state phase. This emits `tengu_tool_cpu_by_phase` telemetry, with fields like `<phase>_wall_ms`, `<phase>_cli_cpu_ms`, and `<phase>_tools_cpu_ms`, on state transitions (idle, idle_background, active, exit) and at exit, also stamping the event with the raw value of `CLAUDE_CODE_BG_TASKS_REPORT_RUNNING`. The instrumentation is skipped entirely unless `CLAUDE_CODE_REMOTE` is set.\n\n- Area: Telemetry\n- Names: `tengu_tool_cpu_by_phase`\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 2\/5"}