Skip to content

feat(members): peer and worker rows in the member thread, no inbox - #10690

Closed
CrysisDeu wants to merge 1 commit into
mainfrom
feat/member-thread-projection
Closed

CrysisDeu wants to merge 1 commit into
mainfrom
feat/member-thread-projection

Conversation

@CrysisDeu

@CrysisDeu CrysisDeu commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Experiment. The minimal scope that superseded the member inbox model (#10527, closing comment). Real PR, mergeable if it holds up under review; opened to see what the reviewers say.

Problem / Motivation

Two crew members cannot talk to each other. A member's DM thread is fenced to the sessions it created, so session_send from the conductor to the autofix member is refused not_creator, and the owner copies the task between the two threads by hand (#10527).

When a worker a member dispatched calls send_message(session="origin"), the message goes to the bell. The origin resolver knows only cron jobs, so a worker's report never reaches the thread that asked for the work.

When a message from another session does land in a member thread today, it is drawn as the person's own bubble with [sent by session X via session_send] in bracket text. Nothing on the row says a colleague spoke.

Why it matters

Members that cannot hand each other work need a person in the middle. Workers that cannot report back need the member to poll. Rows that all look like the owner's own words make the thread unreadable once two agents are in it. The inbox-model RFC tried to fix all of this with a subsystem; the owner's decision is to fix it inside the session model instead.

What changed (motivation → approach → change)

Goal. Let members message each other and let workers report back, on the plain member session transcript, driven by row metadata. No inbox store, no scheduler, no wake slots.

Approach. Keep every existing containment check. Add exactly two send-only exemptions to the ownership fence, stamp who spoke on the row the gateway appends, and let the Members thread draw that row differently. Reuse the steer path the Members page composer already uses for a busy member.

Change, backend (session_control.py, state.py, chat_delivery.py, handlers/messaging.py, mcp_tools/messaging.py).

  • authorize_target: two allows in front of not_creator, both for operation send only. _peer_member_send: a caller whose RESOLVED slot is a member (member- key AND mode == "member") may send to a target that is one by the same test (a squatter or a mode-less restore on a member key is a member at neither end, and sent_by_meta names a sender as a member by the same test). _report_to_creator: a session may send to the session named in its own _created_by. create / stop / close / read stay refused; a member still cannot reach the person's own sessions.
  • send_to_target stamps meta.sent_by = {session_key, title, agent, via: "session_send", member_slug?, child?} on the delivered user row. The record is built by the gateway from the caller's resolved slot, never from the body; child: true is present only when the caller is a session the TARGET created, so the transcript names the relationship (a worker reporting back) rather than the tool the report came through. The text prefix the model reads is unchanged. A sent_by row spends no stateless question card: _ChatSlot.append retires unanswered stateless questions on a live user row because that row is "the user's next message", and a peer's message is not (authored_by_another_session; the frontend's dropStaleStatelessQuestion mirrors it), so the card and its answer channel survive a peer's send the way they survive a nudge. The steer path also re-validates containment in the steer's own tick: deliver_sent_by takes the admission snapshot the caller captured right after authorize_target and compares it with a fresh one with no await before steer_into_running_turn (which does not suspend before client.steer; the ACP transport writes before its first await), so a link or mirror that lands between authorization and the steer refuses the message (notice on the target, SEL denied row, containment_changed 409 to the caller, bell for an origin report) instead of steering under a stale authorization -- the same re-validation the queue's drain performs. The check runs again when a steer comes back unavailable (the RPC suspended and landed nothing) before the message falls through to the queue, and the queue entry carries the ORIGINAL admission rather than a fresh stamp, so the drain re-validates against what authorize_target saw. A peer steer the turn's end never confirmed is requeued with that same admission (_steer_admission, registered beside the author while the steer is pending), not a teardown-time snapshot. A peer's queue entry is not the user's to edit: queue_edit_by_id refuses an entry carrying sent_by (the rewritten text would be attributed to the peer), the edit endpoint answers peer_authored 409, and the queue card (live from deliver_sent_by or from the requeue of an unconsumed peer steer, or hydrated -- all carry sent_by) offers no edit and hides the provenance line; cancel stays available. A peer's message queued behind a busy target broadcasts its queue_push card (enqueue_or_run_prompt(on_queued=...), display-safe body with the provenance line stripped), because the client rebuilds the drained row from that card on queue_pop and no composer drew one. The steer path has the same rule at its own retirement point: the consumed echo that settles a steer retires the card only when a settled steer was the user's own (_settle_consumed_steers reads _steer_sent_by, which for that reason lives as long as the steer is pending instead of being dropped when the accepted steer stamps its row). An untitled caller yields an empty title (the sidebar placeholder is not a name), so the row reads with the localized "another session" fallback. sent_by is a gateway-only key (state.GATEWAY_STAMPED_META_KEYS): POST /api/chat drops it from client-supplied meta at its one ingress (strip_reserved_client_meta, ahead of every reader of that dict), a connected peer crew's relayed or adopted rows drop it beside the peer's mid (remote_relay.peer_row_meta, used by _apply_row and prepare_backfill_rows), and the live frames a peer mirrors lose sent_by / sentBy / meta.sent_by before the local broadcast (_strip_peer_frame_provenance), because a forged or peer-stamped record would otherwise persist and draw as "From ".
  • deliver_sent_by: a BUSY member is steered into its running turn (steer_into_running_turn, the same primitive busyMode="steer-only" uses; the owner's scope asks for exactly this -- a peer's message reaches the member while it is still working on what prompted it, instead of after the turn); a member whose turn has no steer-capable client, and every non-member target, keeps the queue. Busy means a live turn OR a multi-stage plan between stages (_in_stage_execution, the composer's own predicate), so a delivery never starts a turn that overwrites a plan. This is a change to enqueue_or_run_prompt itself and therefore reaches its other callers too — the Slack heartbeat prompt, the issue-radar wake and the workflow-finished auto-turn (server.py, the "user is waiting" prompt) now queue behind a mid-plan slot instead of starting a turn over it. Intended for all three: the invariant is the slot's, not the caller's — a turn started between plan stages overwrites the plan whoever asked for it, and the queued prompt runs when the plan ends. The session_send MCP tool now reads steered and tells the sender its message was injected into the running turn, instead of the false "runs when the current turn ends". A peer-authored queue entry drains ALONE (carries_sent_by, beside carries_attachments): the drain's merge unions entry meta last-writer-wins, and a merged row would attribute every line to one author. The immediate path broadcasts the user row (broadcast_user=True) because no composer rendered it. steer_into_running_turn gained sent_by: stamped on the row, echoed on the steer_push frame as sentBy, and kept in a _steer_sent_by map in lockstep with _steer_send_ids, so a steer the turn's end never confirmed is requeued WITH its author and WITHOUT the human-composer exemption (directive_user_origin=False): the drained row still reads "From ", and a channel link the target gains before the drain drops it like any other cross-session prompt. enqueue_or_run_prompt gained meta / broadcast_user, and the queued path unions the meta into the entry the drain already copies onto the row.
  • send_message(session="origin"), non-cron caller: the MCP tool forwards a STRICTLY resolved session key (same bar as a channel send) and, when it cannot resolve one, sends NO key at all -- never the lenient ancestor walk, under which an unidentified sub-agent resolves to its parent and would report into the parent's creator; that send takes the bell fallback. The gateway honours that header only on a request that proved the X-Internal-Secret (internal_auth), so an app-token caller naming a worker's key keeps the bell. The gateway calls deliver_to_creator, which reads _created_by off the caller's slot, admits the creator through authorize_target (so workspace / channel-link / mirror / ephemeral / app refusals still apply), and lands the text through deliver_sent_by with via: "send_message_origin" and a [sent by session X via send_message] prefix. Only a caller with no creator, or a refused or vanished creator, falls back to the bell.

Change, frontend (SentByCard.tsx, transcriptRenderers.tsx, ChatPane.tsx, MembersPage.tsx, dashboardSlice.ts, useWebSocket.ts, utils/pinnedPrompt.ts, utils/sentBy.ts).

  • A user row with meta.sent_by renders as SentByCard: chevron · kind badge (Member / Worker / Other session, lucide icon, tooltip naming the sender) · "From " · one-line preview when folded · time. The kind is keyed on the RELATIONSHIP the gateway stamped (member_slug → Member, child → Worker, else Session), never on the tool the message came through. A member is named by its slug, anything else by its title, and a title-less session by the localized "another session" rather than a raw slot key; the name carries the sender's agent as a tooltip (sent_by.agent). Peer-member rows open by default, worker and other-session rows start folded. The body renders through the same renderUserContent path a user bubble uses, minus the provenance prefix line, which is stripped from DISPLAY only. Expand state uses useRowDisclosure, so it survives the virtualized transcript.
  • The renderer entry is emitted on every surface createTranscriptRenderers serves (ChatPane in the Members thread and the session grid, SideChat, the chat page): the row is the same row wherever the thread is viewed, and a pane that drew it as the person's own bubble would claim they said something they did not. A row without the record falls through to the SDK user bubble unchanged.
  • Roster: rows another session authored that land while a member thread is not this window's active slot are counted (dashboardSlice.sentByUnread, bumped from the chat_message and steer_push frames) and shown as a numbered badge where the unread dot sits; an unread that is only the member's own reply keeps the dot. The count is window-local, clears whenever the unread badge clears, and is dropped only with a slot's live teardown (never on a stale slots reply). After a reload the plain dot stands in for it — the shared boolean unread stays the read/unread record. The pinned-prompt band (the last typed prompt that scrolled behind the header) skips rows carrying sent_by (utils/pinnedPrompt isPrompt, beside its steer and subagent-completion exclusions): a peer's message is user-role but not what this user typed, and the band quoted it raw, prefix and all, as the person's own prompt while hiding the From-row behind itself (run 2, frames 4/5 at 1280). One predicate, utils/sentBy.isSentByMeta, serves the card, the roster count and the band. The sender name in the From-row is clamped (45% of the row) with the full name and agent in its tooltip; the folded preview gives way first (shrink-[8]), and below 28rem of card width a container query (index.css, keyed off the card like the topbar ladder) drops the preview and lifts the name's 45% cap, so the name — then the only flexible child — takes the space the preview gave up (run 3 measured 83/175 px with the cap still on; without it the full title fits in the 294 px pane) — run 2 measured the name at 18–24 px with the preview drawn in a 294 px pane.
  • i18n: pages.chat.sentByCard.* and pages.membersPage.sent_by_unread_count in all 13 catalogs (plural forms per locale), pseudolocale regenerated.
  • Specs and map: session-control.md (the two allows, the record, the steer), messaging.md (the origin resolver order), and the Crew Members / Session control / Agent chat egress rows of the feature map.
flowchart LR
  subgraph Before
    A1[member A session_send]:::ctx --> F1[not_creator fence]:::ctx --> X1[refused]:::removed
    W1[worker send_message origin]:::ctx --> B1[bell]:::removed
  end
  subgraph After
    A2[member A session_send]:::ctx --> F2[peer-member allow]:::added --> S2{member B busy?}:::added
    S2 -->|yes| T2[steer into turn]:::added
    S2 -->|no| U2[start or queue]:::ctx
    T2 --> R2[user row + meta.sent_by]:::added
    U2 --> R2
    W2[worker send_message origin]:::ctx --> C2[creator allow]:::added --> R2
    R2 --> V2["From name row · roster count"]:::added
  end
  classDef added fill:#DCFCE7,stroke:#16A34A,color:#14532D,stroke-width:2px
  classDef changed fill:#FEF3C7,stroke:#D97706,color:#78350F,stroke-width:2px
  classDef removed fill:#FEE2E2,stroke:#DC2626,color:#7F1D1D,stroke-dasharray:4 3
  classDef ctx fill:#E0F2FE,stroke:#0284C7,color:#0C4A6E
Loading

🟩 added · 🟨 changed · 🟥 removed · 🟦 unchanged

A member's send now reaches a peer, a worker's report now reaches its creator, and both land as a row that says who spoke.

Deliberately not added (owner decision, recorded in the closing comment on #10527: #10527 (comment) -- "Considered, not adopted (owner: trust the agents)"):

  • No hop cap and no per-pair rate limit on member↔member traffic, and therefore no runtime bound on the LLM spend two members can cause each other unattended. The owner accepted that explicitly: the agents are trusted to recognise and stop a ping-pong themselves. To be precise about what that means: this PR ships NO anti-loop mechanism, runtime or prompt -- no member-facing guidance about peer messaging exists in the shipped prompts either -- so the safeguard is the operator noticing (every hop is its own SEL session_send row) and stopping a member. The RFC's hop-propagation notes stay on the issue for the day a runtime bound is wanted.
  • No inbox store, no scheduler, no wake slots, no projection endpoint. The transcript is the record; the row's meta is the only new state.
  • No server-side unread count. The roster count is window-local; the shared boolean unread is unchanged.

Also true, stated so nobody has to find it: the child→creator allow admits ANY session-control session_send from a created session to its creator, not only the send_message origin door — the two share one exemption on purpose. Every session_send row, member or not, now carries meta.sent_by, reaches an open recipient tab live, and draws as the From-row on every transcript surface.

Tests

Backend, test/test_member_thread_projection.py (new) and test/test_session_control.py (one result-shape update):

  • Authorization matrix on the real gate order: member→member send allowed; stop / close / read on a peer still not_creator; an agent-created ordinary session cannot send to a member; a squatter on a member key (mode != "member") is not a member target; a member still cannot reach the person's own session; child→creator send allowed, stop / close / read refused, child→stranger refused.
  • Delivery on real _ChatSlots: idle member starts a turn, prompt keeps the exact prefix, row carries the full sent_by shape; busy member is steered (steer awaited once, nothing queued, row has steer + sent_by); busy member without a steerable client queues with the meta on the entry; busy NON-member target still queues and never touches the steer client; steer_push frame carries sentBy; a plain steer without sent_by is byte-for-byte unchanged. A peer steer the turn never confirmed is requeued with sent_by on the entry and _directive_user_origin off, a human steer's requeue is unchanged, and an accepted steer leaves the author map empty.
  • sent_by_meta: child is present for a worker sending to its creator through either door and absent toward a stranger.
  • Busy-means-mid-plan: a target between plan stages queues (send and origin paths). The drained queue_pop frame carries sent_by (so the live-rebuilt row draws as the From-row and counts toward the badge); a plain entry's frame shape is unchanged. The session_send tool reports a steered delivery as steered; started / queued wording unchanged. Peer entries never merge: two peers pop separately, a peer entry ends a human merge run without being folded in, plain human messages still merge.
  • MCP tool: session="origin" forwards the strict key and caller_session when resolved; with no strict key it posts with an EMPTY session key (no header) and reports the bell; a cron origin send never consults the strict resolver.
  • sent_by_meta shape for a member caller, an ordinary caller (no member_slug), and an unknown caller.
  • Requeued peer steer stamps the admission it was authorized under: a link gained during the RPC reads as newly held at the drain; the admission travels with the pending steer and is released by the settle.
  • Requeued peer steer: the queue_push the requeue broadcasts carries sent_by and the prefix-free body; a human steer's requeue frame carries neither.
  • Peer queue entry not editable: repository refuses and leaves the entry and its origin flag untouched (the user's own entry still edits); endpoint answers 409 peer_authored with no queue_edit frame; slot-detail queue items carry sent_by. Frontend QueueStack.test.tsx: peer card has no edit button and hides the provenance line, cancel stays; a malformed record leaves the card the user's own.
  • Steer re-validation: a target linked between admission and the steer is refused with a notice, no steer, no queue entry; a link that lands DURING a failed steer RPC is refused at the fallback (nothing queued); a queued peer entry carries the original admission (marker test); send_to_target surfaces containment_changed 409 (snapshot sequence patched so authorize_target sees the unlinked target); an unchanged target still steers; source pin that no await separates the check from the steer and none precedes client.steer. Queued peer row: queue_push carries the entry id and the message without the provenance line; an idle target broadcasts no card.
  • Question cards: a sent_by user row keeps an unanswered stateless card and announces no retirement; the user's own row still retires it; the predicate is the queue drain's (carries_sent_by). Steers: a settled peer steer keeps the card and releases its author; the user's own settled steer retires it; a peer steer the echo did not account for keeps its author for the requeue; source pin that the accepted-steer tail does not drop _steer_sent_by. An untitled caller's record carries no title; a titled one does.
  • Member-keyed caller without member mode: refused not_creator by the allow; sent_by_meta gives it no member_slug (nor to a member key with no live slot).
  • Mirrored peer frames: queue_push/steer_push/chat_message shapes lose their provenance carrier before the local broadcast; a mirrored queue_push re-broadcasts under the local key without sent_by.
  • Peer-crew rows: peer_row_meta drops sent_by and mid, keeps tool correlation; an adopted backfill row with a peer-stamped sent_by lands with no meta; the client-ingress list and the peer-ingress list are the same set.
  • Client forgery: strip_reserved_client_meta drops sent_by and keeps the rest, a body that is only the forgery becomes no meta, an honest body passes through by identity; a source pin holds the strip ahead of every user_meta reader in api_chat.
  • deliver_to_creator: worker report lands in the creator's thread with via: send_message_origin; busy member creator is steered; orphan caller, unknown caller, vanished creator (rehydrate returns None), and a creator in another workspace all return None with nothing appended.
  • /api/send-message route: internal-secret caller with a creator → delivered_to: "session", no bell; without a creator → bell; an app-token request naming a worker's key → no creator lookup, bell; a cron caller never takes the creator lookup; no X-Session-Key header → no lookup.

Frontend (vitest): SentByCard.test.tsx (record parsing incl. malformed records and a non-true child, kind keyed on relationship not door, name rules incl. the generic fallback, prefix stripping leaves other bracket lines alone, peer row expanded with badge + name + body, worker row folded with preview and expands on click, plain session row never shows a raw key); pinnedPrompt.steer.test.ts (a sent_by row is skipped and the last typed prompt pins; the same text without the record still pins, as the control); chatRolesParity.contract.test.ts documents sent_by as a shared-dashboard entry; transcriptRenderers.test.tsx (the sent_by entry resolves on every surface, wins over the steer-only user override, a row without the record or with a malformed one falls through to user, the card renders); chatSlice.questionCard.test.ts (a sent_by user frame keeps the stateless card on the active and pane paths; a malformed record does not qualify); dashboardSlice.test.ts (count per slot, clears on local read, survives a non-covering relayed read and clears on a covering one, ignores empty / unsafe keys); MembersPage.test.tsx (count badge replaces the dot with accessible name "2 new messages from other sessions", clears on opening the thread; own-reply unread keeps the dot).

CI runs the suites. Nothing was run locally beyond the static gates (black / isort / flake8 / mypy on touched files, comment-history, sync-io-in-async, agent-sdk-boundary, loop-bound-locks, feature-map, docs-lint, brand-name; tsc -b, eslint on touched files, i18n string / key / untranslated / parity scripts, theme-colors, phantom-classes).

Manual verification

Real-gateway run, two plain crew members, real model, no fixtures. recorded from 9bdf351f3b45e69aab83d5be2ff2b6fbcb6ec886 · origin/feat/member-thread-projection · crew members kirocrew-conductor (A) and kirocrew-autofix (B) on the default agent template plus a kirocrew-worker crew for session_create; agent.session_control / agent.member_dispatch at their defaults · hand-started pod (pod up cannot reach the systemd user bus from the capture shell; gateway started with the pod harness's environment shape: isolated throwaway home and data home, --no-crons --no-tunnel --no-open --approval yolo, the worktree's venv, the SPA built from the worktree) + real model (kas ACP backend), no fixtures. Dark theme, 1280×820. Every row cited is the gateway's own slot history; tool results are read off the caller's transcript and cross-checked against the SEL audit rows.

Head note. The branch was amended twice while the gateway ran. Modules imported at boot and the SPA on screen are 9bdf351f3; session_control.py was first imported lazily after the second amend and is the later content (visible as "child": true on the worker rows). The frontend changes since 9bdf351f3 (kind keyed on child, "another session" fallback, agent tooltip, no peerRows, roster preview strip) are not in the frames; the later fixes below (queue_pop carries sent_by; the tool reports steered) are not either — the run is what found gap 2.

  • A. Peer row. A's session_send to member-kirocrew-autofix while B's thread was not open → tool result "Delivered … it started a turn", SEL {"started": true, "steered": false}. B's row: meta.sent_by = {session_key: member-kirocrew-conductor, via: session_send, member_slug: kirocrew-conductor, …}. Roster before opening B: numbered badge 1 on B's row. B opened: one sent-by-card, badge MEMBER, "From kirocrew-conductor", aria-expanded="true", body without the [sent by session …] line. B replied, confirming receipt.
  • B. Worker report. A session_created a kirocrew-worker (created_by: member-kirocrew-conductor) and sent it an instruction ending in send_message(session="origin", …). The worker's tool result: "Message injected into target session." Gateway log: send_message session=origin delivered to creator member-kirocrew-conductor started=True steered=False. A's row: sent_by = {…, via: send_message_origin, child: true, title: worker-report-test, agent: kirocrew-worker}. Roster with A not open: badge 1 on A's row. A opened: the card is folded (aria-expanded="false", badge WORKER, "From worker-report-test", one-line preview), expands on click. An earlier attempt with A busy took the steer path: log … started=False steered=True, same success string.
  • C. Steer (recording). B counting 1–40 in five-step turns with sleep 8 between; A's session_send "STEER-CHECK from A" while B was running: true → SEL {"started": false, "steered": true}. B's row landed between the 1–5 and 6–10 steps with meta = {steer: true, steerState: consumed, sent_by: {…}}; B acknowledged it in the next line and finished the count. The recording shows the task sent, the first step, the From-row landing inside the running turn (~17 s), the acknowledgement (~24 s) and the count resuming.
  • D. Negative control. A worker (created by A) session_sending to B, which it did not create: 403 not_creator — the fence the two allows are carved out of still holds. An ORDINARY chat session sending to B was allowed (started: true): a person's own session is not ownership-fenced and agent.session_control defaults to on, so this is pre-existing behaviour, not a change here; its row draws as a folded SESSION-kind card.

Gaps the run found (all recorded honestly; two fixed on later heads):

  1. The session_send tool told A "Queued … runs when the current turn ends" for a send the server reported steered: true — fixed in 6618a8849 (the tool reads steered).
  2. The roster's last-message preview still showed the [sent by session …] prefix — fixed on this head (stripSentByPrefix on the roster line).
  3. A brand-new session's first turn has no MCP tools on this backend (the stubs start alongside the session), so a one-shot worker's very first instruction cannot call send_message; the harness seeded a warm-up turn first. Backend behaviour, not this PR's, but it bounds the worker-reports-back flow.
  4. --approval yolo did not cover a member thread's shell tool in this harness (per-chat Trust was used for C). Harness note.
  5. Scenario D as briefed ("ordinary session refused") is not what authorize_target enforces with the switch on — see D above.

Run 2 — current SPA, same harness. recorded from 373d481fe2d0fcba0265ce8aed75a626dba9e28e · origin/feat/member-thread-projection · plain crew members kirocrew-conductor (A) and kirocrew-autofix (B) on the default kirocrew template plus a kirocrew-worker crew for session_create; no members block, agent.session_control / agent.member_dispatch at defaults · hand-started pod + real model (claude-fable-5.1 on the kas ACP backend), no fixtures · dark, 1280×820 unless stated. HEAD was 373d481fe at build, boot and every capture (each frame's DOM sidecar carries the head). The two later amends (8835d7bba: server-side preview strip + mid-plan pin test; e26c25a20: header width rule below) were not built or captured — what they change is called out per item.

  • 1. Roster preview, prefix stripped (frame 1). A session_sends PEER-HELLO-3 … to B while B's thread is closed; SEL {"started": true, "steered": false}; B's row meta.sent_by = {session_key: member-kirocrew-conductor, via: session_send, member_slug: kirocrew-conductor, title, agent}. Roster row for B: badge 1 (aria-label "1 new message from another session") and the preview starts with PEER-HELLO-3, not [sent by session — the SPA's stripSentByPrefix. The API's own last_message still carried the 61-char prefix and capped the text after it, so the preview's tail is cut (run-2 gap 1) — 8835d7bba strips server-side before the cap; not pictured.
  • 2. MEMBER row on the current SPA (frame 2). data-kind="member", expanded, badge MEMBER ("Sent by another crew member"), From kirocrew-conductor with tooltip kirocrew-conductor · Agent: kirocrew-conductor, body without the prefix line anywhere in the thread.
  • 3. WORKER row (frames 3a–3e). A session_creates worker-report-test (kirocrew-worker, created_by: member-kirocrew-conductor); the worker calls send_message(session="origin", …) → tool result Message injected into target session.; log send_message session=origin delivered to creator member-kirocrew-conductor started=True steered=False; SEL {…, "via": "send_message_origin"}. A's row sent_by = {…, child: true, title: worker-report-test, agent: kirocrew-worker}. Roster (B open): badge 1 on A. A opened: card folded, badge WORKER with the tooltip A session this member started to do a task for it (listed under “Sessions it's driving” in the Crew summary); its report lands here, From worker-report-test (bare), one-line preview; expands on click, prefix hidden.
  • 4. SESSION row, quoted title (frames 4 at 1280 / 900 / 1600). An ordinary chat titled Fix the flaky retry test posts to /api/session-control/send with its own key → 200 {started: true}; sent_by = {…, title, agent: default} (no member_slug, no child). Row: data-kind="session", folded, badge SESSION, From “Fix the flaky retry test” (quoted), tooltip Fix the flaky retry test · Agent: default. Measured clamp (DOM rects): pane 294 px at 1280 with the Crew summary open → name 22/175 px; 346 px at 900 → 37/175; 586 px at 1600 → 108/175. Time never pushed off the row, but at 1280 the name reads Fr… (run-2 gap 2) — addressed on e26c25a20: the preview takes shrink-[8] so it gives way before the name, and a container query on the card hides the preview below 28rem (448 px) so the name gets the row (≈91 px at 294); not pictured.
  • 4b. What frames 4 and 5 at 1280 also show (fixed on 792794944). In both, the chat-3 SESSION row had scrolled behind the header, so the pinned-prompt band quoted it — raw [sent by session chat-3-…] SESSION-ROW check … text drawn as B's own prompt — while the From-row itself sat hidden under the band (its DOM sidecar entry has empty text). The band now skips sent_by rows; not pictured.
  • 5. Title-less sender (frame 5). On 373d481fe a dashboard slot with no title had display_title = "New Session…" copied into the record, so the row read From “New Session…”. Changed on 4ff366799 (UX suggestion): the placeholder is not a name, so the record carries no title and the row reads the localized From another session; not pictured.
  • 6. Both indicators at once (frame 6, 740 wide, roster only). 1 badge on B (peer row unread) and the plain unread dot on A (ordinary reply unread), never both on one row.

Run-2 notes that are not this PR's: native title tooltips do not paint in headless captures (recorded in the DOM sidecars); the roster query refetches on remount / 30 s stale window and the transcript tail it previews flushes ~1–1.5 s after the live push (two earlier takes of frame 1 showed the previous reply); a brand-new session's first turn still has no MCP tools (run-1 gap 3, unchanged).

Run 3 — current head, the four states the UX lane asked for. recorded from bf4f71848cf86a69968cb3ac358dd24d4a5d09a6 · origin/feat/member-thread-projection · same harness as run 2 (plain members kirocrew-conductor A / kirocrew-autofix B, kirocrew-worker crew, defaults, real model on the kas ACP backend, no fixtures, dark 1280×820 unless stated). HEAD was bf4f71848 at build, boot and every capture; the one later amend (edc716aa7) is the run's own finding (item 4 gap) plus a test-only fix, both called out below.

  • 1. Narrow header rule (frames 1a at 1280 with the Crew summary open, 1b at 1600). Folded SESSION row From “Fix the flaky retry test” in a 294 px card: .sent-by-preview is rendered but display: none, the name shows 83/175 px (From “Fix the flaky retr…; run 2 on the pre-fix head: 22 px). At 1600 the preview is visible again and the name gets 164/175 px. On bf4f71848 the name was still clamped by its own 45% cap (83/175 px); b69d1d90f lifts the cap inside the same narrow rung, not re-pictured.
  • 2. Pinned-band skip (frames 2c, 2d at 1280). B's thread with a human-typed prompt, then two peer rows from A. Scrolled so both peer rows are behind the header: pinned-prompt reads the human's PIN-TEST human prompt: …, no [sent by session text anywhere on the page; wheeling the newest peer row to just above the header, the band still quotes the human prompt and the From-row scrolls out cleanly instead of being covered.
  • 3. Untitled sender (frame 3a). A fresh untitled slot sends to B: the record carries title: "" and the row reads From another session (tooltip another session · Agent: default). Run 2's gap 3 is closed.
  • 4. Peer queue card (frames 4a, 4b, 4c, 4d). An ordinary busy session A created (chat-4-…, held on a pending shell approval) receives A's session_send → 200 {started: false, steered: false} (queued). Live card (4b): 1 · PEER-QUEUE from conductor: … with no prefix, buttons Send now and Cancel queued message, no edit; PATCH …/queue/<id> → 409 {"code": "peer_authored"}. After the turn (drain SEL queue_drain_revalidation allowed) the row draws as an expanded MEMBER From kirocrew-conductor row (4c, 4d).
    • Gap found and fixed on edc716aa7 (frame 4b2, not re-pictured): after a page reload the HYDRATED card showed the [sent by session …] prefix and an Edit queued message button — api_chat_slot_detail snapshots the queue before rendering and the snapshot carried id and content only, so sent_by never reached GET /api/chat/slots/<key>. The snapshot keeps meta now; test added (test_slot_detail_hydration_carries_the_record). The server refused the edit either way.

Run-3 harness notes: --approval yolo did not auto-approve the worker's sandboxed shell tool, so the pending approval is what kept the target busy (the drained From-row therefore lands ~10 min after the send); native tooltips are in the DOM sidecars.

Screenshots / video

Dark theme, 1280×820, real gateway, provenance as above.

A — peer row. Roster badge on B before its thread is opened; then B's thread with the expanded MEMBER row (no prefix line):

Roster: numbered badge 1 on kirocrew-autofix while its thread is closed
B's thread: MEMBER badge, From kirocrew-conductor, expanded body without the prefix line

B — worker report. Roster badge on A; the folded WORKER row with its preview; the same row expanded:

Roster: numbered badge 1 on kirocrew-conductor after the worker's report
A's thread: WORKER badge, From worker-report-test, folded with a one-line preview
The same worker row after clicking: expanded body, prefix hidden

C — steer into a running turn (recording, 60 s, real time; the row lands at ~17 s, the acknowledgement at ~24 s):

c-steer-recording.mp4

B's running turn with the From-row landed between count steps
B acknowledges the steered message mid-turn and continues

D — an ordinary session's row (SESSION kind, folded)

B's thread: SESSION badge row from an ordinary chat session, folded

Run 2 — current SPA, 373d481fe (dark, 1280×820 unless stated; frames named as in the run-2 list above).

Frame 1 — roster: badge 1 on kirocrew-autofix and the preview starting at PEER-HELLO-3, prefix stripped:

Roster: numbered badge 1 on kirocrew-autofix, preview PEER-HELLO-3 without the sent-by prefix

Frame 2 — B's thread on the current SPA: MEMBER, From kirocrew-conductor, expanded, no prefix line:

B's thread on the current SPA: MEMBER badge, From kirocrew-conductor, expanded body

Frame 3 — roster badge on kirocrew-conductor after the worker's report; the folded WORKER row; the same row expanded:

Roster: numbered badge 1 on kirocrew-conductor after the worker report
A's thread: WORKER badge, From worker-report-test, folded with preview
The same worker row expanded: report body, prefix hidden

Frame 4 — SESSION row with a quoted title at 1280 (name clamped to Fr…, the width gap fixed on e26c25a20), at 900, and at 1600:

B's thread at 1280: SESSION badge, From “Fix the flaky retry test” clamped, plus the untitled-sender row below
B's thread at 900: the same SESSION row with the summary panel gone
B's thread at 1600: the SESSION row with most of the quoted title visible

Frame 5 — title-less sender renders From “New Session…”; Frame 6 — badge and dot together (740 wide)

B's thread: an untitled sender's row reads From “New Session…”
Roster only at 740 wide: badge 1 on kirocrew-autofix, plain unread dot on kirocrew-conductor

Run 3 — bf4f71848, the four UX-lane states (dark, 1280×820 unless stated).

Frame 1 — folded SESSION row at 1280 with the Crew summary open: preview dropped, name readable; the same row at 1600 with the preview back:

B's thread at 1280, summary open: SESSION row From “Fix the flaky retr…” with no preview
B's thread at 1600: the same SESSION row with the preview visible

Frame 2 — peer rows scrolled behind the header; the pinned band quotes the human's prompt, not the peer's:

B's thread scrolled to the bottom: pinned band reads the human PIN-TEST prompt
B's thread with the newest peer row just above the header: band unchanged

Frame 3 — an untitled sender's row reads From another session:

B's thread: SESSION row From another session

Frame 4 — peer message queued behind a busy session: the live card without the prefix and without an edit button; the drained row as a MEMBER From-row:

Worker chat: live peer queue card, Send now and Cancel only
Worker chat after the turn: the drained row as an expanded MEMBER From kirocrew-conductor row

Related Issues

Part of #10527 (the minimal scope recorded in its closing comment). Supersedes the closed RFC #10528 and PRs #10535 / #10543 / #10559.

no linked issue: #10527 stays open until the owner decides the scope is complete; this PR is the first of it.

@CrysisDeu
CrysisDeu requested review from a team, bolichen97 and cixuuz September 14, 2026 04:11
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 14, 2026
@github-actions

github-actions Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Fable 5) — 🔴 BLOCK

UX-level review of 9a03781e8cef0977c4480debd2c829607388bafd — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: BLOCK

Cannot evaluate: missing stills of the shipped build — every screenshot shows a pre-fix run ("SESSION" badge, unreadable "F…" sender stubs, raw pinned-band prefix).

Evidence gaps

  • Shipped badge label "Other session" (kind_session in en.manual.json) appears in no screenshot — shots 08/14/16/17 all render the earlier "SESSION"; the label that answers the reader's "the word 'session' means at least two things" was never blind-read. Close with a re-shot session-kind From-row at HEAD.
  • Shipped narrow-card state (index.css <28rem: preview dropped, name uncapped) appears in no screenshot — shot-17 shows the pre-fix failure instead ("F… UNTITL…"; reader: "at this width I can't tell who sent the message"). Close with a still of the ~294px pane at HEAD.
  • Shipped "From another session" untitled-caller fallback appears in no screenshot — shot-16 shows the pre-fix placeholder-as-name (From "New Se…"). Close with a still of an untitled sender's row.
  • Shot-17's pinned band quotes [sent by session chat-3-… as the user's own prompt — the state utils/pinnedPrompt.ts now excludes; the fixed band is unshown. Close with a re-shot of a scrolled sent_by thread.

Watch

  • Member/Worker distinction is tooltip-only: reader on the WORKER row — "I can't tell how a worker differs from a member … no idea about the difference" — and "worker" collides with the roster member kirocrew-worker and session worker-report-test. Hit by anyone whose member dispatches work; persistent. Smallest fix: fold the kind_worker_tip gist into the visible row (e.g. "Worker report").
  • A peer-queued card carries no visible provenance (shot-24): with the prefix stripped and the From-chrome absent, the queued row reads as the user's own text until it drains. Add the kind badge/"From " to QueueStack cards where isSentByMeta is true.

[UX-REVIEWED] 9a03781

@github-actions

github-actions Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of 9a03781e8cef0977c4480debd2c829607388bafd — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Confirm the owner's no-anti-loop acceptance on #10527 covers shipping zero prompt guidance — SEL rows plus a watching operator are the only ping-pong brake.

[DESIGN-REVIEWED] 9a03781

@github-actions

github-actions Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of 9a03781e8cef0977c4480debd2c829607388bafd and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 9a03781

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 9a03781e8cef0977c4480debd2c829607388bafd: <one-sentence reason>

@github-actions

github-actions Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — 🔴 BLOCK

Premise-level review of 9a03781e8cef0977c4480debd2c829607388bafd — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: BLOCK

Members messaging members and worker reports running as the creator's own prompt ship default-on, with the deciding record an issue closing comment, not an RFC.

Not justified as shipped

  • Item 1 — product-shape change without accepted RFC: authorize_target turns member→member send from refused (not_creator) to delivered, default-on for every crew.
    Clears when: the record named under Blockers exists, then push or rebase.
  • Item 2 — product-shape change without accepted RFC: a child's send_message(session="origin") moves from the bell to running as its creator's user-role turn.
    Clears when: the record named under Blockers exists, then push or rebase.
  • Item 3 — product-shape change without accepted RFC: a busy member now takes a peer's text steered INTO its live turn — the default delivery mode of the same undecided shape.
    Clears when: the record named under Blockers exists, then push or rebase.
  • Item 8 — rides along: declared; the Slack heartbeat, issue-radar wake and workflow-finished auto-turn now queue behind a mid-plan slot — invariant-derived (a turn between stages overwrites the plan), no premise risk.

What this change ships

Inventory (10 items) — 6 justified

Intent: let crew members hand each other work and let workers report back into the thread that dispatched them, without the owner relaying by hand — an ADDITION (the description's own word is "Experiment").

  1. A member can send into another member's DM thread (was refused) — product-shape change without accepted RFC
  2. A worker's origin report lands in its creator's thread instead of the bell — product-shape change without accepted RFC
  3. A busy member is steered mid-turn instead of queued (tool now says "steered") — product-shape change without accepted RFC
  4. Peer/worker rows draw as collapsible "From " rows, bracket prefix hidden — justified
  5. Numbered roster badge counts unseen peer rows — justified
  6. Peer-authored queue entries: no edit (409 peer_authored), drain alone, cancel stays — justified
  7. sent_by is a gateway-only meta key, stripped from client bodies and peer-crew rows/frames — justified
  8. Automation prompts queue behind a mid-plan slot instead of starting a turn over it — rides along (invariant-derived)
  9. Stateless question cards survive a peer's message instead of retiring — justified
  10. Members roster preview strips the provenance line before capping — justified

Blockers

product-shape change without accepted RFC (items 1–3, one decision). The description records the decision as "#10527, closing comment": "the owner's decision is to fix it inside the session model instead" — a proposal, not a record. Grepped session_send across docs/request-for-change/: the only non-draft RFC that speaks to this shape, rfc-conductor-work-ledger.md (base status partial), recorded the opposite — "Deliver a message as the target's next prompt… Rejected, and pinned by a test. It is session_send reintroduced sideways", quoting agent.py's standing pin "session_send — WITHHELD. Runs text as another session's user-role turn." No RFC on the base list covers member↔member or child→creator delivery.
Clears when: an RFC covering this delivery shape is merged non-draft on the base branch (then push or rebase), or a maintainer records /ai-review override first-principles 9a03781e8cef0977c4480debd2c829607388bafd: <decision>; on a fork pull request, merge the RFC first or have a maintainer push this branch to the repository where the override is honoured.

[FIRST-PRINCIPLES-REVIEWED] 9a03781

@github-actions

github-actions Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Opus 4.8 Review — ✅ no blocking findings

Reviewed 9a03781e8cef0977c4480debd2c829607388bafd — this comment is updated in place on each push.

Review details

No blocking issues — one advisory finding: the peer-message roster badge double-counts a steer that is requeued and later drained.

FINDING — website/src/hooks/useWebSocket.ts:1629 — a peer session_send steered into a busy member's turn broadcasts steer_push with sentBy and hits bumpSentByUnread(steerSlot) (line 1679, +1); when the turn ends without a steering_consumed echo, _requeue_unconsumed_steers (chat_runner.py:5421) requeues the entry carrying meta.sent_by and _start_next_queued_turn (chat_runner.py:6003-6007) re-emits it as queue_pop with sent_by, so dispatch(bumpSentByUnread(popSlot)) fires again (+1) for the same logical message while the thread is off-active → sentByUnread[slot] reads 2 for one peer message (bumpSentByUnread is monotonic, cleared only by markSlotRead), over-reporting the numbered roster badge → Fix: mark the requeued-steer queue entry (it already carries steer_delivery_id in _requeue_unconsumed_steers) so the queue_pop frame flags it and the queue_pop handler skips bumpSentByUnread for an entry already counted at steer_push.

[OPUS-REVIEWED] 9a03781

Verdict parsed from the review's SHA-scoped output markers for commit 9a03781e8cef0977c4480debd2c829607388bafd.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 9a03781e8cef0977c4480debd2c829607388bafd: <one-sentence reason>

@CrysisDeu
CrysisDeu force-pushed the feat/member-thread-projection branch from 9bdf351 to dc7f7c2 Compare September 14, 2026 04:37
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Sep 14, 2026
@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Requeued peer steers lose identity and gain human provenance (session_control.py:2028) — fixed in dc7f7c255.
    mechanism: _ChatSlot._steer_sent_by map, kept in lockstep with _steer_send_ids (set in steer_into_running_turn, popped at every site the send-id map is popped, incl. the force-stop discard); _requeue_unconsumed_steers moves it onto the queue entry's meta and passes directive_user_origin=False for such an entry.

A steer another session sent is registered with its sent_by record (_steer_sent_by, same lifecycle as _steer_send_ids). When the turn ends without confirming it, the requeue copies the record onto the queue entry (the drain unions entry meta onto the row, so the drained row still reads "From ") and admits the entry with directive_user_origin=False, so a channel link the target gains before the drain drops it like any other cross-session prompt; a human steer's requeue is unchanged.
Test TestRequeuedPeerSteerKeepsItsAuthor pins the entry meta, the origin flag, the human-steer control and the lockstep pop.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Failed strict identity falls back to an ancestor session (origin: validation) (mcp_tools/messaging.py:543) — fixed in dc7f7c255.
    mechanism: post_session_key on the origin leg — the strict key when resolved, "" (no X-Session-Key header at all) when not; _post is never left to its lenient default on this leg.

For session="origin" from a non-cron caller the tool posts with session_key=<strict key> when require_strict_session_key resolves one, and with session_key="" (no header) when it does not, so _post never runs the lenient ancestor walk on this leg and an unidentified sub-agent cannot report into its parent's creator; that send takes the documented bell fallback.
Test TestOriginToolForwardsOnlyAStrictKey pins the forwarded key, the empty-key case, and that a cron origin send never consults the strict resolver.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Feature map omits the new member-thread behavior (MembersPage.tsx:1986) — fixed in dc7f7c255.

The Crew Members row now describes the From-row (SentByCard, kind badge, fold rules, prefix hidden from display) and the roster count; the Session control row describes the two send-only allows, the meta.sent_by record, the busy-member steer and the steered result; the Agent chat egress row describes the non-cron session="origin" creator resolution and its bell fallback. messaging.md's delivery ladder names the two origin resolvers in order.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 14, 2026
@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • No runtime bound on member↔member traffic — rebutted (owner decision, now quoted and linked in the body).
  • The PR's own verification bar is unmet — accepted: real-pod evidence is being recorded now and will be attached before review is requested; the body says so.
  • messaging.md misdocuments the send_message ladder — fixed in dc7f7c255.

The owner's decision is recorded in the closing comment on #10527 (#10527 (comment), "Considered, not adopted (owner: trust the agents)"): no hop cap and no per-pair rate limit for member↔member DM, the agents are trusted to recognise and stop a ping-pong themselves, and the prompt-level rule is the whole mechanism. The PR body now quotes it and names the consequence explicitly (unbounded unattended spend is the accepted risk; stopping a member is the remedy). This ruling covers every finding that asks for a hop counter, cooldown or pair rate limit on this PR.
messaging.md's delivery ladder now names the two origin resolvers in order (non-cron caller → creator via deliver_to_creator; cron → job session) and the strict-key rule the MCP tool applies.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • peerRows scoping (Subtraction 1) — taken in dc7f7c255: the prop is gone and the sent_by renderer entry is emitted unconditionally.
  • Busy-member steer (Watch / Subtraction 3) — rebutted: it is a stated requirement of the owner's scope, not symmetry.
  • sentByUnread badge (Watch / Subtraction 2) — rebutted: it is a stated requirement of the owner's scope.

peerRows is deleted from ChatPane and transcriptRenderers; the From-row now draws on every surface the shared row set serves (the session grid included), so the same row never renders as the person's own bracket-text bubble anywhere. Rows without the record fall through unchanged.
The steer branch is item (1b) of the owner's scope for this experiment: "route a BUSY member through the steer path the Members page already uses instead of the queue". The named failure of queueing is on #10527: a peer's message that queues behind a member's running turn reaches it only after the turn ends, i.e. after the work it was meant to redirect. The branch stays.
The numbered roster badge is item (3) of the same scope: "roster shows an unread count for sent_by rows that landed while the member thread was not open". It is window-local and never replaces the shared boolean unread. The badge stays.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • The badge encodes the door, not the sender — fixed in dc7f7c255.
  • Same row, two renderings (peerRows) — fixed in dc7f7c255.
  • sentByName falls back to the raw session_key — fixed in dc7f7c255.
  • "Worker" is synonym drift with the bell's "Subagent" — rebutted.
  • Evidence gaps (no screenshots / recording) — accepted: being recorded now on a real gateway and attached before review is requested.

The gateway now stamps sent_by.child: true when the sender is a session the receiving thread created; sentByKind keys Worker on that relationship, so the same child reads the same whichever tool it used. peerRows is deleted and the From-row draws on every surface. A title-less sender is named by the localized "another session" instead of a slot key.
"Worker" is the product's own name for a session a crew member dispatches (agent kirocrew-worker, the Crew summary's "worker sessions" list); the bell's "Subagent" names a spawn_run sub-agent, a different object with a different lifecycle. Renaming either would move the drift, not remove it; the badge tooltip spells out "a worker session this member started".

@CrysisDeu
CrysisDeu force-pushed the feat/member-thread-projection branch from dc7f7c2 to 225b39a Compare September 14, 2026 04:58
@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Origin reports can clobber an active multi-stage plan (session_control.py:2043) — fixed in 225b39a95.

_ChatSlot.enqueue_or_run_prompt now treats self.running or self._in_stage_execution as busy, the composer's own predicate: a delivery that arrives between plan stages queues instead of starting a turn over the plan. This covers both the session_send and the origin-report doors (they share deliver_sent_by) and every other enqueue_or_run_prompt caller.
Tests TestBusyMeansMidPlanToo pin the queued outcome for a mid-plan member target and a mid-plan creator.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Queue merging corrupts sender attribution (state.py:5088) — fixed in 225b39a95.
    mechanism: chat_utils.carries_sent_by — a queue entry with meta.sent_by drains alone, the same rule carries_attachments applies, so no merged row ever carries a sent_by union.

_dequeue_next_message stops a merge run at a peer-authored entry and pops such an entry alone, so a row's sent_by is always the author of every line in it; plain human messages still merge. Tests TestPeerRowsNeverMerge pin two peers popping separately, a peer entry ending a human merge run without being folded in, and the unchanged human merge.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • sent_by.agent has zero consumers (Subtraction 1) — fixed in 225b39a95 by giving it its consumer rather than dropping it.
  • Numbered roster badge (Item 6 / Watch / Subtraction 2) — rebutted, as on the previous head.

sent_by.agent is now rendered: the "From " label carries the sender's agent as its tooltip (pages.chat.sentByCard.agent_tip), the one fact about the sender the name does not carry. The field is part of the record the owner's scope specifies (meta.sent_by = {session_key, title, agent, member_slug?, via}).
The numbered badge is item (3) of the owner's scope for this experiment ("roster shows an unread count for sent_by rows that landed while the member thread was not open"); the ruling on the previous head stands for every restatement of it.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Unverified on a running gateway (Watch) — accepted: the real-pod evidence run is in progress and will be attached to the description.
  • Counter / log warning on rapid member↔member sends (Suggestion) — rebutted.

Every member→member send is already an SEL row (_audit with caller, target, started, steered, chars), so the signal a person needs to notice a ping-pong exists without a new mechanism; adding a threshold counter or warning would be a runtime anti-loop control by another name, which the owner declined for this scope (#10527 (comment)).

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • "Worker" tooltip defines the word with itself — fixed in 225b39a95.
  • "Worker" vs "subagent" vocabulary — rebutted, as on the previous head.
  • Evidence gaps — accepted: being recorded on a real gateway; attached before review is requested.

kind_worker_tip now reads "A session this member started to do a task for it (listed under its worker sessions); its report lands here", tying the badge to the Crew summary's own "worker sessions" list, in all 13 catalogs.
"Worker" is the product's word for a session a crew member dispatches (agent kirocrew-worker; the Crew summary tab lists "worker sessions"); "Subagent" names a spawn_run sub-agent with a different lifecycle. The two are different objects, and this ruling covers every restatement of the rename request on this PR.

@CrysisDeu
CrysisDeu force-pushed the feat/member-thread-projection branch from 225b39a to 6618a88 Compare September 14, 2026 05:20
@CrysisDeu
CrysisDeu force-pushed the feat/member-thread-projection branch from a74815e to edd1a3b Compare September 14, 2026 12:34
@CrysisDeu

Copy link
Copy Markdown
Contributor Author

Round 25 — a74815e96 → edd1a3b34. Opus clean, Design PASS, UX CONCERNS, FP BLOCK on a74815e96.

GPT 5.6 — fenced F1, a peer's MIRRORED frames can carry forged provenance: upheld, fixed

Real, and the third door after the client body (round 10) and the stored peer rows (round 24): the live frames a peer mirrors (queue_push with sent_by, steer_push with sentBy, chat_message with meta.sent_by) are re-broadcast under the local slot key, and the frontend would have read a peer's record as "another session on this gateway", naming a local member.

Fix: _replay_mirrored_frame runs _strip_peer_frame_provenance after the deep redaction — drops top-level sent_by / sentBy and the gateway-stamped keys inside meta (removing meta when nothing is left) — so the peer's record never reaches this dashboard. Same rule as peer_row_meta for the stored rows, applied to the frames. Tests: every carrier shape; a mirrored queue_push re-broadcasts under the local key without the record. Spec updated.

First Principles — BLOCK: unchanged, owner ruling pending.

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Sep 15, 2026
Two send-only allows in front of the not_creator fence: a crew member may
session_send to another member's DM thread, and a session may send to the
session that created it. A busy member takes the message through the steer
path the Members page already uses instead of the queue. Every delivered row
carries meta.sent_by (session_key, title, agent, via, member_slug) while the
[sent by session X via session_send] text prefix stays as it is.

send_message(session="origin") from a non-cron caller now resolves to the
session that created the caller and lands there as such a row; only a caller
with no creator falls back to the bell.

The Members thread draws sent_by rows as a collapsible "From <name>" row with a
kind badge (member / worker / session), peer rows open, worker rows folded, the
prefix line hidden from display only; the roster shows a count of such rows
that landed while the thread was not open.

Deliberately not added: hop cap, per-pair rate limit, inbox store.
@CrysisDeu
CrysisDeu force-pushed the feat/member-thread-projection branch from edd1a3b to 9a03781 Compare September 15, 2026 06:08
@CrysisDeu

Copy link
Copy Markdown
Contributor Author

Rebase only (no code change) — edd1a3b34 → 9a03781e8 onto main f9ad39919.

One conflict in website/src/pages/members/MembersPage.tsx: main's new "Stopped" chip (#10807) wraps the roster preview in a flex span; this PR strips the [sent by …] prefix from the same preview. Resolved by keeping main's structure and applying stripSentByPrefix to the inner truncating span only. Static gates green (tsc, eslint, i18n strings/keys, comment-history). No behaviour change on either side; the lane verdicts on edd1a3b34 (GPT clean, Opus clean, Design PASS, UX CONCERNS advisory, FP BLOCK = owner decision) should re-run unchanged.

@github-actions github-actions Bot added merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Sep 15, 2026
@dwu96 dwu96 added needs-pr-triage PR scanner: awaiting automated triage needs-author-decision PR blocked on author input and removed needs-pr-triage PR scanner: awaiting automated triage labels Sep 19, 2026
@dwu96

dwu96 commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

🤖 Kiro Crew [operator: dwu96#8c08bee0]: This PR has been inactive since 2026-09-15 with failing CI. I reviewed the blockers but they require your input:

  • First Principles is a hard BLOCK, and its clearance is a record only a maintainer can produce. It reads items 1–3 as one product-shape decision shipping default-on for every crew: authorize_target turning member→member send from refused (not_creator) into delivered, a child's send_message(session="origin") moving from the bell to running as its creator's user-role turn, and a busy member being steered mid-turn rather than queued. It holds that the description's cited record — Crew members: inbox model with peer DM as envelopes #10527's closing comment, "the owner's decision is to fix it inside the session model instead" — is a proposal rather than a record, and that the only non-draft RFC touching this shape, rfc-conductor-work-ledger.md, recorded the opposite: "Deliver a message as the target's next prompt… Rejected, and pinned by a test. It is session_send reintroduced sideways", quoting agent.py's standing pin "session_send — WITHHELD. Runs text as another session's user-role turn." It clears only when an RFC covering this delivery shape is merged non-draft on the base branch, or a repository writer records /ai-review override first-principles 9a03781e8cef0977c4480debd2c829607388bafd: <decision>. Both are yours; neither is automation's.
  • UX is also a BLOCK, on evidence rather than code: it reports that every attached screenshot shows a pre-fix run, so the states this revision actually ships were never read. Specifically the shipped badge label "Other session" (kind_session) appears in no shot (08/14/16/17 all render the earlier "SESSION"), the narrow-card state under 28rem (preview dropped, name uncapped) is shown only as the pre-fix "F… UNTITL…" failure, the "From another session" untitled-caller fallback is shown only as the pre-fix From "New Se…" placeholder, and shot-17 still quotes [sent by session chat-3-… as the user's own prompt — the prefix utils/pinnedPrompt.ts now excludes. Re-shot stills of this head close it; attaching them to the description is not something this pipeline can do for you.
  • Size reinforces both: 3,506 added lines across 52 files (tests 1,925, src/ 805, website/src/ 650, docs 126).

For the record on what is not blocking: Design Review PASS and Opus 4.8 reports no blocking findings at this head. The GPT 5.6 lane is stale and carries no verdict — its comment is stamped 373d481fe2 while the head is 9a03781e8c, and it reads "review incomplete", which is an operational outcome rather than a finding; a push or rebase refreshes it. PR Readiness reports 14 blocking items, and the branch is CONFLICTING against current main with its base 432 commits behind. UX also leaves two watch items worth a decision while you are here: the Member/Worker distinction is tooltip-only, and a peer-queued card carries no visible provenance once the prefix is stripped.

When you've addressed these, the pipeline will re-assess on its next cycle. If you'd prefer no automation touched this PR at all, add the pr-no-autofix label.

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request changes: turning off agent.session_control no longer closes the new origin door, and the tool, prompt and Settings text still describe the old contract

The First Principles review already covers the product-shape question and the RFC conflict. This review is about two gaps it does not mention. Both were checked at head 9a03781e8c.

1. deliver_to_creator skips the operator switch

src/kiro_crew/dashboard/session_control.py:2384 calls authorize_target(..., operation="send", skip_enabled_check=True). That skips the only switch check in authorize_target (:1544):

if not skip_enabled_check and not session_control_enabled() and not _member_bypass(caller_key):

agent.member_dispatch is skipped as well, because _member_bypass sits in the same expression.

Failure scenario:

  • An operator sets agent.session_control: false, and optionally agent.member_dispatch: false, to stop agents from driving each other's sessions.
  • A child session that already exists calls send_message(session="origin"). Its _created_by survives a restart.
  • Its text still starts a user-role turn in its creator, either the user's own chat or a member thread.
  • send_message is in @kirocrew-core, which the shipped config/defaults.json auto-approves, so no approval prompt stops the call.

This contradicts two texts:

  • the Settings text at src/kiro_crew/config/sections.py:1292: "Turn this off to withdraw the capability from every agent at once";
  • this PR's own spec at docs/system-specs/modules/session-control.md:195: "Ordinary (non-member) callers are untouched: they still require the switch."

The skip_enabled_check docstring (session_control.py:1490-1497) limits the flag to a synchronous re-check made after the feature "was already confirmed enabled". No test runs with the switch off: the autouse fixture at test/test_member_thread_projection.py:49-51 forces session_control_enabled to True.

Fix direction: gate this door on the switch instead of skipping it, and also on member_dispatch when the creator is a member thread. When the capability is withdrawn, the send should fall back to the bell. Add a test with the switch off.

2. Contract text left stale at the head

  • src/kiro_crew/mcp_tools/messaging.py:113-114 and :232, plus src/kiro_crew/config/prompt.md:82, still tell the model that origin means the session that spawned the cron. A worker reading them cannot learn that its text now runs as its creator's next turn.
  • src/kiro_crew/config/sections.py:1295 ("a crew member … reaches only sessions it created itself") and :1310 ("a member's reach is still bounded to sessions it created itself") are both false once _peer_member_send allows member-to-member sends.
  • src/kiro_crew/agent.py:6498-6500 still says send_message addresses "a person rather than a session's turn queue".

If the owner picks option (c) from the author's disposition, finding 1 goes away along with deliver_to_creator. The two sections.py strings still need updating either way, because the member-to-member allow stays.

From a full open-PR audit against origin/main c66f95b (2026-09-25); findings were checked by independent reviewers reading the code. Reply here if this is wrong.

Copy link
Copy Markdown
Contributor

Open-PR triage (against origin/main 6a31a63e5b): needs a rebase, plus a merge discussion with #5819 and one finding not raised yet

Status. The PR's merge base f9ad39919 is 2,747 commits behind main. git merge-tree reports conflicts in 20+ files, including session_control.py, state.py, chat_runner.py, chat_delivery.py and every locale file. Nothing on main implements this: _peer_member_send, _report_to_creator, deliver_to_creator and meta.sent_by do not exist there, and main's authorize_target still refuses member→member send with not_creator. So the PR is not superseded. It needs a rebase.

Existing blockers still stand at head 9a03781e8c. I am not repeating them as a new review:

  • @bolichen97's request-changes. I confirmed deliver_to_creator still calls authorize_target(..., skip_enabled_check=True) at session_control.py:2384, so agent.session_control: false and agent.member_dispatch: false do not close the origin door. The stale sections.py, prompt.md and messaging.py contract text is also still there.
  • First Principles' BLOCK: no accepted RFC for member↔member delivery or child→creator delivery, and rfc-conductor-work-ledger.md records the opposite. This is a behaviour change on a default-on path, so it is a breaking change until a maintainer records the decision.

New finding: deliver_to_creator brings a closed creator back. At session_control.py:2369-2374, when the creator slot is not open, the code calls rehydrate_slot_from_history_async(state, creator) and only then authorizes. Main's authorize_target returns target_not_found (404) for a session that is not open. Its comment gives the reason: "a closed tab is out of scope, because waking one would resurrect a conversation the user put away". Here, a worker's send_message(session="origin") puts a conversation the person closed back into their sidebar and starts a user-role turn in it. A closed creator should fall back to the bell, the same as any other target that cannot be reached.

Overlap: #5819 (open, feat: cross-session send (split view button + send_to_session MCP tool)). Both PRs add a path that delivers one session's text into another session's turn, with cross-session provenance on the delivered row. #5819 adds an opt-in send_to_session tool and a split-view button. This PR widens the existing session_send fence and stamps a gateway-only meta.sent_by. The goals overlap but the mechanisms differ, and both edit mcp_tools/messaging.py. Neither PR covers the other. The provenance format (sent_by vs #5819's prefix) and the opt-in question should be settled once, for both, before either merges.

Recommendation: rebase and continue development once the RFC decision is made. Keep the PR open; do not close it.

Automated open-PR audit. Every claim above was checked against the PR diff and origin/main. Reply here if any of it is wrong.

@iamwhatever iamwhatever left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @CrysisDeu for the member-thread projection work. One rebase issue before this can land.

#17642 deleted remote_adopt.py and #17662 deleted the relay path (remote_relay.py, remote_mirror, relay_remote_turn) on main. Old executor="remote" slots now answer 409 relay_archive_read_only, and the peer owns its session through the crew window (#16757). These hunks touch code that no longer exists, so they are no longer needed:

  • src/kiro_crew/dashboard/remote_adopt.py (deleted on main): R41-57 and R442-450 (prepare_backfill_rows).
  • src/kiro_crew/dashboard/remote_relay.py (deleted on main): R65-71, R313-406 (_replay_mirrored_frame), R430-438 (_apply_row).
  • src/kiro_crew/dashboard/session_control.py: the new if slot.executor == "remote": branch at R2389, and the remote_relay.peer_row_meta reference at R2016.
  • src/kiro_crew/dashboard/state.py: the remote_relay.peer_row_meta comment at R2427.
  • docs/system-specs/modules/session-control.md: R281-282 (remote_relay._apply_row, remote_adopt.prepare_backfill_rows, peer_row_meta).
  • test/test_member_thread_projection.py: the relay/adopt tests at R1460-1540 (imports of peer_row_meta, remote_adopt, _strip_peer_frame_provenance, _replay_mirrored_frame).

Could you drop those hunks and rebase on main? Please keep the rest of the PR as it is. Thank you.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

@iamwhatever thanks for the review. Before dropping the relay/adopt hunks we tried the port onto current main, and most of what this PR adds now exists on main in a different shape:

Keeping "the rest as is" would add a second delivery path beside main's, so we need a call:

  1. Re-scope this PR to the SentByCard frontend plus meta.sent_by stamped on main's existing delivery path, or
  2. Close it as superseded by main.

We lean toward closing it, unless the SentByCard UI is still wanted. Parking this PR until you choose.

@CrysisDeu CrysisDeu added the parked Kept open as a request; not on the current plan label Oct 27, 2026
@CrysisDeu

Copy link
Copy Markdown
Contributor Author

Closing this PR. Main took a different path for worker reporting in #23010: a worker's report now comes back to its conductor as a [Worker report] turn, and its status is recorded in the conductor's work ledger. Main also lets a member control only the sessions it created. This PR's report-to-creator path and member-to-member send no longer fit that design, and it conflicts with 40 files on main.

On the open change requests:

#10527 stays open. If member-to-member messaging is still wanted, it needs an RFC first. The branch is kept, and this PR can be reopened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge conflict Branch has merge conflicts with its base — author must resolve before merge needs-author-decision PR blocked on author input parked Kept open as a request; not on the current plan

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants