Repository navigation
feat: prioritize human messages in crewmate chats - #20240
Conversation
First Principles Review (Opus 5.5) — ✅ human override accepted@buluoray overrode this lane for |
Design Review (Opus 5.5) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS A plain chat message now cancels a running crewmate turn on its own, even in the middle of a tool call that changes something, and nothing asks whether that tool is safe to cut short. Watch
Suggestions
[DESIGN-REVIEWED] b8901ba Description read[DESCRIPTION-READ] 99fb770ed33aeef765a0a29dfb336cb70a3f175d8a8cdd9ab17281f0b5a99fcf 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 |
UX Review (Opus 5.5) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS Send can pause the crewmate's running work, and nothing tells the person it will; the blind reader worried their question caused the interruption. Watch
[UX-REVIEWED] b8901ba Description read[DESCRIPTION-READ] 4e7d7bb0317f745511d37e29d35c18561236a4742c4e65e28a5c9a51ea7e1c1d That sha256 names everything this verdict read: the PR description, plus the 12 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 |
22f80e6 to
151e0cd
Compare
GPT 6.1 Review — ✅ human override acceptedHuman judgment by @buluoray overrides the GPT 6.1 finding for [GPT-OVERRIDE] b8901ba This comment is updated in place on each push. The model was not re-run because an authorized human decision supersedes it. False positive or not applicable? A repository writer can comment: |
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: |
151e0cd to
32c9648
Compare
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray]: Sensitive change review
|
32c9648 to
9b1aba1
Compare
9b1aba1 to
8a181fd
Compare
2536a36 to
22c13d3
Compare
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray]: Sensitive change review
This head is a no-conflict rebase of 2536a36 onto current main; |
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray]: Sensitive change review
This head rebases onto current main and restores main's Stop control and stop card in the crewmate composer and chat (frontend only; the redaction sink above is unchanged). Re-run on it: 514 related backend tests (responsive, security posture, composition contract), 2907 related frontend tests, tsc and docs-lint. |
Human judgment recorded@buluoray marked the first-principles AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
|
|
|
|
|
|
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray]: Sensitive change review
This head rebases onto current main and fixes two review findings outside the redaction sink, which is unchanged: a waiting send whose row the capped live window evicted reuses that row instead of writing it again, and the queue-cancel route refuses a send whose row is already written (409, same as edit). Re-run on it: |
Human judgment recorded@buluoray marked the first-principles AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
Human judgment recorded@buluoray marked the first-principles AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
A person's message in a crewmate chat is answered promptly instead of waiting behind the crewmate's background work. Follow-ups found while using the responsive crewmate chat live: - steer a crewmate send into the running turn first; cancel that turn only when the steer is still unconsumed after a 3-second grace, so a short tool call is not thrown away - draw a queued crewmate message as the person's own bubble, so the yellow queue card no longer flashes after Send - reconcile an on-screen crewmate thread when its turn ends, so a reply row that never reduced live does not wait for a page reload - let an interrupted crewmate turn reply before deferrable compaction; compaction above 95% of the context still runs first - register the responsive chat redaction fields in the security posture - Answer a burst of messages once: waiting sends drain as one turn and a send behind the protected answer steers into it without cancelling it. - Resume paused work without blaming the person: the recovery reference marks each tool step finished or unfinished, and the guidance frames the pause as gateway scheduling.
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray]: Sensitive change review
This head is the previous head (90f79a5) rebased onto current main with no code change, to pick up main's fix for |
Human judgment recorded@buluoray marked the first-principles AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
|
/ai-review override gpt b8901ba: Only reachable when one queued send outlives 500 newer persisted rows and a restart (channel_slots.py:726), and the result is one visible duplicate user row appended at chat_runner.py:5368 with the original row kept, so no data is lost or silently corrupted. |
Human judgment recorded@buluoray marked the gpt AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
Problem / Motivation
Goal: Keep a person's crewmate conversation available through a normal Send control while longer work runs, without exposing worker and interruption mechanics in the conversation.
A follow-up currently queues behind work or asks the person to choose steering and interruption controls. The accepted product direction and bounded feasibility measurements are recorded in #20181 (triaged T3).
Why it matters
A conversation should remain usable while its agent works. People should not need to understand execution sessions to ask a follow-up, answer a question, or correct a task.
Not a goal
What changed (motivation → approach → change)
A busy crewmate should accept conversation rather than expose scheduling choices. Its composer keeps main's Stop while work runs and nothing is typed; once the person types, the control is the ordinary Send, never the steer/queue split. The member DM composer therefore sends
responsive: true; the gateway validates owner/member identity, retains the message in the existing queue, and steers it into the running turn first. Only when the steer is still unread after a 3-second grace does it make one bounded exact-owner cooperative cancellation attempt, so a short tool call is not thrown away. A harness without steer support, or a steer the backend refused, has nothing to consume, so that send queues and cancels at once. Waiting sends write their rows in send order even while an earlier send's cancel claim is in flight. Waiting messages drain as one turn, so a burst gets one reply. Turn-only context asks for an answer first and delegation of substantial remaining work; the recovery reference marks each tool step finished or unfinished and frames the pause as gateway scheduling, not something the person did. Native question answers retain steering into their waiting turn. Matching Stop completion resumes retained messages safely.Queue events and cold hydration carry exact send identity, preserve attachments and quotes, and reconcile late receipts without duplicate bubbles. In a crewmate chat a queued send stays the person's own bubble where it was sent, instead of a queue card, and the thread re-reads once when a turn ends. A queued cron or app notification never becomes the person's bubble. Runtime notices, interruption badges and worker cards stay hidden; the typing bubble and its one-line current step from main stay, as do questions, errors and approvals. Initial-send nudge and edition-observer behavior is shared with the existing direct-send path. Two supporting changes keep the reply prompt and the thread steady: proactive context compaction is deferred while a human reply is admitted (
check_context_usage(defer_compaction=...); above 95% it still runs first), and the bottom-pinned transcript mounts enough rows to fill the viewport, so a short crewmate thread shows no placeholder flash after Send. The decision is recorded in #20181; there is no accepted dedicated handoff RFC on main.Backwards compatibility
Compatible API: the new request field is optional and only eligible local owner crewmate sends acquire priority. Ordinary Sessions keeps its explicit busy controls; shared queue correlation also prevents optimistic duplicates there.
Reader: website/src/components/ChatPane.tsx:ChatPane -- crew page -- selects normal Send and keeps actionable question/approval surfaces; ordinary panes retain their busy mode.
Reader: website/src/components/chat/crewmateBubbles.ts:isCrewmateChatRow -- crew page -- hides machinery at render time, without deleting transcript rows.
Reader: website/src/pages/chat/transcriptRenderers.tsx -- chat -- ordinary Sessions retains detailed runtime rows and steer badges.
Reader: website/src/store/chat/queue.ts:hydrateQueuedBubbles -- chat -- preserves normalized queue identity and live state; bounded history upgrades do not replay stale queue snapshots.
Tests
Manual verification
An isolated loopback pod denied anonymous API requests (403) and accepted its authenticated browser (200). The real served bundle matched the worktree build. A real text-only model turn produced one POST, correlated queue push/pop, one persisted human row and one assistant reply.
Selective HTTP/WebSocket fixtures on the served SPA verified busy Send, active native answers carrying both
steerandresponsive, retained approval/question controls, delayed receipts, duplicate pop/stale push, and cold reload. The reload regression first reproduced a retained queue entry with nothing visible; on this head a reloaded crewmate chat shows that message once, as the person's own bubble.A second isolated pod on this head ran a real model: a crewmate was asked to run
sleep 30, and a second message was sent while it worked. The second message stayed a normal bubble in place with the typing bubble below it; the accessibility snapshot at 1280px and 390px held none of the queue card's labels. The crewmate answered the second message within about three seconds, then re-ran the paused command. These busy/question/approval cases are simulated states, not claims of a real native approval-hold run. No approval was granted in final QA. Real native cancel/reset timing and non-Linux behavior remain CI/manual coverage gaps. Pods were reclaimed; no live settings or running service changed.Screenshots / video
Real desktop conversation:

