Claude Code now measures CPU time for shell commands in more ways
Claude Code can now read a shell command's CPU time from the whole process tree, the command's own process and the cgroup, and drops the figure if a read fails
Under the hoodTier: how much it should matter to you
1Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
TelemetryArea: what it touches
Internal ChangesKind: in v2.1.311,
Internal ChangesSection of the release
What
Claude Code already read CPU time from the cgroup file cpuacct.usage. A cgroup is a Linux feature that groups processes and tracks the resources they use. When Claude Code runs a shell command through its Bash tool, it can now also measure the CPU time that command used in these ways:
The command's own process, using figures the system reports for it. This is skipped on Windows.
Every process the command started, by adding up the counts in /proc/<pid>/stat. /proc is a Linux folder that describes running processes.
The Bash tool is how Claude runs commands in your terminal. If any of these readings fails or takes too long, Claude Code logs it and leaves the CPU figure out. The command itself runs exactly as before.
Why
Shell commands on Linux get a CPU measurement from more sources. A failed measurement never affects the command you asked for.