Skip to content

fix(channel): record a kill as a stop and label tool calls that never ran - #675

Merged
iamnbutler merged 3 commits into
mainfrom
fix-kill-resume
Oct 22, 2026
Merged

iamnbutler merged 3 commits into
mainfrom
fix-kill-resume

Conversation

@iamnbutler

Copy link
Copy Markdown
Contributor

Two more of #442's gaps:

  • ace kill (and the owner's kill from the gateway) now leaves the same durable ace.stopped entry that a Stop leaves (fix(channel): record who stopped a run, show it in the timeline, and tell the next run #664), in every chat it ended. The timeline reads "Stopped by .", and the chat's next run is told that its previous run was stopped. Kills that the worker makes on its own, which have no author, write nothing, as before.
  • When a run ends while the agent is still writing a tool call, that call never runs, because pi runs calls only from a finished reply. Its tool event now carries unrun. In the app, the call's row reads "Not run" and opens to "Not run: the run ended while the agent was writing this call.", where before it was a red entry that opened to nothing. ace watch prints → write (not run). Older clients ignore the field.

Smoke-tested on a loopback source host (own ACE_HOME, port 4377) with gpt-6-astra:

  • I asked for sleep 60 && echo finished and ran ace kill after 20 s. ace watch replays ✗ Tool bash was aborted then Stopped by iamnbutler@gmail.com.. The next ask, "Why did your previous run end?", got "…because you stopped it while the shell command was still running."
  • I asked for a single large write call and ran ace stop while it was streaming. ace watch shows → write (not run), and in headless Chromium the reply shows a "Not run" row above "Stopped by iamnbutler.".

Map: ^595. Part of #442. Still open there:

  • A worker restart isn't recorded, and the agent isn't told about it. A resumed run doesn't say it resumed. pi converts the cut-off partial when the generation retries, after the channel reopens. Writing a marker into a run that's still going could split a tool call from its result, so this needs a design call on where the marker goes.
  • The tool group's generic summary still counts an unrun write as "Edited 1 file", as it does for any failed edit.

Built in Ace

No. Claude Code (fix-train worker) made this outside Ace, running against a loopback source host. It used headless Chromium to smoke the web client. Dogfooding gaps are tracked in #5.

… ran

Why: packages/channel/src/channel.ts#function events | tool calls in an aborted or failed assistant message never ran: pi runs calls only from a finished reply, so they carry unrun
@iamnbutler
iamnbutler merged commit 3bf703e into main Oct 22, 2026
1 check passed
@iamnbutler
iamnbutler deleted the fix-kill-resume branch October 22, 2026 22:29
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