390px real conversation:

Send while the crewmate works (real model, this head): the second message is an ordinary bubble where it was sent, the typing bubble sits below it, and no queue card is drawn:

390px, about three seconds later: the crewmate answered the second message and re-runs the paused step:

Composer while the crewmate works (real model, head


1015fa6a4e). Empty draft keeps main's Stop; a typed draft shows the ordinary Send, never the steer icon:390px, same two states:


Question and approval controls on the real served SPA (state simulated)
Decision for the owner
Recorded in rfc-crewmate-responsive-send.md (
accepted, product owner rayrayxu, 2026-10-15): Send steers into a busy crewmate and cancels its turn only after a 3-second unread grace; the composer keeps main's Stop while empty and shows the ordinary Send once typed; the chat hides queue cards, scheduling badges and worker cards, while questions, approvals, errors, the stop card and main's typing bubble stay. The RFC lands in its own PR, so this head's First Principles verdict is recorded with/ai-review override first-principles <head>on the owner's instruction.Related Issues
Closes #20181
Pattern harvest
Not generalizable: the fixes preserve the existing slot ownership, native-question and queue-identity contracts while introducing one member-chat scheduling mode; a new global lint rule would not prove these interleavings.
Checklist
Contribution License Agreement
Contributed under the repository's Apache-2.0 license.