Skip to content

[Feature Request] Scheduled-task run timeout + retry/backoff policy #621

Description

@cagdasyurekli

Problem

A scheduled run that hangs (e.g. an approval parked in the inbox) stays in running status forever. The scheduler\x27s overlap guard (_running_ids, coworker/automation/scheduler.py) is only released when the runner returns, so a hung run silently skips all future runs of that task. #228 fixed the specific always_allowed_commands case but explicitly left the general problem open: no run timeout and a non-resilient overlap guard.

Proposed Solution

  1. Add a per-task timeout (default e.g. 15 minutes) after which a run is marked timed_out, releasing the overlap guard and parking a notification for the user.
  2. Add optional max_retries with backoff for runs that end in error (not user-cancelled or timed-out).
  3. Add an explicit force_stop action so a user can halt a stuck run from the UI.

Implementation Scope & Alignment

  • Scope: ~150-200 lines in coworker/automation/scheduler.py + store.py + a small GUI control.
  • Zero New Dependencies.
  • Alignment: Keeps the "standing automations" promise honest — a stalled automation should not silently kill every future run of that task.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions