-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Qwen Code executes a tool after cancellation #5016
Copy link
Copy link
Closed
Labels
category/coreCore engine and logicCore engine and logiccategory/toolsTool integration and executionTool integration and executionpriority/P1High priority issueHigh priority issuescope/interactiveInteractive CLI featuresInteractive CLI featuresstatus/in-reviewThis issue is currently in review.This issue is currently in review.type/bugSomething isn't working as expectedSomething isn't working as expected
Metadata
Metadata
Assignees
Labels
category/coreCore engine and logicCore engine and logiccategory/toolsTool integration and executionTool integration and executionpriority/P1High priority issueHigh priority issuescope/interactiveInteractive CLI featuresInteractive CLI featuresstatus/in-reviewThis issue is currently in review.This issue is currently in review.type/bugSomething isn't working as expectedSomething isn't working as expected
Type
Fields
Give feedbackNo fields configured for issues without a type.
What happened?
After SIGINT/cancellation is delivered during a streaming tool call, Qwen Code still executes tool work from the interrupted response.
The reproduction uses a local deterministic OpenAI-compatible provider endpoint and a fake API key, so it does not require a live Qwen account or external provider request.
What did you expect to happen?
After cancellation, Qwen Code should not execute tool work from the interrupted provider response.
Client information
Client Information
Run
qwento enter the interactive CLI, then run the/aboutcommand.Login information
API Config / OpenAI-compatible endpoint in the local replay command.
Anything else we need to know?
Standalone reproduction
Prerequisites: Docker, Python 3, and the GitHub CLI (
gh) for the clone command below. The linked reproducer is self-contained and uses only Python standard-library modules plus Docker. It builds the affected CLI version from the public upstream package/release source and starts a local mock provider; it does not require this repository or any private fuzzing harness. The Docker run is limited to 2 CPUs and 4 GiB RAM by default.Complete self-contained reproducer: https://gist.github.com/N0zoM1z0/00868524c2881f06d0f9044025dacea0
The Gist contains
qwen-tool-executes-after-cancel.reproduce.py. Download and run:gh gist clone 00868524c2881f06d0f9044025dacea0 qwen-tool-executes-after-cancel-reproducer cd qwen-tool-executes-after-cancel-reproducer python3 qwen-tool-executes-after-cancel.reproduce.pyTo reuse an already-built local image:
Key output from a local run against the affected version: