Skip to content

feat(amsg-server): abort cancelled fire generation and tools - #90

Merged
Tosd0 merged 2 commits into
mainfrom
feat/abort-active-fire
Sep 30, 2026
Merged

Tosd0 merged 2 commits into
mainfrom
feat/abort-active-fire

Conversation

@Tosd0

@Tosd0 Tosd0 commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

Cancelling or superseding a running task previously stopped future pushes only after lease renewal; the in-flight LLM request and tool loop could continue. Lease loss now aborts the active request and exposes signal, isCancelled() and throwIfCancelled() to fire hooks. Cancelled fires settle with status: 'cancelled' and willRetry: false, and an outbox write racing cancellation removes its undelivered results after committing.

The existing heartbeat interval stays unchanged. Interactive applications can use leaseHeartbeatMs: 1000 and pass the signal into their tools; completed external side effects remain irreversible.

Validation: npm run ci passed (1,335 tests across all six packages), including cancellation during model requests, before/output hooks, tools, swallowed tool errors, outbox commit, and rejected state writes after cancellation while settlement cleanup stays available. Changesets publishes shared/server and updates dependent package ranges on the next prerelease train.

@Tosd0
Tosd0 merged commit 5eea103 into main Sep 30, 2026
1 check passed
@Tosd0
Tosd0 deleted the feat/abort-active-fire branch September 30, 2026 16: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