Repository navigation
feat(subagent): name the live memory-wait bound on the queued chip - #20503
Conversation
887d602 to
c64d70a
Compare
UX Review (Opus 5.5) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS The chip says agents "end without starting", but the same outcome later shows up as "never started", "Error" and "Retry failed". The blind reader couldn't tell these were one outcome. Watch
Suggestions
[UX-REVIEWED] fd5a5c7 Description read[DESCRIPTION-READ] a1b82517f417c9160d67ab58a194a0525eae3934ee9322e187ee8d7e7a2bd8cd That sha256 names everything this verdict read: the PR description, plus the 11 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 |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Check that the chip's "{{limit}}" reads as a total of time spent parked, not a countdown: the pressure hold resets it whenever the lane starts something, so a stuck wave can outlast it. [DESIGN-REVIEWED] fd5a5c7 Description read[DESCRIPTION-READ] b16fff24b94b9c08c93710b0b9b3bec0964370667296de2a9b32d083aaa16fe6 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 Check that "if memory stays short for {{limit}}" is accurate given that the pressure hold restarts the count whenever the lane starts something. What this change shipsInventory (7 items) — 7 justifiedIntent: let a person watching a wave stuck on memory see how long it will wait before giving up, and what to do next. This is an ADDITION; the card and terminal fixes ride along.
[FIRST-PRINCIPLES-REVIEWED] fd5a5c7 Description read[DESCRIPTION-READ] 3a0c4f2d71df599836139b438735aabdad6023427be1d5838964142dbc4f29d4 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: |
c64d70a to
310f147
Compare
|
|
|
|
|
|
|
310f147 to
b43d4a3
Compare
|
|
|
|
b43d4a3 to
5687e4e
Compare
5687e4e to
6ecf45a
Compare
|
|
|
|
|
6ecf45a to
fd5a5c7
Compare
|
|
|
|
|
|
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approved by a maintainer who read the review lane notes and accepted them as follow-up work.
Problem / Motivation
Goal: A subagent that waits for memory says how long it will wait before it gives up, using the live setting.
The queued chip said "starts give up once the pressure outlasts the wait limit" without naming the limit. The low-memory chips gave no give-up time at all. A card for a run that never started still offered "Load output from disk", and the expiry terminal gave no next step. Deferred from the #16347 UX review.
Why it matters
A user watching a stuck wave could not tell if it would wait 30 minutes, a day, or forever. They also got a button that could never load anything, and an expiry message with no next step.
Not a goal
agent.subagent_queue_max_wait_secsitself.posture_criticalchip key the issue names: spawns no longer wait on posture, and that key is gone from the catalogs.What changed (motivation → approach → change)
The chip had no number to show, because the
subagent_queuedframe did not carry the bound. Now the frame for a memory wait (low_memory,memory_pressure) carriesmax_wait_secs. It is read when the frame is sent, throughtaskq_memory_wait_bound_secs, the same reader the sweep and the pressure hold use. So a config reload shows on the next frame. The chip turns it into a plural-aware duration ("30 minutes", "1 hour") and ends all three memory sentences with "they end without starting if memory stays short for {{limit}}". It is a total, not a countdown: the gate counts parked time, and the pressure hold restarts it when the lane starts something. At0the chip says "they wait with no time limit". With no field (an older gateway) it says neither. Thememory_pressuresentence now opens with something the user can do ("close other apps to ease it") and says "other agents finish", since the hold waits on agents in any chat.A card whose run never started for memory now shows "(no output: it never started)" instead of the disk-load button. The expiry terminal now gives a next step: "never started: waiting for memory (not enough memory freed up in time); retry once memory frees up". This rewrites owner wording on purpose: #16845 (filed by the owner) asks for exactly this next step, and the constant's comment now cites it. Both memory terminals open with one shared prefix,
NEVER_STARTED_MEMORY_PREFIX. The wave digest's never-started count and the card'sbackendPhrases.jsonmatch that prefix.All 12 translated catalogs, plus the regenerated pseudo-locale, carry the new keys. User docs and specs quote the new terminal text.
Where:
src/kiro_crew/subagent_manager/run.py: the frame getsmax_wait_secs.src/kiro_crew/subagent_wait_reasons.py: the shared prefix and the new expiry text.src/kiro_crew/slack/gateway.py: the digest's count matches the prefix.src/kiro_crew/constants.py: comment only.src/kiro_crew/docs/(configuration.md,subagents.md,dynamic-subagent-sizing.md): the new terminal text, and the chip naming the limit.website/src/pages/chat/subagentQueuedReason.ts: parses the bound and picks the_limit/_no_limit/ plain sentence.website/src/pages/chat/ActivityViewer.tsx: no disk-load button on a never-started card.website/src/i18n/locales/*.json: the*_limit,*_no_limitkeys andno_output_never_started.Backwards compatibility
Compatible:
max_wait_secsis a new optional frame field, and a client without it renders today's sentence. The terminal text gets longer but keeps its opening words, and every reader matches on those words.Removes nothing: no field, key or path is taken away. The old
memory_pressurecopy is reworded in place.Tests
test_published_queue_depth.py::test_a_memory_wait_frame_carries_the_live_bound: both memory kinds carry the bound as it stands when the frame is sent,0passes through, and a concurrency wait carries none.test_subagent_sizing.py: the re-emitted memory frame carries the default bound.test_admission_gate.py: every catalog has*_limit(with{{limit}}) and*_no_limitforms of each memory sentence, and no number in the pressure copy. Both memory terminals open with the prefix the card matches and end with a next step.ActivityViewer.test.tsx: 30-minute, 1-hour (singular) and 90-second bounds render; a0bound says "no time limit"; an absent bound says neither.ActivityViewerCoverage.test.tsx: a never-started card shows no disk-load button and makes no fetch.Local runs:
tsc -p tsconfig.app.json, eslint,i18n-check,check-i18n-keys,check-i18n-strings, flake8, isort, black, mypy, and the flake and wait-discipline ratchets are clean. The related vitest files pass (319 tests,src/i18n/styleincluded). The related backend files pass (357).Manual verification
I loaded the real built SPA in Playwright, with every API call and the websocket stubbed. I pushed
subagent_queuedframes for the chip, thensubagent_spawnandsubagent_doneframes with the expiry error for the card, and captured both below.Screenshots / video
The chip, memory pressure with a 30-minute bound (dark, light):
The never-started card: the Subagents panel shows "(no output: it never started)", in a readable muted tone, and no disk-load button (dark, light):
Low memory with a 1-hour bound, and with the bound set to 0
Related Issues
Closes #16845
Follow-up to #16347.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)