Skip to content

Routines: a suggestion run held by the AI's sign-in never skips its job or pattern - #2498

Merged
JeroenCorthout merged 1 commit into
mainfrom
fix/sorting-not-started-skip
Dec 5, 2026
Merged

JeroenCorthout merged 1 commit into
mainfrom
fix/sorting-not-started-skip

Conversation

@JeroenCorthout

Copy link
Copy Markdown
Member

While Claude Code is signed out, background turns are held (signed_out_hold). A sorting run for a pattern or an old OpenClaw job then waited 12 hours (WAIT_AT_MOST), failed as not_started, and after two of those sort_again marked the job or pattern skipped for good, though no model ever looked at it. The next day a new pattern started and went the same way, and the cloud's daily check reported "routines: 2 failed, none finished well in 24 h" every day on top of the sign-in alert. Seen on a hosted Machine whose Claude sign-in had expired.

  • routines.sort_again: only runs that got their turn count toward the skip; not_started doesn't.
  • routines_sort_step: no sorting run starts or retries while the sign-in holds background work (the same hold reviews use).

Proof:

  • Keep old cases: a sorting run that got its turn and failed (no_result, runtime_error, refused start) still runs once more, then the job is skipped (test_a_sorting_run_that_didnt_work_runs_once_more_then_the_job_is_skipped unchanged). Differs only for not_started: tested by test_a_sorting_run_that_never_got_its_turn_never_skips_the_job (4 held runs, row stays sorting, then sorts normally once a turn goes).
  • One decision, one place: the hold is signed_out_hold, the one background_pause and reviews use; no own check.
  • Fix the class: searched routines*.py, routine_*.py and machine/app for other counts of failed runs that end something for good. recipe_failed counts only recipes that ran; profile.py's not_started has no lasting effect. Nothing else changed.
  • Bounded: while signed out, no new sorting rows and no runs; a held run that was already waiting fails once as not_started (KEEP_RUNS still caps rows). A held-by-usage pattern retries at most once per PATTERN_GAP (20 h), as before.
  • Both new tests fail on main and pass here.

Docs: none (internal scheduling; help describes suggestions, not retry counts).
What's new: none (a fix to background suggestions, nothing new to tell).
Lasting knowledge: failed runs are kept as before; a pattern or job is no longer discarded for a reason that says nothing about it.

🤖 Generated with Claude Code

https://claude.ai/code/session_0131jDkEg5VQnWqibgKRkRiz

…ob or pattern

While Claude Code was signed out, background turns are held (signed_out_hold). A sorting run for a
pattern or an old OpenClaw job then waited 12 hours, failed as not_started, and after two such
failures the job or pattern was marked skipped for good, though the run never got its turn. A new
pattern started the next day and went the same way, and ops heard "routines: 2 failed" every day.

- routines.sort_again counts only runs that got their turn (not not_started) toward the skip.
- routines_sort_step starts and retries no sorting run while the sign-in holds background work.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0131jDkEg5VQnWqibgKRkRiz
@JeroenCorthout JeroenCorthout added hold Held for review; the merge train skips it and removed hold Held for review; the merge train skips it labels Dec 5, 2026
@JeroenCorthout
JeroenCorthout merged commit 464a182 into main Dec 5, 2026
8 checks passed
@JeroenCorthout
JeroenCorthout deleted the fix/sorting-not-started-skip branch December 5, 2026 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant