Repository navigation
Replies: 2 comments
|
Companion report: #12912. The bash output rewrite is one amplifier of this loop. |
|
Adding a code-level location and measurement evidence for the "no per-turn budget" half of this report, plus one extra amplifier that is easy to miss. The exact termination condition — 350 while (true) {
353 const decision = await this.preStep(target, { turn, step })
359 if (turnEnds && decision.messages.length === 0) break
376 const stepEnd = await this.step(decision) // this is what sets turnEnds
401 if (turnEnds && this.inbox.nextStep.length === 0) { /* agent/turn-stopping */ }
405 if (turnEnds && this.inbox.nextStep.length === 0) break
406 target = 'next-step'
}
How structural it is. I sliced one session's projected context timeline by user message ( Extra amplifier: plugin feedback committed as a user-role message. In dsh-ops #929 a plugin injected its "you violated batching rules" notice as a This matters for the proposed no-progress nudge: if that nudge is itself delivered as a user-role, history-committed message, it reproduces the same pattern. A system/developer channel, or a notice that is not committed to history, avoids it. Nothing to disagree with in your suggested fixes — a configurable per-turn |
Uh oh!
There was an error while loading. Please reload this page.
Repo: deepseek-ai/deepseek-harness
Affected:
@deepseek-ai/dsh0.2.2-rc.1 (desktop),@deepseek-ai/dsh-agent-loop0.2.2-rc.1, LinuxSeverity: Medium-high. It burns time and tokens, floods the user with duplicate answers, and the user can only stop it by interrupting.
What happened
User request (one turn): "Sorted column turns grey; remove that and keep the per-cell colours."
7d61c07.857cd0fis pushed. The task is done here.git fetch; git rev-parse HEAD origin/preview; git status --short, run ~10 times, identical output (HEAD=857cd0f REMOTE=857cd0f DIRTY=0)grep bodySortBgon the build output, repeatedNo new file changes, commits, or facts were produced after ~13:55.
Root cause (shared)
Model side (primary): the model had no "done" state. It kept treating "verification unchanged" as "not yet confirmed" instead of "confirmed". The preset's system instruction "keep calling tools while a tool could still advance the task; do not end the turn early" has no exit for "nothing left to do". Once the work is finished, the only tool call that can still "advance" anything is another verification, so the rule drives the model into a loop.
Harness side (amplifier, the subject of this issue):
repeat-tool-reminder(see repeat-tool-reminder: identical failing tool calls looped 52x — please escalate the reminder into a circuit breaker #11227), but it keys on identical arguments. Here the commands varied slightly each time (git statusvsgit status --short | grep -v '^??', a differentgrepon the same output, pytest with and without--no-cov,vitest run src/pagesvssrc/pages/Topology), so it never fired. What should be detected is "no new information", not "same arguments": same command family, same result, no workspace change.agent-loop/README.mdstates "No built-in turn budget" (also noted in Long tool loops can finish a turn with no visible reply #12741), so the loop ran unbounded until the model happened to stop.Suggested fixes (harness)
Repro sketch
git pushallowed).git status/ tests and re-posting the summary in the same turn.path:line:frames (issue 01), because the model then distrusts results.Additional evidence: the harness itself pushes a finished turn to continue (2026-11-11)
After a small task was fully finished (feature committed and pushed, lint, 38 tests and build green, report written), the turn ended with a short final message that made no tool calls. The harness then injected this message into the user turn:
The task was in fact complete. The only thing left unfinished needed the user (a manual CI trigger the agent has no credentials for). This nudge uses a heuristic: a final message with no tool calls is treated as "not finished". That is the same pressure described in the root-cause section above. It forces at least one more tool call, and the only call available at that point is another verification. The 54-minute loop runs on exactly that pattern.
Suggested fix: do not fire this nudge when the agent's last message reports completed work, or when the previous step already verified it. At minimum, cap the nudge at once per turn, and let the model end the turn by stating that the task is complete.
Related
Notes
invalid arguments: missing required property "description"/"command". That is the model's fault and is not part of this issue.All reactions