Skip to content

fix: abort chat computer commands when a turn stops - #138

Open
jz-krono wants to merge 1 commit into
CopilotKit:mainfrom
jz-krono:fix/chat-computer-cancellation
Open

jz-krono wants to merge 1 commit into
CopilotKit:mainfrom
jz-krono:fix/chat-computer-cancellation

Conversation

@jz-krono

@jz-krono jz-krono commented Oct 3, 2026

Copy link
Copy Markdown

The chat run aborts browser/search work when the user stops it, but creates its computer tools without that run's abort signal. An active run_computer_command therefore keeps executing until its own timeout, while the chat UI has already stopped.

Pass the chat run's abort signal and a pre-dispatch guard to the computer tool wrapper. The existing computer executor handles an interrupted command and records its uncertain outcome.

The mock-model regression starts a computer command, unsubscribes the run, and asserts the command receives the aborted signal. Before the change it receives no signal. Verification: 21 related tests passed; TypeScript and changed-file Biome checks passed.

This branch has not been deployed

No deployments
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