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
- 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.
- Add optional
max_retries with backoff for runs that end in error (not user-cancelled or timed-out).
- 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.
Problem
A scheduled run that hangs (e.g. an approval parked in the inbox) stays in
runningstatus 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 specificalways_allowed_commandscase but explicitly left the general problem open: no run timeout and a non-resilient overlap guard.Proposed Solution
timeout(default e.g. 15 minutes) after which a run is markedtimed_out, releasing the overlap guard and parking a notification for the user.max_retrieswith backoff for runs that end inerror(not user-cancelled or timed-out).force_stopaction so a user can halt a stuck run from the UI.Implementation Scope & Alignment
coworker/automation/scheduler.py+store.py+ a small GUI control.