Skip to content

tasks: a stopped run names the work its worker already committed - #1710

Merged
AbirAbbas merged 2 commits into
devfrom
abir/stopped-run-keeps-work
Oct 1, 2026
Merged

AbirAbbas merged 2 commits into
devfrom
abir/stopped-run-keeps-work

Conversation

@AbirAbbas

Copy link
Copy Markdown
Collaborator

What was wrong

Stopping a run whose worker had already committed its work said stopped · it had changed nothing and named no branch. The re-verification pass over dev stopped a 20-item FAQ task after its commits had landed. The branch held 20 commits, and the card said nothing changed. The work was safe, but the person was told it did not exist. This is already in v0.5.0: stoprun.go passed no committed paths into keptWork, and only uncommitted edits were counted.

What is true now

The stop receipt and the row count the work already committed on the task branch since the run's base (checkBase), plus anything still uncommitted. They use the same history rule landing already uses (runCommittedPaths), so the receipt reads stopped · its work so far is kept on <branch> and did not go into <folder> · merge that branch to bring it in, or delete it to drop it. A run that truly changed nothing still says so and names no branch (TestAStoppedRunThatChangedNothingSaysSo, unchanged).

Proof

  • TestAStoppedRunNamesWorkTheWorkerAlreadyCommitted covers committed-only work and committed-plus-pending work. TestAStoppedRunNamesCommittedThenRevertedWork covers the revert case. Both use real repositories, task branches and session.Agent.Cancel, and fail before the change.
  • Real binary in tmux: dev 2f33722b2 says "it had changed nothing" with 21 commits on the branch. This branch shows the kept-work receipt, the files and the branch, in both the chat card and the task room.
  • The worker-harness.md manual is updated. An independent read-only review returned "ready".

🤖 Generated with Claude Code

AbirAbbas and others added 2 commits September 30, 2026 21:18
A stopped run read only paths committed from its current index, so a worker
that had already committed its files could be reported as having changed
nothing and its retained branch was omitted from the receipt and row.

Read committed work against the run's original base before keeping pending
edits. Share the landing's history rule, preserve the deliberate omission of
empty branches, and keep the person's checkout untouched. Add regression
coverage through real repositories and a real session.Agent, and document
that already committed work counts in a stopped run.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@AbirAbbas
AbirAbbas marked this pull request as ready for review October 1, 2026 02:05
@AbirAbbas
AbirAbbas merged commit 9f69057 into dev Oct 1, 2026
4 checks passed
@AbirAbbas
AbirAbbas deleted the abir/stopped-run-keeps-work branch October 1, 2026 02:05
@santoshkumarradha santoshkumarradha added the area:session The engine — turns, tasks, the toolbelt, checkpoints label Oct 3, 2026
@santoshkumarradha santoshkumarradha added this to the Reliable agent milestone Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:session The engine — turns, tasks, the toolbelt, checkpoints

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants