Repository navigation
fix(crew): the crewmate chat draws messages only, not runner notices - #19114
chenmingwei23 merged 2 commits into
Conversation
isCrewmateChatRow now drops every notice row whatever its meta.kind, so a crewmate's DM shows the person's rows and the crewmate's speech only. An arm refusal in a member session is also queued for the crewmate's next turn as an injected message, since a notice row is never replayed to the model; other sessions keep the person-facing notice row. Fixes kirodotdev#18669
UX Review (Opus 5.5, fork) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS A refused automation loop now goes silent in the crewmate DM: the person only learns about it if the crewmate chooses to mention it. Watch
Suggestions
[UX-REVIEWED] 396b27d Description read[DESCRIPTION-READ] e52ed6f98aa970ccf524bb5a4c683b2ab8c785a52112d2262ee1f9aa1577d4b0 That sha256 names everything this verdict read: the PR description, plus the 3 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, fork) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS The crewmate never saw the notice even on main, yet the fix also re-routes it into a new agent turn that carries wake authority. The Goal never asked for that. Not justified as shipped
What this change shipsInventory (6 items) — 2 justifiedIntent: keep runtime machinery notices out of a crewmate's DM. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] 396b27d Description read[DESCRIPTION-READ] 7d2cef0c958a09f617ca7cbee5a2aeb85e5b8233668516c0c8f25e5230ef2014 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5, fork) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS The re-routed refusal opens a new crewmate turn that also inherits self-wake authority, and nothing limits how often that cycle repeats. Watch
Suggestions
[DESIGN-REVIEWED] 396b27d Description read[DESCRIPTION-READ] 07d46f7d88a1ac332e6135f91da65b335f6896e9a0b91a04ce6c094ad19824e4 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 |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed |
GPT 6.1 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
f0a8335 to
a1f943b
Compare
|
On the first-principles note about the base spec pin: this diff updates that pin in the same commit — |
a1f943b to
8b4905f
Compare
…ilter
Address review on the crewmate-notice change:
- hide crewmate-chat notices by an allowlist of machinery kinds
{empty_turn, arm_refusal}, not by role, so a person-actionable notice
(a dropped queued message, a model-fallback hint) keeps drawing.
- tag the refusal notice with meta.kind so the allowlist can match it, and
queue the crewmate copy with a system-injection kind so it drains as an
inject row, never a user row shown as the person's own bubble.
- update the session spec to describe the allowlist drop and the queued
refusal.
8b4905f to
396b27d
Compare
Problem / Motivation
Goal: stop a crewmate's chat drawing runtime
noticerows (the automation arm refusal), so it shows messages only.A crewmate's chat is meant to show messages only — the person's rows and the
crewmate's speech. It still drew runner
noticerows:isCrewmateChatRowdropped a
noticeonly when it carriedmeta.kind = "empty_turn", so any othernotice (the automation arm refusal written when a loop update is refused) still
rendered as a yellow bar inside the crewmate's DM.
Reproduction on
main: a crewmate that callsmonitor_updateon a loop that hasalready ended gets
_surface_arm_refusalwriting anoticerow ("Automationupdate refused: a stopped loop cannot be restarted by updating it…"), and
isCrewmateChatRowdraws it because its tag is notempty_turn— confirmed bythe module's own comment ("A
noticerow with any other tag … still draws") andthe test that pinned
isCrewmateChatRow({role:'notice'})astrue.Why it matters
A
noticeis the runtime talking about its own machinery; a person reading acrewmate's DM has nothing to do with it. The maintainer recorded on 2026-10-09
that this surface shows messages only; #18672 captures that decision in
docs/decisions/and names this PR as the code change that applies it.Who else is affected: only the member-mode crewmate DM changes — the notice no
longer draws there, and the same information now reaches the crewmate (its next
turn) instead. No other session's notices change and the Sessions page still
draws notices as today, so this is a narrow fix that keeps the surface's intended
design, not a default-behaviour change for users who were not asking.
Not a goal
person-facing
noticerow as its only surface.docs/decisions/(that is docs: record that the crewmate chat draws messages only #18672).What changed (motivation → approach → change)
The crewmate chat must stop drawing the runtime's own notices → but a
noticerow is never replayed to the model, so simply dropping it would lose the arm
refusal for both the person and the crewmate, and dropping EVERY notice would
also hide ones the person must act on → so the chat hides notices by an
allowlist of machinery kinds, and the refusal is re-routed to the crewmate as a
system injection.
This deliberately narrows the issue's literal acceptance ("
isCrewmateChatRowreturns
falsefor everyrole === 'notice'") to the two machinery kinds{empty_turn, arm_refusal}. A blanket role-drop also removes person-actionablenotices that have no second route — a dropped queued message, a model-fallback
hint ("pick another model"), a "request not applied" warning — which review
flagged as a regression. The allowlist matches the issue's actual intent (the
arm-refusal case) while keeping those notices visible.
website/src/components/chat/crewmateBubbles.ts:isCrewmateChatRowhides anoticeonly when itsmeta.kindis inCREWMATE_HIDDEN_NOTICE_KINDS(
empty_turn,arm_refusal); every other notice draws.src/kiro_crew/dashboard/session_directive_apply.py: the refusal notice istagged
meta.kind = "arm_refusal"so the allowlist can match it; and in amember session the refusal is queued with
AUTOMATION_NOTICE_KINDso itdrains as an
injectrow (not auserrow shown as the person's own bubble,and never counted as a user follow-up), carried on the crewmate's next turn.
When the refused directive was itself the loop's own wake, the originating
self-wake flag and loop id are stamped on the (non-durable, never-persisted)
entry meta so the successor turn inherits them — a crewmate that retries
monitor_stopfrom that turn still hits the stale-wake guard instead ofsilently removing a paused loop record a person kept.
src/kiro_crew/dashboard/chat_utils.py,chat_turn/steer_queue.py,chat_runner.py: registerAUTOMATION_NOTICE_KINDas a system-injection kind(
_SYSTEM_INJECTION_KINDS,_QUEUE_KIND_ACTORS→autonudge), map it to aninjectrow withinjectKind: "automation_notice"at drain, and rebuild thewake provenance (
_directive_self_wake/_directive_loop_id) on thesuccessor turn from the live entry meta only.
website/src/pages/chat/RecoveryCard.tsx,store/chat/selectors.ts,src/kiro_crew/dashboard/state.py: classifyautomation_noticeas a turnOPENER (
INJECT_KIND_OPENS_TURN,TURN_INJECT_DISPATCHED,_TURN_INJECT_KINDS)— the drain dispatches a real turn for it, so interrupt-recovery and
session-start-failure counting must land on it, not an earlier reply.
website/src/pages/chat/transcriptRenderers.tsx,crew-window/crewWindowRenderers.tsx,test/chatRolesParity.contract.test.ts:suppress the
automation_noticeinject row on every surface that drawsinjectrows (the Sessions page,render:()=>null) — model-only machinerythe refusal's own
noticebar already shows; registered as a documentedpage-only / peer-safe entry. The crewmate DM already hides it via
MACHINERY_ROLES.docs/system-specs/modules/session.md: update the spec to describe theallowlist drop, the queued refusal, and the suppressed inject row.
Backwards compatibility
Compatible. Only the member-mode crewmate DM behaves differently (a notice no
longer draws there and is instead delivered to the crewmate). Every other
session, and the Sessions page, is unchanged. No schema or config change.
Tests
website/src/components/chat/crewmateBubbles.test.ts: pins that only themachinery kinds
{empty_turn, arm_refusal}are hidden and that aperson-actionable notice (model-fallback) and an untagged notice still draw —
fails if the filter goes back to a blanket role drop or the old
empty_turn-only tag.test/test_monitor_directive_apply.py: a refused update in a member sessionwrites the person-facing notice tagged
arm_refusalAND queues the refusalstamped
AUTOMATION_NOTICE_KIND, which classifies as a system injection(drains as an inject row, counts as orchestration not a user follow-up) with
the
autonudgeactor; in a plain session nothing is queued (notice only).website/src/test/RecoveryCard.test.tsx: pinsautomation_noticein theINJECT_KIND_OPENS_TURNtable as not opening a turn.test/fixtures/crewmate_speech_rows.jsontwin (is_speech_row/isCrewmateSpeech) is unchanged: anoticeis not a speech row on either side.Local:
crewmateBubbles.test.ts,RecoveryCard.test.tsx,test_monitor_directive_apply.py,test_mcp_apps_message_endpoint.py,test_chat_runner_composition_contract.py,test_start_priority.pyandtest_members_preview_speech_only.pypass, plus tsc, eslint, mypy, black, isort,comment-history and docs-lint. CI runs the full cross-surface set.
Manual verification
N/A beyond the automated tests — the change is a render-time filter plus a
best-effort queue append, both covered above.
Screenshots / video
Why no screenshot: the only visual effect is the REMOVAL of a runtime
noticebar (the arm refusal) from the crewmate DM — there is no new layout,theme, or component to show, and the row the change deletes only appears in a
live member-mode session after a monitor arm is refused. The behaviour is pinned
instead by the
crewmateBubbles.test.tscases, which assert the notice row nolonger draws.
Related Issues
docs/decisions/(the design record); thisPR is the code change it names.
closed; this change settles it.
Pattern harvest
Rule candidate: review-prompt — flag a blanket role drop (
role === 'notice')added to a render/visibility filter when sibling rows of that role carry a
distinguishing
meta.kind. Keying the filter on the ROLE hides a whole class,including rows outside the fix's intent; an allowlist of the machinery KINDS
shows a new row kind until it is deliberately classified.
Pattern: per-surface visibility keyed on role, not on an allowlist of kinds.
Fixes #18669