What happened?
A repeated identical tool-call stream causes Qwen Code to execute the repeated call.
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?
Qwen Code should bound repeated identical tool calls and avoid duplicate side effects.
Client information
Client Information
Run qwen to enter the interactive CLI, then run the /about command.
$ qwen /about
Version: Qwen Code 0.17.1
Platform: Linux x86_64 in Docker (`node:24-bookworm`)
Interface: CLI
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/1dfb1464c11634a0dbc0f51baac80fa8
The Gist contains qwen-repeated-identical-tool-call-loop.reproduce.py. Download and run:
gh gist clone 1dfb1464c11634a0dbc0f51baac80fa8 qwen-repeated-identical-tool-call-loop-reproducer
cd qwen-repeated-identical-tool-call-loop-reproducer
python3 qwen-repeated-identical-tool-call-loop.reproduce.py
To reuse an already-built local image:
python3 qwen-repeated-identical-tool-call-loop.reproduce.py --skip-build
Key output from a local run against the affected version:
process_exit=1
provider_requests=793
tool_result_counts={'repeat_loop_followup': 313010, 'repeat_loop_initial': 792}
late_stream_events_after_stop=0
side_effect_file_occurrences qwen-repeated-identical-tool-call-loop.log 'qwen-repeated-identical-tool-call-loop': observed=789 expected>=2
REPRODUCED
What happened?
A repeated identical tool-call stream causes Qwen Code to execute the repeated call.
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?
Qwen Code should bound repeated identical tool calls and avoid duplicate side effects.
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/1dfb1464c11634a0dbc0f51baac80fa8
The Gist contains
qwen-repeated-identical-tool-call-loop.reproduce.py. Download and run:gh gist clone 1dfb1464c11634a0dbc0f51baac80fa8 qwen-repeated-identical-tool-call-loop-reproducer cd qwen-repeated-identical-tool-call-loop-reproducer python3 qwen-repeated-identical-tool-call-loop.reproduce.pyTo reuse an already-built local image:
Key output from a local run against the affected version: