[BUG] Cloud routines fail with "An error occurred while executing Claude Code" every morning since July 4

Status Fixed / completed
Maintainer reply None cached
Activity 3 comments · opened Jul 7, 2026 · closed Aug 28, 2026

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

  1. Create a cloud routine in claude.ai/code/routines with a scheduled cron trigger
  2. Wait for the scheduled run time
  3. Routine shows "Completed" in the runs panel but task never executes
  4. 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" />

View original on GitHub ↗

3 Comments

AidanIconics · 3 months ago

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.

Holliday35 · 2 months ago

+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:

  • Claude Code CLI version (local): 2.1.183
  • Platform: Web (claude.ai/code), cloud routines, Research preview
  • Plan: Claude Pro
  • OS: Windows 10 Pro
  • One "Default" cloud environment (type "cloud", network access confirmed set to "Full"), shared by two routines against the same private GitHub repo
  • Routine cron: 0 10,13,16,21 * * * UTC

Confirmed 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:

  • Not model-specific — happened on both Sonnet 5 and Opus 4.8
  • Not a setup-script issue — happened both with no custom setup script present and after removing one that had been added and was separately causing a different, correctly-labeled "Failed" error (a bad pip install path assumption on my end, unrelated to this)
  • Not network-access related — the environment's network access was confirmed "Full" throughout
  • Not limited to scheduled triggers — reproduced on a manually-triggered run too

I also checked the two theories raised elsewhere in this thread against my own case, and neither applies here:

  • Not a model-config issue — I hit this exact error on Sonnet 5 multiple times before ever touching the model setting, and again after switching to Opus 4.8. If a specific "wrong model" were the cause, it wouldn't explain the Sonnet 5 occurrences.
  • Not a repo-tracked sandbox setting — this repo has no .claude/ directory or settings.json at all, so a failIfUnavailable sandbox 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:

  1. A distinct status for this failure mode (not "Completed") so it's visible in the run list without opening every transcript.
  2. Actual diagnostic detail behind "View details" — a request ID or error code, instead of the same generic message every time.

Related, possibly the same root cause, both closed without a documented fix:

  • #72602 — "Claude Code cloud sessions fail with execution error on all requests" (closed as duplicate)
  • #54497 — "CC on Web or CC standalone App: Claude Code execution failed 100% of the time" (closed as not planned)
MaxLeiter · 1 month ago

This has been closed since July 15th. Thanks for reporting!