Guides
Claude Code API Error 500: diagnose and recover
Check whether a Claude Code 500 or 529 came from the service, whether the shift is still armed, and what the Nightshift watchman actually resumed.
Updated
Can Claude Code recover from API Error 500 during a long run?
An API Error 500 is an upstream service error. Nightshift cannot repair that service. For an armed shift with positive failure evidence, its local watchman can retry a recorded Claude Code session after availability returns while the punch list stays on disk.
Confirm the 500 came from the service
Read the actual Claude Code error and service status before changing project files. In the Nightshift workspace, inspect Status or Doctor, open boxes in punch-list.md, and the latest shift-log.md entries. A clean close, owner Escape, STOP, deadline, or completed contract is a deliberate ending, not a failed recovery.
How Nightshift resumes Claude Code after a 500
The watchman runs outside Claude Code, normally waking every ten minutes unless configured otherwise. When process, transcript, and roster signals show a dead session or a classified API-error wedge, it tries the recorded conversation first, then documented continuation or fresh-session fallbacks. It rechecks liveness before further attempts and records each attempt. The outage itself still costs time, and missing or uncertain evidence makes it stand down.
- The on-disk list, decisions, and receipts survive even if conversation resume fails.
- A replacement inherits the original permission scope; it cannot widen it.
- The machine and its watchman must remain running.
Verify recovery without duplicating work
If the old panel still shows the error, check shift-log.md and the files before sending another prompt. A headless revival may not refresh that panel. Reopen the recorded thread to interact with it, then inspect the item receipts, diffs, checks, and open boxes. If Doctor says the session is paused or cannot be classified, resume attended from the durable contract.
tail -40 .nightshift/shift-log.mdStart with a bounded prompt
This prompt names the outcome and preserves Nightshift’s review boundary. Paste it into the supported coding host from the project you want to change.
Check the actual API error, provider status, Nightshift Status or Doctor, and shift log before deciding whether the armed watchman should retry.What this workflow does not claim
- Nightshift cannot fix an upstream outage or guarantee a same-conversation resume.
- Uncertain liveness, clean closes, STOP, and missing safe identity can stand recovery down.
Evidence and sources
These links support the released behavior, public outcomes, or problem language described on this page.