Repository navigation
fix(chat): say when a promised follow-up has nothing to wake it - #23248
Conversation
|
Coupling with #18285, noted so neither PR merges blind. This PR decides "nothing will wake the session" from the wake-arming tool list plus the runtime probes. On the claude backend, a Bash call with |
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS The change only adds a notice and probes nothing new, and every probe that fails stays quiet. A wrong regex match costs one extra info row, and a revert removes it cleanly. Notes
[DESIGN-REVIEWED] cab4b2d Description read[DESCRIPTION-READ] bbd40967181b801c8878dd5a60d88d8967caa9f35293be9346e9bbf53b5fbf0f 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 (7 items) — 7 justifiedIntent: when the agent promises to report back later and nothing will wake the session, the person learns that no follow-up is scheduled (FIX, #23243).
[FIRST-PRINCIPLES-REVIEWED] cab4b2d Description read[DESCRIPTION-READ] 7b15917bc703cad8f8584fb7a285bbf7b4d64edc7e1cbbb57ac16cce4e4e3985 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: |
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: |
d84e021 to
cffbd9f
Compare
|
cffbd9f to
1e6037a
Compare
|
Rebased: resolved a conflict with main (#22682 moved the turn-end chain into |
1e6037a to
d6ddd1b
Compare
|
|
|
7704f0e to
9285426
Compare
|
Follow-up to the rebase onto #25040, pushed as #25040 counts a sub-agent result waiting in the slot queue ( Fix: Local checks: 1149 passed at |
|
Holding on 9285426 for one unanswered AI finding. Both items from my r128 review are done: #24916 records the Unanswered current-head GPT finding. The GPT 6.1 lane on this head says the notice is decided and persisted in The rest reads sound: every unknown probe fails toward no notice, unnamed tool calls count as armed, and checks on this head are green. — crew-pr-reviewer (r131) |
iamwhatever
left a comment
There was a problem hiding this comment.
Requesting changes at 9285426e01d2462b13ca7b1092da8ccdf3d59dd9 for one untracked follow-up. The r128 items are done (#24916, cron-cache rebuttal), every probe fails toward "something is scheduled", and CI is green.
To clear:
- GPT 6.1 F1 is correct: the notice is appended in
_turn_ending_chainand persisted before_turn_stop_hookcan queue a continuation (chat_runner.py#L1038-L1041, turn_ending.py#L546-L559). With a blocking Stop hook the person is told nothing will wake the session while a continuation is about to run. It is rare and the next turn contradicts it, so deferring is fine, but please fix it now or open an issue for it and link it in the description.
AI findings judged non-blocking:
- Opus note (filler slot matches "I'll help you follow up with the vendor"): a heuristic false positive; the notice's claim that nothing is scheduled is still true there (chat_utils_turn_text.py#L209-L218).
- Design note (English-only detector): a doc nit; other languages fail safe to the old silence.
- Design note (notice suggests a monitor even if denied): wording nit; it also says to send a message (chat_utils_turn_text.py#L321-L326).
- First Principles item 5 (
_bare_tool_nameduplicates a Slack helper): style; the Slack helper also strips aRunning:prefix (chat_utils_turn_text.py#L258-L260).
— crew-pr-reviewer (r132)
9285426 to
c531c00
Compare
|
|
@iamwhatever Re the r131 HOLD (comment): I took the second option and pushed it as
Could you re-review and clear the CHANGES_REQUESTED when you have a moment? |
c531c00 to
bafc69d
Compare
|
@iamwhatever Following up on the r131 HOLD (comment): #23248 conflicted with main, so I rebased it once. The new head is
The GPT disposition for the Stop-hook finding is here. Could you re-review and clear the CHANGES_REQUESTED? |
bafc69d to
cab4b2d
Compare
|
iamwhatever
left a comment
There was a problem hiding this comment.
Approve at cab4b2d. This clears my r132 change request.
The r132 item is fixed: the notice now stays quiet when any enabled Stop hook (stored or from the agent spec) is configured, and an unreadable hook store also counts as one (turn_ending.py#L49-L64, used at L579). The later Opus finding is fixed too: any entry waiting in the slot queue now counts as a wake (chat_utils_completion.py#L262-L270). Both come with tests that pin them. The run_in_background follow-up is tracked in #24916. Every probe still fails toward no notice, all AI lanes are clean on this head, CI is green and the branch merges cleanly with main.
AI findings judged non-blocking:
- Design Review (PASS note): the notice suggests a monitor rather than a check-back. Wording nit; the notice also tells the person they can send a message (chat_utils_turn_text.py#L321).
— crew-pr-reviewer (r134)
Problem / Motivation
Goal: When the agent ends a turn saying it will report back later and nothing is set up to wake it, the person sees a notice that no follow-up is scheduled.
The agent ends a turn with "I'll report back when the build finishes" or "I'll watch the pipeline and act when it is green". The turn arms no monitor, scheduled job or background run, and none is running. Nothing wakes the session again, so the update never arrives, and the person learns this only by writing again (#23243).
Why it matters
People take the promise at face value and walk away. Two users reported the silence in two days. It looks like the agent broke, when in fact nobody asked it to come back.
Not a goal
What changed (motivation → approach → change)
Symptom: a promise of a later update, with no wake behind it, ends the turn silently. Cause: the runner's two existing checks cover only "I'll do it now" and "I'm still working", not a promise deferred to a future event.
Approach: at turn end the runner now checks four things. If all four hold, it appends one info notice and changes nothing else.
has_deferred_followup_promiseinchat_utils_turn_text.py[OPTIONS:]stripped; skips user-gated ("let me know when you're ready and I'll…") and negated formsturn_armed_a_wakemonitor_*,cron_add/update/resume/trigger,register_hook,spawn_run/continue,workflow_*ortask_runcall;waitis excluded because it blocks inside the turnbackground_wake_absentinchat_utils_completion.py_stop_hook_configuredinchat_turn/turn_ending.pyThe first four probes moved out of
chat_done_payloadintobackground_wake_pending, so the completion sound and the new notice share one answer. The arm inchat_turn/turn_ending.pyis anelifafter the "still in progress" notice, so a turn gets at most one of the two. Slack-born turns run through the same runner. The session spec (docs/system-specs/modules/session.md) and the chat_utils module map document the notice.Backwards compatibility
Compatible: one new info notice on turns that previously ended with no row.
chat_done_payloadreturns the same verdict from the same probes.Removes nothing: the probes moved into a shared helper, and every probe is still read.
Tests
test/test_deferred_followup_notice.py:wait/spawn_steer; a malformed identity, or a call whose frame names no tool (claude-agent-acp, opencode), counts as armed;monitor_startran, when background work exists, and on a finished answer.Proof: with only the runner arm disabled,
test_unbacked_promise_gets_the_noticefails and the other runner tests still pass. Determinism: 5 serial repeats, plus-n 4alongsidetest_facade_mirror_guards.pyandtest_campaign_facades_base_public_names.py, all green.Manual verification
N/A — the runner tests drive the real
_run_chatwith a scripted stream, which is the path a live turn takes.Related Issues
Closes #23243
Part of #9928
Follow-up: #24916 counts a Claude
run_in_backgroundBash call as a wake once agent-started turns are shown (#17566). Today the notice is accurate for that call, because #18285 shipped the transport only.Sibling sweep
Swept:
git grep -nE "has_unfinished_progress_claim|is_promise_only_terminal" -- src/Sibling: src/kiro_crew/dashboard/chat_turn/turn_ending.py -- changed here
Sibling: src/kiro_crew/dashboard/chat_utils_turn_recovery.py -- not affected -- it decides recoveries for immediate promises only, and this arm never recovers
Pattern harvest
Not generalizable: the defect is one missing turn-end text claim (deferred promise), not a class a static rule can catch.
Checklist