Blackbox Blast
BB Preflight
← Incident log

CASE · Minor · monitoring-gap

Unverified reportCollected from public reports

A 3 a.m. Claude Code job was stopped twice by an API safeguard, and its logs held neither the blocked operations nor the expiry warning (unverified report)

According to the author, an unattended mini-game build run daily at 3 a.m. with claude -p from Windows Task Scheduler was stopped by an API-side safeguard on November 4 and 7. The 4th ended with an error; on the 7th the agent wrote a report and stopped partway through implementation. The author resumed both by hand. This is a personal operations log and does not describe actual harm.

6 min read

OBSERVED
CATEGORY
monitoring-gap
BLAST RADIUS
uptime
DETECTED BY
operator-observation
TAGS
#claude-code #unattended-run #scheduled-task #api-safeguard #permission-denied #oauth-expiry #log-gap #stream-json

CH 1

Cause

Per the author, the logs did not show why the runs were stopped, and the cause of the 7th is unknown. The text-format log kept only the final report, so operations blocked by the permission mechanism (13 between November 8 and 11) and a warning that the login was nearing expiry sat unread in logs of successful days.

CH 2

Consequence

On the 4th the morning deliberation was discarded; a manual rerun redid it and all three proposals came out different, with publication at 4:12. On the 7th the author had to ask by hand for implementation through commit, which landed at 5:16. Each blocked operation cost one or two turns. The login-expiry warning would have gone unnoticed had the confirmation Claude not picked it up, repeating the October 18 failure.

CH 3

Fix

The author switched output to stream-json and saved every event to a separate file, and now reads the expiry date from claude auth status each morning and writes it to the log. If fewer than 5 days remain or a warning phrase appears, a warning file is placed on the desktop. The instructions for the confirmation Claude now include the days remaining and a count of permission_denied events.

What happened

The author, mappy, runs claude -p "/daily date" every morning at 3 a.m. from Windows Task Scheduler. Claude Code (the author calls it the "commander") has three subagents debate, builds one mini-game from the chosen proposal and commits it, and a script pushes it and checks it is live. It started on September 17 and has run without human involvement since the 20th.

On November 4, a run that normally takes about 15 minutes ended in 7. The log held an API error saying the safeguards had flagged a message the commander (Opus) was about to send, and exit code 1. The error text itself says this can happen with safe, normal conversations.

It stopped again on November 7, this time after the debate, vote, comments and strategy-note updates were done, at the point of writing the game's HTML. The article is a personal operations log and does not describe actual harm.

The chaos on the ground

On the 4th, the run stopped while the commander was writing the request that asks the three agents to cast one vote among three proposals. It was US midterm election day, and the author first suspected the word "vote" had tripped the safeguard, but says there is no evidence for that. The classification on the error was reasoning_extraction.

The author reran the same script by hand at 3:49 and the game went live at 4:12. The deliberation, however, started over, and the three proposals from the morning and from the rerun were all different. The morning's proposals were never published; only the partial reply logs were kept under another name as the failed run.

On the 7th the commander did not crash but wrote its own final report. It said the write of the game file was stopped by a safety check, that regenerating the same content was also forbidden, and that no reason was given and it did not know it either. It also listed what was done and what was not, and warned that running /daily as is would redo the deliberation and enter the same session twice in the strategy notes.

The author started Claude Code interactively and asked it to run only implementation through commit, without redoing the deliberation. A commander in a separate session read the morning's logs and built the game for the same proposal; it was committed at 5:16. The script's check that treats a run as failed if that day's page is missing worked: the exit code was 0, but the log ended with "no entry was created".

Root cause

The cause of the 7th is unknown. Around that time there were press reports that Claude Code had begun refusing to imitate existing games; the author considered a link but thinks the shape differs. If the model were declining on its own judgment, the commander should be able to say why, yet it wrote that it did not know, and a separate run two hours later handled the same subject. The author guesses the safeguard reacted once to a particular combination of wording, the same kind as the first case, but says this is a guess.

The way the log was built was part of why. With --output-format text, the log keeps only the commander's final report, not the tools it called, their results or errors along the way.

After switching output to stream-json and saving all events to a separate file, the author found that between November 8 and 11 the commander's Bash commands had been blocked by the permission mechanism 13 times in total (3, 3, 4 and 3 per day). The reasons were chained operations (4), braces with quote characters (3), variables (3), and three others. Every run succeeded and the games were published.

Per the author, the commander tried to do in one call what would pass if done one command at a time, chaining with variables, braces or pipes. Once chained, the checker cannot verify the contents and blocks it. On the morning of the 8th it tried a shortcut of rewriting a record table with sed and was blocked three times, then gave up on the shell and wrote the content with the file-writing tool. Its final report said it could not copy the record and had added a diff instead, but the text log would not have shown the three retries or the reasons.

The fix

The other blind spot was login expiry. On October 18 an expired OAuth login had ended an unattended run in 20 seconds. In the November 8 morning log, a warning appeared for the first time saying the sign-in would end between November 11 and 14.

It appeared in the standard error of the short call made before the main run to log the model names. That day's run succeeded, so the warning was buried in a successful day's log. The author learned of it because the confirmation Claude, which reads the log and the published page at 3:27 every morning and sends a phone notification, listed it as a point of concern. The author had not told it to watch for expiry, and says that without it some morning between the 11th and 14th would have ended in 20 seconds like October 18.

The author logged in again on the 8th. loginExpiresAt in claude auth status was December 7, and the previous login had been 24 to 27 days from expiry. The script now reads that date every morning and writes the days remaining to the log, and places a warning file on the desktop if fewer than 5 days remain or a warning phrase appears. The instructions for the confirmation Claude now include the days remaining and a summary of permission_denied events. The author has not yet tried claude setup-token, which the warning recommends for unattended jobs (a long-lived token), and plans to add one line to the procedure to reduce blocked Bash calls.

The author sums up that the safeguard cannot be fixed from their side, so what can be done is to make a stopped run resumable and to record what stopped it. The lessons given are that a log keeping only the final report says least on days that succeed, that anything with an expiry should have its date read daily, and that the agent should be made to write what is done and not done when it stops.

Sources

PREFLIGHTIs your own Mac prepared?BB Preflight is a free Mac tool that checks 21 things, from AI agent permissions to where your keys live, without changing anything.Run the check →