{"version":"2.1.328","anchor":"shell-snapshot-telemetry-now-records-why-a-snapshot-was-crea","canonical_anchor":"shell-snapshot-telemetry-now-records-why-a-snapshot-was-crea","heading":"Shell command setup gains a watchedSleep option and records why snapshots are made","tier":"internal","area":"Telemetry","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.328\/e\/shell-snapshot-telemetry-now-records-why-a-snapshot-was-crea","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.328","markdown":"### Shell command setup gains a watchedSleep option and records why snapshots are made\n\nShell commands now take a watchedSleep option, and shell snapshot records say why a snapshot was created\n\n**What**\n\nClaude Code runs shell commands, the commands you would type in a terminal, on your behalf. Two changes touch how those commands are prepared.\n\n- `watchedSleep`: shell execution now passes a `watchedSleep` option into `buildExecCommand`, the step that builds the command to run. What it does was not traced. A head-start skip reason `too_old` is also recorded.\n\n- Snapshot reason: the record made when a shell snapshot is created, on success or failure, now carries a `reason`. It is `started_early` when the snapshot began ahead of time, and otherwise the reason the caller gave, defaulting to `other`. The retry path gives `needs_terminal`. Before, only the time taken was recorded.\n\n**Why**\n\nThis shows how often snapshots are built late because a terminal is needed. The `watchedSleep` option probably changes how sleep commands are handled, so watch for differences when Claude runs commands that wait.\n\n- Area: Telemetry\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}