{"version":"2.1.328","anchor":"background-shell-sleep-watch-and-agentsrun-tracking-in-mcp-s","canonical_anchor":"background-shell-sleep-watch-and-agentsrun-tracking-in-mcp-s","heading":"New sleep watch for background shells and sub-agents","tier":"internal","area":"MCP","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.328\/e\/background-shell-sleep-watch-and-agentsrun-tracking-in-mcp-s","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.328","markdown":"### New sleep watch for background shells and sub-agents\n\nClaude Code adds a sleep watch that tracks running background shells and finished sub-agents, with a new anthropic\/sleepWatch message\n\n**Unclear.** Nothing shows whether this tracking is used yet or what it changes for a reader.\n\n**What**\n\nGroundwork for a sleep watch appeared. Background shells are commands Claude Code leaves running while it continues, and sub-agents are helper copies of Claude that work on part of a task.\n\n- Background commands: the background command manager now accepts a `sleepWatch` option. It tracks which shell process IDs are still running and whether sub-agents have ended, through a new `noteAgentsEnded` method, with `agentsRun` tracking in MCP serve.\n\n- Message format: a new message schema keyed `anthropic\/sleepWatch` was added, with fields `v` (2), `mode` (`count` or `end`) and an optional `agents_run`. Where it is used was not traced.\n\n**Why**\n\nThis looks like the start of a way to tell when a turn is idle or waiting while background shells and sub-agents are still running. Nothing visible is described yet.\n\n- Area: MCP\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}