{"version":"2.1.310","anchor":"bash-sandbox-policy-refusal-check-added-before-the-sleep-blo","canonical_anchor":"bash-sandbox-policy-refusal-check-added-before-the-sleep-blo","heading":"Monitor replaces sleep for waiting, and follows sandbox and permission rules","tier":"notice","area":"Sandbox","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.310\/e\/bash-sandbox-policy-refusal-check-added-before-the-sleep-blo","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.310","markdown":"### Monitor replaces sleep for waiting, and follows sandbox and permission rules\n\nBash now steers Claude from sleep to the Monitor tool, and both Bash and Monitor refuse commands the sandbox policy forbids\n\n**Unclear.** The exact conditions under which either refusal happens are not known.\n\n**What**\n\nMonitor is a tool Claude uses to watch a command, log or process and be told when something changes. Bash is the tool that runs shell commands. A sandbox is a restricted environment that limits what commands can touch. Several changes move waiting onto Monitor and make Monitor follow the same rules as Bash:\n\n- The Bash tool's instructions no longer say \"If you must sleep, keep the duration short to avoid blocking the user.\" They now say \"Do not sleep between commands that can run immediately\" and that long leading `sleep` commands are blocked, and to use Monitor with an until-loop to poll until a condition is met.\n\n- The block on foreground `sleep` in Bash now has fewer preconditions, so the \"Blocked: ... use Monitor with an until-loop\" message may appear in more situations.\n\n- CronCreate's description gained a \"Not for live watching\" section that points watching a log file, process or command output at Monitor. In the capture taken under this release CronCreate's description is 3,399 characters and Monitor's is 6,354.\n\n- Monitor's on-switch now depends on a single check instead of two. Whether this makes Monitor available to more people is not resolved.\n\n- Bash now checks the sandbox policy before running a command and rejects it, with error code 14 and a sandbox policy refusal note, when the policy forbids it.\n\n- Monitor now does the same check and refuses forbidden commands up front, both as the Monitor tool and through the `RunMonitorCommand` path served over MCP.\n\n- Monitor's permission check was rewritten: deny rules are checked first and a deny wins; when an ask rule matches, Claude Code records `matchedAskRule` and offers no rule suggestions; otherwise the matching rule's verdict is used.\n\n**Why**\n\nClaude is steered away from polling with `sleep` and toward Monitor. A command that sandbox policy would block in Bash is now also blocked in Monitor, and ask and deny rules on a command now apply when Claude runs it through Monitor.\n\n- Area: Sandbox\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: yes"}