mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #710] v0.1.38: cross-request tool loop repeats an ineffective repair 98 times despite a thinking budget #327
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#327
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @pellorao on GitHub (Oct 4, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/710
On Strata v0.1.38, a text-only review task entered a cross-request loop of client-executed tool calls, despite an existing per-request thinking budget. The model repeatedly issued the same ineffective repair command and did not complete delivery before the harness deadline.
Opening a standalone issue because #75 and #602 are both closed. Their earlier reports are related history; this report specifically concerns repeated tool calls separated by tool results and subsequent model requests, rather than only repeated thinking text within one response. The root cause has not been isolated.
Observed behavior
During one text-only code/document review, the model drafted a JSONL report, then repeatedly attempted the same ineffective JSON repair:
incomplete; total reviewer elapsed time was 3,600.738 seconds. The syntactically valid draft was retained and was not treated as a completed delivery.This was continued model/tool activity, rather than an engine that stopped emitting tokens. We did not repair the draft ourselves or rerun the task to replace the failed observation.
Environment and relevant settings
medium.temperature=0,top_p=1,top_k=20,reasoning_budget_tokens=4096,max_tokens=16384.--spec-min-p 0.7(this is not the samplingmin_psetting).Reproduction scope and distinction from other reports
This is one directly observed failed instance, not a measured failure rate or a deterministic minimal reproducer. The original task was a substantial multi-file review requiring a structured report and validation. Full private session logs and task contents are not attached; the counts above were checked against those logs and preserved drafts.
The behavior resembles the repeated verification/tool calls reported in #602. It differs from #606's persistent single-character output on subsequent independent requests, and from #702's repeated sentences/thinking in ordinary chat. We have not established a shared root cause. Since this run used greedy sampling, it also does not establish whether the recommended sampled thinking settings prevent this behavior.
Questions for mitigation
max_roundslimit appear to address different boundaries.A warning produced partial recovery in this instance, but did not produce completed delivery. We are therefore reporting both the recovery and the remaining failure, without claiming that reminders alone prevent recurrence.
@BlueKingMuch commented on GitHub (Oct 6, 2026):
With
temperature: 0every request is decoded greedy: the model always takes its single most likely continuation, and when the context barely changes from one request to the next (the same failure appended again), that stays the same repair. A per-request thinking budget can't break that, and a config"sampling"block wouldn't either, because a request's owntemperature: 0wins. Earlier Qwen3 model cards warned explicitly that greedy decoding can lead to endless repetitions; for this model Qwen recommends temperature 1.0, top_p 0.95, top_k 20 in thinking mode. If your adapter sends that instead, the next attempt gets a chance to take another path. See also #728.@pellorao commented on GitHub (Oct 7, 2026):
Thanks @BlueKingMuch for the sampling suggestion. We completed a follow-up comparison on Strata v0.1.40.1 / engine v0.1.40, with Codex 0.160.1. In this workload, the suggested settings did not reduce the observed looping, so we are keeping our existing sampling settings for now.
This was the same frozen, substantial text-only Commit Audit task, with three independent runs per condition. It is a follow-up experiment, not an exact replay of the original v0.1.38 failure: this batch used Q2_0, high effort, the default expert profile with saving disabled, an 8192-token thinking budget / 24576 total output budget, and a 100000 compaction threshold / 156584-token window. Windows-native Strata/CUDA and the WSL Codex harness remained in the path.
Within each machine, hardware and other settings stayed fixed. The baseline excluded only our explicit loop-prevention prompt block. The prompt arm added that block; the sampling arm instead used temperature=1, top_p=0.95, top_k=20. Both retained the same task-completion instructions and compaction policy. Baseline and prompt sampling were temperature=0, top_p=1, top_k=20. We checked the actual sampling path/settings, rather than only changing a configuration default.
The local host has an i9-14900K / 64GB RAM; the remote host has an i9-13900 / 64GB RAM. We compare each intervention only against its same-host baseline; the two machines are not treatment/control partners.
Counting: these are manually classified groups of repeated no-progress reasoning or tool actions, not raw tool-call counts. Each group's count includes its first occurrence; the total sums all confirmed groups. We deduplicated native event mirrors and excluded genuine fixes, new relevant evidence, ordinary mapping of different requirements, and necessary harness recovery. Reasoning can contain several observable repeated decisions inside one item, so semantic segmentation involves judgment.
The prompt arm's lower mean iteration count (136.7 -> 32.7) is dominated by one baseline run's 379 consecutive repeated normalization lines. Its median rose from 17 to 25, and loops occurred in all three prompt runs. This is at most a possible indication of less extreme repetition, not evidence of consistent prevention.
On the RTX 3080 Ti, mean loop groups rose from 4.3 to 9.0 and mean total iterations from 36.7 to 60.0 with the suggested sampling. Mean work time also rose by about 8.8%. The limited batch therefore did not show the hoped-for benefit; it does not prove that sampled thinking is worse for other tasks.
For completeness, the sampled arm's mean internal engine output rate was approximately 79.8-85.1 token/s, versus 86.2 token/s for that host's baseline. Its per-run internal generated-token counts were 134365-150731, 163988-172180, and 79074. The first two are possible ranges: one resumed after an unexpected reboot and lacks one generation stage's final counter; another hit the 60-minute task deadline with an unfinished guardian stage. Bounds use retained internal counters, actual request budgets and timing evidence (including the assumption that retained server/native UTC clocks are comparable), not API usage or guessed midpoint counts; they are not confidence intervals. Downtime is excluded from work time, but the reboot changed cache conditions. These failures remain in the results and were not rerun to obtain better outcomes.
We will retain the current sampling parameters and loop-prevention prompt, without claiming the prompt is a validated optimization. The review results remain diagnostic rather than formal capability acceptance. We are sharing this as a workload-specific counterexample and feedback on the suggestion, rather than an isolated Strata-only reproducer or a general rejection of Qwen's recommended settings.
@BlueKingMuch commented on GitHub (Oct 7, 2026):
Thanks for testing it this carefully. That settles my suggestion for this workload: sampling didn't reduce the loops. So the defaults I proposed in #728 should be read as the model's published settings, not as a loop fix.
On your first question: 0.1.40 added an opt-in
"reasoning_loop_recovery"setting instrata-<model>.json(#869, off by default, see DETAILS). It only looks at the reasoning of the reply being generated:"stop"ends a reply whose reasoning repeats whole passages,"recover"(only at high or xhigh effort) continues it once with the low-effort instruction. It doesn't see a loop of tool calls across requests like the one in your report, and I don't know of anything in Strata that does.On your second question: if I understood correctly, both batches ran Q2_0. On ISTA-DASLab's published tests it reaches a task average of 89.1 against the full model's 93.1, with the largest gap on LiveCodeBench v6 (81.1 against 87.4), while IQ3_XXS reaches 92.6 and IQ3_S 93.3; on 64 GB of RAM all four sizes fit (MODELS.md). In #728, RobinMeyer's loops stopped after he switched from Swift 1.5 IQ2_XS to the standard IQ3_XXS, though that changed the model as well. Repeating your greedy baseline on one host with IQ3_XXS or IQ3_S instead of Q2_0 would show whether the quantization is a large part of the looping.
@BlueKingMuch commented on GitHub (Oct 7, 2026):
additional context: i never ran quantizations below IQ3_XXS, just right now I am testing IQ3_S with the "oh my pi" harness, where I run a blender design benchmark.
in this setup, i could not observe tool looping behaviour, but rather tool editing errors, where the model repeatedly guesses line positions wrong and needs sometimes 2-3 retries with re-reading the file it wants to edit:
@Niko1221 commented on GitHub (Oct 7, 2026):
Closing as a duplicate of #728: the repeated tool call across requests is a client-executed loop, so it lives between your adapter and the model, and the per-request loop recovery in 0.1.40 does not see across requests. If you have the request logs showing the model itself repeating, please open a new issue with them.