[BUG] Cloud routines fail with "An error occurred while executing Claude Code" every morning since July 4
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
My morning cloud routines have been failing every day since July 4, 2026 (4 consecutive days). The routine shows "Completed" status in the runs panel but the actual task never executes -- it errors out immediately with "An error occurred while executing Claude Code."
The routine was working fine before July 4. No changes were made to the routine configuration. This appears to be an Anthropic infrastructure issue since there is nothing on the user side to fix.
Workaround: Running the same task manually in a Claude Code session works fine.
What Should Happen?
The cloud routine should execute the Claude Code task fully and complete successfully, the same way it does when run manually in a Claude Code session.
Error Messages/Logs
An error occurred while executing Claude Code. You can try again by sending a new message or starting a new session.
Steps to Reproduce
- Create a cloud routine in claude.ai/code/routines with a scheduled cron trigger
- Wait for the scheduled run time
- Routine shows "Completed" in the runs panel but task never executes
- Error message appears: "An error occurred while executing Claude Code"
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
Web interface (claude.ai/code) - version unknown
Platform
Other
Operating System
Windows
Terminal/Shell
Other
Additional Information
<img width="1366" height="720" alt="Image" src="https://github.com/user-attachments/assets/3ec9f630-b328-4f4c-8b06-f13cac7b19b0" />
3 Comments
Update: Root cause found and fixed.
The issue was not an infrastructure problem. The cloud routine model was set to Opus 4.8 instead of Fable 5. Switching the model to Fable 5 immediately fixed it.
How to fix:
Open your cloud routine
Click the pencil (edit) icon
Click the model selector
Change from Opus 4.8 to Fable 5
Save and re-run
The error message "An error occurred while executing Claude Code" was misleading -- it did not indicate an infrastructure failure. Check your model setting first before assuming it's a platform issue.
+1, hitting this exact same bug — same error text, same "Completed but never executed" pattern, also on Windows, also a scheduled cron-trigger cloud routine (claude.ai/code, Research preview, Claude Pro plan). Adding my evidence since it's more isolated than what's likely already been reported, and this issue is still open with no confirmed fix.
Error message (verbatim, every occurrence):
"An error occurred while executing Claude Code. You can try again by sending a new message or starting a new session."
No request ID, status code, or further detail behind "View details" in any of these.
Environment:
0 10,13,16,21 * * *UTCConfirmed occurrences:
| When | Model | Custom setup script? | Trigger |
|---|---|---|---|
| 2026-07-23, 9:07 AM ET | Sonnet 5 | No | Scheduled |
| 2026-07-24, 6:06 AM ET | Sonnet 5 | No | Scheduled |
| 2026-07-24, 9:07 AM ET | Sonnet 5 | No | Scheduled |
| 2026-07-24, 7:56 PM ET | Opus 4.8 | No | Manual |
Why I don't think this is config-related on my end:
pip installpath assumption on my end, unrelated to this)I also checked the two theories raised elsewhere in this thread against my own case, and neither applies here:
.claude/directory orsettings.jsonat all, so afailIfUnavailablesandbox config (per #78904) isn't in play here.Given that, it looks like this generic error message may be covering more than one distinct underlying bug across different reporters, which might be worth separating out rather than treating as a single root cause.
One more UI detail worth flagging alongside the core bug: failed runs of this type show as "Completed" (green checkmark) in the Runs panel, visually identical to genuinely successful runs. The only way to tell is to open that specific run's transcript. For an unattended scheduled automation this makes the failure completely silent — I only found it by manually auditing run history after a real digest failed to send.
What I'd expect instead:
Related, possibly the same root cause, both closed without a documented fix:
This has been closed since July 15th. Thanks for reporting!