Skip to content

fix: reset terminal task clocks before resuming execution - #1

Merged
jaykwok merged 4 commits into
jaykwok:mainfrom
qcnhy:fix/revive-deadline-restamp
Nov 16, 2026
Merged

jaykwok merged 4 commits into
jaykwok:mainfrom
qcnhy:fix/revive-deadline-restamp

Conversation

@qcnhy

@qcnhy qcnhy commented Nov 15, 2026 •

Copy link
Copy Markdown

Reviving a completed or failed task with an expired deadline kept the previous run's clock, reducing subsequent worker runs to a one-second budget. Terminal tasks now receive a fresh budget when execution starts.

  • Clear first_run_at and deadline_at in the same database update that restores done, failed, or timeout to running.
  • Stop the previous deadline coordinator before revival, then clear its cached clock and settlement state.
  • Start the new clock on the first Planner/Worker execution, after any FIFO wait. Pause/resume and additional work within an existing run preserve its deadline.
  • Cover immediate and queued revival, cached and restored clocks, failed database writes, coordinator shutdown, and unlimited tasks. Run the corresponding race checks in CI.
  • Build with Go 1.27.4, including the Docker source build, to address GO-2026-6859 in net/http.

Validation: go test ./... -count=1 -timeout 180s, go vet ./..., go mod verify, and govulncheck passed locally with Go 1.27.4. CI passed, including task revival race checks, cross-platform launchers, frontend checks, and the embedded binary smoke test.

Included in the v1.0.5 changelog with a reference to this PR.

…/intents

Reviving a done task through set_goals/add_intent returned it to running
but kept the old deadline_at, so workers started with a 1-second clamped
run context and every Bash call died with 'tool execution interrupted'.
Now admitTaskWhen re-stamps first_run_at/deadline_at (and refreshes the
in-process deadline map) when a terminal task with a timeout re-enters
running, so revival restarts the budget instead of inheriting an expired
one.
@jaykwok jaykwok changed the title fix: re-stamp task deadline when a terminal task is revived fix: reset terminal task clocks before resuming execution Nov 16, 2026
@jaykwok
jaykwok merged commit 6baf30e into jaykwok:main Nov 16, 2026
4 checks passed
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.

2 participants