Repository navigation
fix(dashboard): don't tell a productive episode it returned nothing - #20764
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing to check. [DESIGN-REVIEWED] 9f6af58 Description read[DESCRIPTION-READ] 6af90444db349269040e44cae107624ff7706586402319d3e86eaca66e6059df That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing to check. What this change shipsInventory (3 items) — 3 justifiedIntent: when a turn already ran tools, every automatic continuation in that episode keeps saying it continues from the work already done, never "the model returned nothing", so the model doesn't redo side effects. FIX (#13254).
[FIRST-PRINCIPLES-REVIEWED] 9f6af58 Description read[DESCRIPTION-READ] 5c12c9a7cecb94917a25ffd6e74b1bb13d5b4cc7846e7c058589f0a87dece8cb That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
|
Red-before / green-after evidence for Red before - main Green after - this head ( Per-hunk mutation on this head: the wording predicate reverted alone fails the test; the counter predicate reverted alone keeps |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
2fee768 to
de63a98
Compare
|
Rebased onto main |
Rung 2 of the empty-turn ladder chose its notice and continuation body from the current turn alone. With empty_response_max_continues >= 2, a continuation that streamed nothing after a turn that ran tools got the "model returned nothing" notice and _EMPTY_AUTO_CONTINUE_MSG, which the model reads back as an invitation to redo work that already landed. Rung 2's wording branch reads the same episode flag the give-up rung reads, so every continuation of a productive episode keeps the "continuing from what already ran" notice and _ACTIVITY_NO_REPLY_CONTINUE_MSG. The counter branch keeps its per-turn test: the flag is only ever set with the counter at 2 or more, where the productive jump and a plain step agree. Fixes #13254
de63a98 to
9f6af58
Compare
|
|
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: fix (3 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: the empty-response continue rung keeps the productive notice and body for the whole episode, with an updated ladder test. Spec files changed as a ride-along (a minority of the diff on both file count and changed lines), not reviewed as a design decision: docs/system-specs/modules/session.md.
Problem / Motivation
Goal: Every automatic continuation of a chat turn that already did work keeps saying it continues from what already ran, instead of telling the user and the model that the model returned nothing.
With
session.empty_response_max_continuesset to 2 or more, a turn that ran a tool but ended without a closing reply is continued automatically. When that continuation itself streams nothing, the next recovery postsℹ️ The model returned nothing — auto-continuing (recovery 2 of 2).and queues the empty-response continuation, whose text says the model returned an empty response twice. The first turn of that same episode already ran a tool.Why it matters
The model reads both lines back from the transcript. Being told its work produced no output invites it to redo tool calls whose side effects already landed: a second message sent, a second write, a second PR. The give-up card already keeps the "completed steps will not re-run" wording for the same episode, so one episode tells two different stories. Anyone who raised the continue budget above the default of 1 is exposed.
Not a goal
test/test_dashboard_chat.py; the open split series does that.What changed (motivation → approach → change)
A productive episode's later continuation was told the model returned nothing. Rung 2 of the empty-turn ladder in
src/kiro_crew/dashboard/chat_runner.pychose its words from the current turn alone (_empty_activity.productive). The give-up rung readsslot._empty_episode_productivetoo: the flag that remembers an earlier turn of the same episode did work.Rung 2's wording branch reads that same flag, so every continuation of a productive episode gets the "continuing from what already ran" notice and
_ACTIVITY_NO_REPLY_CONTINUE_MSG:continuing from what already ran (recovery 1 of 2)+_ACTIVITY_NO_REPLY_CONTINUE_MSGThe model returned nothing — auto-continuing (recovery 2 of 2)+_EMPTY_AUTO_CONTINUE_MSGcontinuing from what already ran (recovery 2 of 2)+_ACTIVITY_NO_REPLY_CONTINUE_MSGcompleted steps will not re-runThe counter branch keeps its per-turn test and moves exactly as before: the flag is only ever set when the counter is already 2 or more, where the productive step
max(n + 1, 2)and the plain stepn + 1agree. The session spec (docs/system-specs/modules/session.md) records that rung 2 splits per episode, like rung 3.Backwards compatibility
Compatible: only the notice and continuation text that a productive episode's later continuations get changes; no config key, API, stored record or default moves.
Removes nothing: both continuation messages and both notices stay; one path switches from one existing pair to the other.
Tests
test/test_dashboard_chat_empty_response_ladder.py::TestEmptyResponseRetryLadder::test_productive_episode_survives_a_second_continuationalready ran this exact episode (budget 2, a tool turn, two empty continuations) but checked only the give-up card. It checks the second continuation as well: no notice says "returned nothing", one notice readsfrom what already ran (recovery 2 of 2),_EMPTY_AUTO_CONTINUE_MSGis never queued and_ACTIVITY_NO_REPLY_CONTINUE_MSGis queued twice. Its docstring describes that flow.5b7b29f9adwith the product code unchanged, it fails withAssertionError: a continuation inside a productive episode was told the model returned nothing, which invites a redo of tools that already ran.-n0; 10 of 10 at-n 2 --dist loadgroup --max-worker-restart=2besidetest/test_dashboard_chat_empty_response.pyandtest/test_promise_only_recovery.py(-n 2rather than 4 because the shared host was loaded);test/test_dashboard_chat_empty_response_ladder.pyin a shuffled order (seed 18061, 21 ids) green.test/test_dashboard_chat_empty_response_ladder.py,test/test_dashboard_chat_empty_response.py,test/test_dashboard_chat.py,test/test_chat_runner_composition_contract.pyandtest/test_promise_only_recovery.pytogether (453 passed);test/test_flake_pattern_ratchet.py(56 passed). mypy, flake8, isort, the black, comment-history, brand-name and line-cap gates,scripts/docs-lint.shand the repo's semgrep rules on the diff all exit 0.Manual verification
N/A — unit coverage sufficient: the test drives the real
_run_chatand its queue drain through a whole three-turn episode, and the change is two predicates on that path.Related Issues
Fixes #13254
test/test_dashboard_chat_empty_response_ladder.py, where this change's test lives. No other open PR edits the rung-2 lines.Pattern harvest
Rule candidate: review-prompt
Pattern: one rung of a recovery ladder decides its wording from the current turn while a sibling rung reads episode-scoped state for the same decision.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)