Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Qwen Code executes repeated identical tool calls #5015

Copy link
Copy link

Description

@N0zoM1z0
Issue body actions

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
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    category/coreCore engine and logicCore engine and logiccategory/toolsTool integration and executionTool integration and executionpriority/P1High priority issueHigh priority issuestatus/needs-triageIssue needs to be triaged and labeledIssue needs to be triaged and labeledtype/bugSomething isn't working as expectedSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.