{"version":"2.1.319","anchor":"thread-level-cpu-sampling-in-cloud-sessions-1-in-n-sampled","canonical_anchor":"thread-level-cpu-sampling-in-cloud-sessions-1-in-n-sampled","heading":"Cloud sessions sample how much processor time each part of Claude Code uses","tier":"internal","area":"Telemetry","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.319\/e\/thread-level-cpu-sampling-in-cloud-sessions-1-in-n-sampled","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.319","markdown":"### Cloud sessions sample how much processor time each part of Claude Code uses\n\nIn some Anthropic-hosted cloud sessions, Claude Code now samples its processor use by thread and reports it with each turn's timing data\n\n**What**\n\nIn some cloud sessions, Claude Code now measures how much processor time each of its threads (parallel strands of work inside the program) uses, such as the main thread, memory clean-up, code compilation, network requests and worker pools. It also measures time spent waiting to run and time taken by the host machine. A spare process started ahead of time is measured separately.\n\nThe results are added to the timing data Claude Code reports for each turn, both during a turn and between turns. Sampling happens only when all of these hold:\n\n- `CLAUDE_CODE_REMOTE` is `true`\n\n- no `CLAUDE_CODE_ENVIRONMENT_KIND` is set\n\n- the environment is not self-hosted\n\n- the session is picked at random, one in a number of sessions set by `CLAUDE_CODE_THREAD_CPU_ONE_IN` or by a built-in default\n\n**Why**\n\nThis is performance measurement only, and it is limited to cloud sessions that Anthropic hosts. It does not change what Claude Code does for you.\n\n- Area: Telemetry\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}