{"slug": "get-woken-up-in-the-middle-of-the-night-when-your-agent-hits-an-external-blocker", "title": "Get woken up in the middle of the night when your agent hits an external blocker", "summary": "A new open-source macOS command-line tool, codex-stall-watch, wakes users with a loud alarm when an OpenAI Codex agent stalls on an external blocker, using GPT-5.6 Terra to classify whether the task legitimately finished or needs human intervention. The tool, which monitors tasks every 30 seconds via launchd and alarms after five minutes of inactivity, was created by an unnamed developer to prevent agents from stalling overnight.", "body_md": "A low-memory macOS CLI that asks GPT-5.6 Terra whether an explicitly enabled Codex task legitimately finished or needs a loud human alarm.\n\nDo you run agents while you sleep?\n\nWe all hate it when an agent stalls prematurely. For example, it can stop to ask you about an external blocker.\n\nThat is why I made a simple CLI that literally alarms you in the middle of the night.\n\nHow can it determine whether an agent has legitimately finished a task? After five minutes of inactivity, a GPT-5.6 Terra agent validates the task state and starts the alarm when human action is required.\n\n`launchd`\n\nruns one short metadata check every 30 seconds. No watcher process stays in memory between checks. After five minutes without canonical-task progress, one bounded `codex exec`\n\nprocess classifies the stop. The evaluator process exits after its decision and is forcibly terminated after 120 seconds.\n\nThe evaluator uses:\n\n`gpt-5.6-terra`\n\n;- normal/default service speed, isolated from the user's Priority/Fast configuration;\n- medium reasoning;\n- a read-only temporary working directory;\n- a closed JSON output schema;\n`--ephemeral`\n\n, so no evaluator rollout session is saved;- at most 10 recent user messages and 18 recent useful session snippets by default.\n\nEach user message is capped at 12,000 characters. Evidence snippets include recent assistant messages, turn-completion messages, reasoning summaries, and tool results. Each evidence item is capped between 1,800 and 6,000 characters by type. Context extraction streams the canonical JSONL and keeps bounded ring buffers.\n\n```\n./codex-stall-watch install\n```\n\nInstallation compiles the 52 KB native alert helper with the macOS Command Line Tools already present on this Mac.\n\n```\ncodex-stall-watch on codex://threads/01234567-89ab-4def-8123-456789abcdef --name \"Production deployment\"\ncodex-stall-watch rename 01234567-89ab-4def-8123-456789abcdef \"New title\"\ncodex-stall-watch status\ncodex-stall-watch silence 01234567-89ab-4def-8123-456789abcdef\ncodex-stall-watch off 01234567-89ab-4def-8123-456789abcdef\n```\n\nThe native alarm dialog has one button: **Silence alarm**. This stops the sound for the current canonical-session version. New canonical task progress invalidates the prior Terra decision and automatically re-arms the monitor.\n\nFor overnight use, an active alarm unmutes macOS, temporarily sets the system output volume to 100%, and plays a gapless alternating 880/660 Hz emergency tone. The tone continues until the user clicks **Silence alarm** or runs `codex-stall-watch silence`\n\n. The monitor restores the prior volume and mute state when the alarm stops. This cannot override a disconnected speaker, a Mac that is powered off, or audio routed to headphones.\n\nTerra can return:\n\n`legitimate_finish`\n\n: stay quiet until new canonical progress;`alarm`\n\n: start the loud alarm;`wait`\n\n: perform one bounded recheck after 60 to 600 seconds.\n\nAn evaluator timeout, CLI failure, malformed result, ambiguous evidence, or low-confidence finish fails closed to `alarm`\n\n. Prompt and evidence files exist only in a mode-700 temporary directory and are deleted after evaluation. The alarm does not display evaluator evidence or secret values.\n\n`off`\n\nis different from `silence`\n\n: `off`\n\nremoves the task's explicit opt-in.\n\n```\non <url|id> [options]      Enable a task (`--after`, `--name`, `--snippets`)\nrename <url|id> <title>    Set the title used in status and alarms\noff <url|id>               Disable a task\nsilence [url|id]           Stop an alarm without disabling monitoring\nstatus                     Show all enabled tasks\ncheck                      Run one check now\ntest-alarm [seconds]       Test the sound for 1 to 30 seconds\ninstall                    Install and start the launchd timer\nuninstall                  Remove the installed timer and CLI\n```\n\nState is stored in `~/.local/state/codex-stall-watch`\n\n. The LaunchAgent is `~/Library/LaunchAgents/com.local.codex-stall-watch.plist`\n\n.\n\nThe fast test uses an isolated fake Codex session:\n\n```\n./tests/test.sh\n```\n\nThe live smoke test makes one real ephemeral Terra decision and confirms that a blocking approval request triggers an alarm decision without saving a session or leaving an evaluator process:\n\n```\n./tests/live-terra-smoke.sh\n```\n\nThe timeout smoke test uses a fake hanging evaluator. It confirms forced termination and fail-closed alarm behavior:\n\n```\n./tests/timeout-smoke.sh\n```\n\n", "url": "https://wpnews.pro/news/get-woken-up-in-the-middle-of-the-night-when-your-agent-hits-an-external-blocker", "canonical_source": "https://github.com/whp-wessel/codex-stall-watch", "published_at": "2026-08-26 20:34:43+00:00", "updated_at": "2026-08-26 20:48:34.961602+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "artificial-intelligence"], "entities": ["codex-stall-watch", "OpenAI Codex", "GPT-5.6 Terra", "macOS"], "alternates": {"html": "https://wpnews.pro/news/get-woken-up-in-the-middle-of-the-night-when-your-agent-hits-an-external-blocker", "markdown": "https://wpnews.pro/news/get-woken-up-in-the-middle-of-the-night-when-your-agent-hits-an-external-blocker.md", "text": "https://wpnews.pro/news/get-woken-up-in-the-middle-of-the-night-when-your-agent-hits-an-external-blocker.txt", "jsonld": "https://wpnews.pro/news/get-woken-up-in-the-middle-of-the-night-when-your-agent-hits-an-external-blocker.jsonld"}}