This week, Claude had elevated errors across multiple models. It happened at 10 PM, just as I was about to start an overnight run with a list of features ready to build.
The problem was not only an outage killing a run halfway. I could not even start the run and go to sleep, because I had no idea when the API would recover — if the session dies on an API error, nothing inside it can restart it. I would have to stay awake, watch status.claude.com, and send the session another message when Claude came back.
Quick context: nightshift is a free, MIT-licensed Claude Code plugin for unattended overnight runs (I posted it here a few days ago). You write a checklist of tasks; hooks keep the agent working until every item is done — it can’t quietly stop halfway, and questions get parked with a sensible default instead of blocking the night.
What’s new in v0.6 is an external watchman for exactly this failure. Now I start the run and go to sleep. If the session dies on a real API error — even when the 500 lands on the very first message, before any work has started — the watchman wakes every 10 minutes and keeps attempting to resume the recorded conversation until the API responds again.
It reads the session’s own signals: its transcript, its recorded process, and Claude Code’s session roster. An interruption by me — Esc or Ctrl-C — always wins, and every uncertain state stands by. It never starts another agent beside a session that is still working.
When recovery is needed, it first runs claude --resume for the recorded conversation. If that conversation cannot be restored, it falls back to --continue, then finally a fresh session using the checklist and state stored on disk.
The point is not to prevent Claude outages. It is to let me start an overnight run, go to sleep, and stop worrying about when a temporary 500 will be resolved.
Whenever the recorded session can be resumed, the error, the recovery, and the completed work remain in the same conversation, with a direct link back to it in the morning.
Free, open source, MIT: github.com/orwa-mahmoud/claude-nightshift
submitted by
/u/orwamahmoud
Originally posted by u/orwamahmoud on r/ClaudeCode
