[BUG] Routines (RemoteTrigger) scheduler stalls: next_run_at freezes in the past, scheduled fires never execute

Resolved 💬 3 comments Opened May 4, 2026 by nmp4817 Closed May 8, 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?

A claude.ai/code routine on a recurring cron stops firing. The routine's next_run_at field freezes at a past timestamp and never advances. Manual "Run now" works fine, and re-saving the cron expression (no-op partial update) advances next_run_at to a valid future slot — at which point the schedule resumes (until the next stall).

What Should Happen?

Notes

  • The minute jitter in next_run_at (e.g. 18:08:04, 18:08:38) suggests the scheduler intentionally offsets cron slots — that's fine, but a stall on the

offsetted timestamp suggests the dispatcher isn't picking the slot up reliably.

  • Manual POST /v1/code/triggers/{id}/run works in both stall states, which rules out an issue with the agent / git source / MCP connector.
  • I've collected the JSON of GET /v1/code/triggers/{id} at each stall state if useful.

## Asks

  1. Is there a known cause for the dispatcher to drop a slot once next_run_at has been written?
  2. Would it be reasonable for the platform to auto-advance next_run_at when a slot is more than N minutes overdue, rather than requiring a manual no-op update?

Error Messages/Logs

## Routine                                                                                                                                                          
                                                                                                                                                                      
  - ID: `trig_011oqBnKmkKHSrjZ9D18pKNC`                                                                                                                               
  - Name: `yii-dead-code-cleanup`                                                                                                                                     
  - Cron (UTC): `0 */3 * * 1-5` (top of every 3rd hour, Mon–Fri)                                                                                                      
  - `enabled: true` throughout                                                                                                                                        
  - Environment: `env_01JH5JdGeMF6paSdhapriQxW` (anthropic_cloud)                                                                                                     
  - Sources: a single git_repository                                                                                                                                  
  - One MCP connection (GitHub)     

## Timeline                                                                                                                                                         
                                                                                                                                                                      
  **Stall #1 — Fri 2026-05-01**                                                                                                                                       
  - After successful manual run, scheduler set `next_run_at: 2026-05-01T18:08:04.644Z`
  - 18:08 came and went; no run was logged on the routine page                        
  - At ~18:22 UTC, `next_run_at` still showed `18:08:04` (in the past, ~14 min stale)                                                                                 
  - Workaround: `POST /v1/code/triggers/{id}` with `{"cron_expression": "0 */3 * * 1-5"}` (same value as before) → `next_run_at` advanced to
  `2026-05-01T21:01:25.811Z`                                                                                                                                          
                                                                                                                                                                      
  **Stall #2 — Mon 2026-05-04**                                                                                                                                       
  - Scheduler had set `next_run_at: 2026-05-04T18:08:38.298Z`                                                                                                         
  - 18:08 came and went; no run logged                       
  - At ~18:11 UTC, `next_run_at` still showed `18:08:38` (~3 min stale)                                                                                               
  - Same workaround applied → `next_run_at` advanced to `2026-05-04T21:07:49.910Z`
                                                                                                                                                                      
  Both stalls happened at the 18:08 UTC slot specifically.

Steps to Reproduce

Repro shape

  1. Create a routine with cron 0 */3 * * 1-5
  2. Wait for the system to schedule a fire near 18:00 UTC on a weekday
  3. Observe that next_run_at is in the past and the run did not execute
  4. POST /v1/code/triggers/{id} with the same cron_expressionnext_run_at recomputes to the next valid future slot

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.126

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