How long a sleep gets blocked?
Unknown. Neither the changelog nor the documentation defines long. In Classmethod's test, sleep 120 was blocked, but that is one data point, not a threshold.
The most reliable approach is to run your actual longest sleep once in a test environment.
Should I use Monitor or /loop?
/loop re-runs a prompt on a fixed interval, while Monitor watches in the background and responds only when something happens. For waiting on a condition, Monitor is usually cheaper than polling.
If you want to repeat the same task periodically rather than wait for an event, /loop is still the right fit.
Is Monitor's 30-minute ceiling enough?
That depends on what you are waiting for. The third-party summary says each watch lasts 30 minutes at most, and Claude gets a notice at the deadline so it can restart. Longer waits rely on restarting the watch.
Non-interactive -p runs have an even shorter limit of 10 minutes, which long tasks need to account for.
My script suddenly stalls after upgrading. How do I tell if sleep was blocked?
First look in the output for a message such as "Blocked: standalone sleep". If present, change the wait to a condition wait with Monitor, or run the command you started in the background.
Do not chain several shorter sleeps to get around it; the message quoted by Classmethod specifically advises against that.
The Claude Code v2.1.310 changelog (October 23, 2026) says the Monitor tool and Plugin monitors are now available on Bedrock, Vertex and Foundry, and in environments where telemetry or nonessential traffic is disabled. The same entry adds that long foreground sleep is blocked there too. If your automation or agent habitually uses sleep to wait for work to finish, this release may stall it directly.
According to a third-party summary, Monitor lets Claude watch a log, CI job, directory or WebSocket in the background and react when something happens while you keep working in the same session. In most cases Claude writes a small script, runs it in the background, and receives each output line as an event. It differs from /loop, which re-runs a prompt on an interval; Monitor avoids polling. Limits: each watch has a deadline, 5 minutes by default and 30 at most, and 10 at most in a non-interactive -p run, at which point Claude gets one notice so it can restart; --resume and --continue do not restart monitors that were running when the session ended; Windows needs Git Bash; permissions follow the same rules as Bash, and in Auto Mode the classifier reviews Monitor commands as it reviews Bash.
Before, Monitor depended on fetching feature flags, a step skipped on third-party providers and in environments with DISABLE_TELEMETRY or similar variables set, so it was unavailable there. From v2.1.310 it works on Amazon Bedrock, Claude Platform on AWS, Google Cloud's Agent Platform and Microsoft Foundry. The tools reference now says Monitor requires v2.1.310 or later; other tools such as PushNotification, SendUserFile and RemoteTrigger remain unavailable on these providers. On the long foreground sleep rule there are two accounts: Classmethod tested it on macOS, connected directly to the Anthropic API, in a claude -p run with CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1, and sleep 120 was blocked with the message "Blocked: standalone sleep 120. To wait for a condition, use Monitor with an until-loop.", which also advises against chaining shorter sleeps to get around it; another write-up says it saw no exact message or threshold. Neither the changelog nor the documentation defines what long means, and behavior on Bedrock, Vertex and Foundry itself is unverified.
Plugins can start monitors automatically, defined in monitors/monitors.json with a name, command and description; when defaults to always and can be set to start the first time a given Skill runs. Note that plugin monitor commands run outside the Sandbox with full user permissions; -p runs do not start plugin monitors; commands cannot use ${user_config.*}; and disabling a plugin does not stop monitors already running. The experimental key used in one form also suggests the format may change.
If you run Claude Code on Bedrock, Vertex or Foundry, this release is both a new feature and a possible interruption: search your scripts and prompts in a test environment for sleep-based waiting, and change it to have Claude use Monitor to wait for a condition. Polling by sleep keeps a session idling anyway, and event-driven waiting is usually cheaper. Do not assume the threshold before upgrading; run your actual longest sleep once in a test environment and see whether it is blocked. Because plugin monitors run outside the sandbox, install them only from sources you trust.