STUPID-2026-0144
Cline's run_commands tool call arrives empty or truncated on the local openai-compatible/llama.cpp route, tripping the loop detector and aborting the run (GitHub #14827)
Instruction given
Using Cline CLI 3.0.68 on Windows 11 against a local llama-server (llama.cpp build b10568, served via the openai-compatible provider, model Qwen3.6-35B-A3B at Q6_K_XL, streaming with tool_choice: auto), the reporter ran `cline "<task>" --json --auto-approve true` for a task that asked the agent to write two files and then run `python -m pytest`.
Expected behavior
Each `run_commands` tool call streamed from the model should arrive with its full, intact argument JSON (the command list to execute), the same way the `editor` tool calls in the same sessions did.
Actual behavior
On the first `run_commands` call after a reasoning-plus-text turn, the arguments sometimes arrived empty (`{"commands":[]}`) or as an unparseable fragment (e.g. `{"commands":[":\""]}`). In one run this happened seven times in a row — two empty calls and five identical fragments — until Cline's loop detector logged "Detected 5 consecutive identical calls to run_commands; stopping to avoid a loop," the three-strikes yolo-mode limit was hit, and the run ended with `run_aborted` / `external_abort` and the message "aborted by another client" (no other client was actually involved). In a separate run the first call was also `{"commands":[]}`, but that run recovered and completed normally. The reporter's own logging proxy captured 16 requests and 2,333 tool-call argument deltas with every stream concatenating to valid JSON, so no corrupted stream was ever caught in transit. Cline maintainer mkondratek found no chunk-boundary bug inside Cline itself, noted that llama.cpp reporting a `length` (token-limit) stop can trigger a repair step that turns a cut-off call into an empty list, and — after reviewing roughly 2 million production responses over two weeks and finding none that matched this shape mid-tool-call — concluded as of October 19 that the problem is probably specific to this local openai-compatible path rather than a general Cline defect. A related fix (PR #14909, making a cut-off call simply not execute instead of running on truncated arguments) remains parked rather than merged because the maintainer's traces don't reproduce the shape; a second PR (#15089) aims to turn a bare empty command list into a visible tool error instead of a silent anomaly.
Damage
No data loss or incorrect command execution is reported — the loop detector's three-strikes limit caught the malformed calls before any of the fragmentary arguments could reach a shell. The user-visible cost is a wasted, non-completing agent run that fails with a misleading "aborted by another client" message, forcing a manual retry. The reporter observed the failure in 3 of 4 direct local runs against 0 of 3 runs through a logging proxy, and as of this writing the issue is open and unresolved: maintainers have not obtained the specific diagnostic data (finish_reason, llama-server slot line) needed to confirm a root cause, and the loop-detection-side fix (#14909) is parked rather than shipped.
Classification
- Agent
- Cline
- Failure mode
- Infinite Loop
- Root cause
- Other
- Domain
- Other
- Source
- Github Issue
Related incidents
Get told when an agent breaks something
We document AI agent failures daily, severity-scored against a published scale. When one lands at 7.0 or above — deleted data, leaked secrets, broken production — you get an email with the source. When nothing does, you get nothing.
This database is callable over MCP — query it from inside your agent.