Description
Bug report
A repeated identical tool-call stream causes Crush to execute the same call more than once.
Before/after behavior
Before: the provider stream crosses a duplicate, repeated, or cancelled tool-call boundary.
After: Crush executes tool work that should have been rejected or ignored.
Expected: Crush should bound repeated identical tool calls and avoid repeated side effects for the same request.
Minimal reproducible example
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/d9acc52057e37a82b21c695b3b5a1d90
The Gist contains crush-repeated-identical-tool-call-loop.reproduce.py. Download and run:
gh gist clone d9acc52057e37a82b21c695b3b5a1d90 crush-repeated-identical-tool-call-loop-reproducer
cd crush-repeated-identical-tool-call-loop-reproducer
python3 crush-repeated-identical-tool-call-loop.reproduce.py
To reuse an already-built local image:
python3 crush-repeated-identical-tool-call-loop.reproduce.py --skip-build
Key output from a local run against the affected version:
process_exit=-9
provider_requests=2326
tool_result_counts={'repeat_loop_followup': 2678491, 'repeat_loop_initial': 2324}
late_stream_events_after_stop=0
side_effect_file_occurrences crush-repeated-identical-tool-call-loop.log 'crush-repeated-identical-tool-call-loop': observed=10 expected>=2
REPRODUCED
Version
v0.76.0
Environment
- Repository:
charmbracelet/crush - Version: Crush 0.76.0 - OS/arch: Linux x86_64 in Docker (node:24-bookworm) - Interface: CLI - Provider/model: OpenAI-compatible local mock provider, model gpt-4
Description
Bug report
A repeated identical tool-call stream causes Crush to execute the same call more than once.
Before/after behavior
Before: the provider stream crosses a duplicate, repeated, or cancelled tool-call boundary.
After: Crush executes tool work that should have been rejected or ignored.
Expected: Crush should bound repeated identical tool calls and avoid repeated side effects for the same request.
Minimal reproducible example
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/d9acc52057e37a82b21c695b3b5a1d90
The Gist contains
crush-repeated-identical-tool-call-loop.reproduce.py. Download and run:gh gist clone d9acc52057e37a82b21c695b3b5a1d90 crush-repeated-identical-tool-call-loop-reproducer cd crush-repeated-identical-tool-call-loop-reproducer python3 crush-repeated-identical-tool-call-loop.reproduce.pyTo reuse an already-built local image:
Key output from a local run against the affected version:
Version
v0.76.0
Environment
charmbracelet/crush- Version:Crush 0.76.0- OS/arch: Linux x86_64 in Docker (node:24-bookworm) - Interface: CLI - Provider/model: OpenAI-compatible local mock provider, modelgpt-4