Skip to content

feat(dashboard): waiting-on-you cards pin an agent's ask above the composer - #39616

Open
unstablebrainiac wants to merge 1 commit into
mainfrom
feat/waiting-on-you-cards
Open

unstablebrainiac wants to merge 1 commit into
mainfrom
feat/waiting-on-you-cards

Conversation

@unstablebrainiac

@unstablebrainiac unstablebrainiac commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: An agent can pin what it needs from the person above the composer, as an "Action for you" card that stays until the person answers it or writes, the agent clears it, or it expires.

When an agent is blocked on the person, only the turn that first said so explains the ask. In a watch loop every later cycle adds another "still waiting on you" reply on top, so the person scrolls back to find what is needed. [OPTIONS:] chips come only from the newest reply. The ask_question card blocks the turn for 30 minutes, then is withdrawn. Nothing keeps an ask in view across turns.

Why it matters

Loops that wait on a person for hours produce one reply per cycle that says nothing new, and the actual ask scrolls out of view. Non-loop chats lose the ask too, as soon as the person asks a side question. The sidebar cannot say "waiting on you" for a plain-text ask (#20961).

Not a goal

  • Phase 2 of the design: prompt, babysit and goal-conductor guidance that would tell a loop to stop restating its ask. That changes default loop behaviour and waits for the RFC to be accepted. The tool description stays neutral on it.
  • Changing ask_question, native question cards, [OPTIONS:] chips or needs_input.
  • Channel surfaces (Slack, Discord, Webex): the tool tells those sessions to use [OPTIONS:].

What changed (motivation → approach → change)

An agent can now pin what it needs from you, an action or a decision with options, as an "Action for you" card above the message box. The card stays across turns, loop cycles and restarts until you answer it or write in the chat, the agent clears it, or 7 days pass, so the ask no longer scrolls away. This is Phase 1 of the design in PR #39294 (docs/request-for-change/rfc-waiting-on-you-cards.md, still draft); the packaged doc is src/kiro_crew/docs/waiting-on-you.md.

Part What it does Where
Agent tools waiting_on_you pins or replaces one ask: a key, a title, optional detail, and 0 to 6 options. waiting_on_you_clear removes it. Up to 4 per session. Over-length text is refused, never cut, and so is an option label that would run as more than prose (a leading / or @, or a $name skill token). mcp_tools/control_parts/waiting.py and schemas.py, validation_parts/server_registries.py and core_turn_schemas.py (named in validation.py), mcp_core_parts/identity.py, data/mcp_tool_titles.json, mcp_listing_relay.py, shared limits in waiting_on_you_contract.py
Store waiting_on_you.json under the data home, MAC'd like change_cards.json. It survives restarts and lazy tab restore. Incognito sessions keep asks in memory only. dashboard/waiting_on_you.py
Retirement A live owner message (meta.human, owner as author) retires every ask. Auto-nudges, crons, sub-agents, peer session_send, apps and teammates retire none. Answering a card retires only that card. Fork starts empty; rewind and edit-and-resend clear. dashboard/waiting_on_you_events.py, dashboard/state_parts/slot_transcript.py
Answers Owner-only routes check the current ask_id and the stored options, and are idempotent per answer_id. Only the chosen label or typed text becomes the user row, sent with commands off, so agent-written text never arrives with the owner's authority. A gateway restart mid-answer leaves the card marked "may already have been sent", never re-sent. dashboard/handlers/waiting_on_you.py (a registered redaction sink in security_posture_sinks_gateway.py); commands-off on answer sends in dashboard/chat_api/chat_send.py, whose steer-or-queue decision moved whole to chat_send_steer.py to stay under the line cap
Agent context A gateway-written [WAITING ON YOU] block lists pinned asks, names retired ones once with their full text, and says which ask a card answer answers. It is capped at 6,000 characters. context_blocks.py, dashboard/chat_turn/
Dashboard The card sits under the question card in both composers: options as one list with a Send button, Done on an action card, ✕. An ask answered elsewhere, replaced or cleared turns into its notice in place. Sidebar rows, the tab strip and grid panes show "Action for you · title" in --aim, separate from "Waiting on you". The needs-me hover card and the Questions tab list asks too. Strings ship in all 12 locales. website/src/components/waitingOnYou/, website/src/api/client/approvals.ts, website/src/types/, website/src/i18n/

Where this build differs from the draft RFC: a paused crew queues the answer instead of refusing it (that is how chat send behaves), edit-and-resend clears asks like rewind, and Shared Crew teammates get 403 on the answer and dismiss routes. The RFC will be updated to match.

PR Size (shadow, not enforced) reports 123 files over its 80: backend, frontend, 13 locale catalogs, tests, 19 screenshots and 2 recordings. The two halves share one contract and land together.

Backwards compatibility

Compatible: the tools, store, routes, slot field and context block are all new. Agents that never call the tools see no change. An older build ignores waiting_on_you.json and the waiting_on_you slot field, and skips the unknown waiting card surface.

steer_is_auto and decided_message_handling move whole from chat_api/chat_send.py to chat_api/chat_send_steer.py, so chat_send.py stays under the 2,000-line cap. Nothing else is taken away; needs_input and every reader of it are unchanged. Every reader of the two moved functions on main:

Reader: src/kiro_crew/dashboard/chat_api/chat_send.py:_api_chat_send -- chat -- it imports both names from chat_send_steer; test_decisions_message_steer_apply.py
Reader: src/kiro_crew/dashboard/chat_handlers.py:decided_message_handling -- chat -- the facade still re-exports both names and composes chat_send_steer; test_chat_handlers_composition_contract.py
Reader: test/test_agent_origin_send.py:decided_message_handling -- chat -- its monkeypatch targets chat_handlers, which still resolves; test_agent_origin_send.py

Tests

  • test/test_waiting_on_you_store.py: survival across restart and lazy restore, tamper-evident records, an oversized file left alone, a failed write that broadcasts nothing and keeps every slot, expiry, incognito.
  • test/test_waiting_on_you_retirement.py: only a live owner row retires; replays, nudges, crons, peers, apps, Issue Radar and teammates do not; fork, rewind and delete; restored asks are pushed after load.
  • test/test_waiting_on_you_answers.py: exact label sent with its meta; old ask_id, label not among the options, a second window, retries and concurrent answers; a refused send keeps the ask; a send refused after its row landed becomes uncertain; queued answers never merge.
  • test/test_waiting_on_you_agent.py: tool and gateway refusals with SEL audit; the per-turn block's cap, boundary escaping and answered line, including no answered line on a machine-opened turn; no loop guidance in the tool, the doc or the block.
  • Frontend: WaitingOnYouStack.test.tsx, waitingOnYou.test.ts, NeedsMeHoverCard.waiting.test.tsx and commandCenterPanel.waitingOnYou.test.tsx cover render, answer, every 409, retry reuse, dismiss, the kept draft, the stale answer returned to its own session's draft, status precedence and the selectable list.
  • Guard updates: the request-size cap register, the MCP listing imports, the cache-reset floor and the security-posture sink list.

Each fix found in local review has a regression test that fails when the fix is reverted.

Manual verification

website/scripts/capture-waiting-on-you.mjs mounts the real ChatPage in a capture harness with intercepted API answers. It asserts each state, then writes the frames below in light and dark, plus two recordings. All 230 checks pass. Each frame was also inspected by eye. That inspection found one defect: "Show more" appeared when nothing was hidden. It is fixed by measuring the clamp after layout.

Real-machine verification

Machine: Amazon Linux 2023 cloud desktop, x86_64, 192 vCPU / 740 GiB.
Before (main 6e059d769e): git grep -c WaitingOnYouStack -- website/src -> no matches; no card, tool or route exists.
After (head db54f610fb): node scripts/capture-waiting-on-you.mjs ../temp-screenshots/waiting-on-you -> exit 0, 230 checks pass, 36 frames and 2 recordings written.
Cleanup: own machine; the capture server ran in-process on 127.0.0.1 and exited with the script.

Screenshots / video

A decision card, dark. Options form one list with a single Send:

Decision card, dark

A stack of three asks, collapsed to "+2 more", light:

Stack collapsed, light

More frames: action card, answered elsewhere, needs-me hover card, 390px

Action card with Done, dark

Answered elsewhere, light

Needs-me hover card listing the ask, dark

Decision card at 390px, light

More states: selected option, expanded stack, grid pane, Questions tab, closed draft, returned answer, uncertain, error, read-only, 390px show more and less

Option selected, light

Stack expanded, dark

Grid pane pill, light

Questions tab listing the ask, dark

Closed ask keeping the typed note, light

Answer returned to the message box, dark

Answer may already have been sent, dark

Answer refused, light

Read-only view, dark

Show more at 390px, light

Show less at 390px, dark

A card answered elsewhere turns into its notice in place:

temp-screenshots/waiting-on-you/rec-a-answered-in-place.webm

The stack expanding and collapsing:

temp-screenshots/waiting-on-you/rec-b-stack-expand-collapse.webm

Related Issues

Part of #20961

Supersedes #39362, the same commit on a fork branch, which Sensitive Change Review cannot pass.

Checklist

  • A Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...); PR Hygiene does not count commits
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.

@unstablebrainiac

Copy link
Copy Markdown
Contributor Author

Sensitive change review

Head: 952d355

  • What rule changed: No rule changed. security_posture_sinks_gateway.py gains one registry row, "Waiting-on-you asks an agent pins", pointing at dashboard/handlers/waiting_on_you.py.
  • Before -> after: Before, the new answer handler was an output boundary the security posture panel did not list. After, it is listed beside the change-card entry. No redactor, floor or sandbox code changes.
  • Worst case if wrong: The panel describes this sink inaccurately. The handler still runs every agent-written title, detail and option through the exfiltration-URL and credential redactors before storing it.
  • Evidence checked: test/test_security_posture.py and test/test_security_posture_facade.py pass with the row, and the posture test fails without it because the handler calls the redactors. 110 tests across those and the waiting-on-you agent and answer suites pass on this head.
  • No regression:
    • Tools still work: The row is data read by the posture panel only. No tool, route or gate reads it to allow or refuse anything.
    • Backward compatible: One appended tuple in a static registry. Existing rows and their order are unchanged.
    • Existing tests: All existing security posture tests pass unchanged.
  • How to undo: Revert this PR's commit, which removes the row together with the handler it describes.

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Sensitive Change Review

Sensitive files changed:

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of db54f610fb7ef48b87783172102ea95f928414fa — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: the ask needed somewhere to persist across turns, it is a separate surface that adds to the existing ones, the moved functions' readers are listed and still resolve, and 17 images and 2 recordings of this revision were found.

[DESIGN-REVIEWED] db54f61

Description read

[DESCRIPTION-READ] 9688454740c0aa5d24a698669796212df5353b3228542af133170a71e2090391

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of db54f610fb7ef48b87783172102ea95f928414fa — 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 does not.

First-Principles-Verdict: PASS

The tool is new and sits beside ask_question, [OPTIONS:] and needs_input, which are unchanged. The one judgement call, whether listing the tool to every agent counts as product shape, goes to the tie-breaker.

Notes

  • Item 1 — inherited: the shape rests on "Phase 1 of the design in PR docs(rfc): propose waiting-on-you cards that pin an agent's ask above the composer #39294 (… still draft)". The base RFC list has no waiting-on-you RFC at all. The tool is offered to every dashboard agent by default, so models may pin asks unprompted. I am not treating that as a default change, because no existing path moves.
  • Item 7 — duplicate of the scaffolding in src/kiro_crew/dashboard/change_cards.py:CardStore. It has 1 sibling, found by grepping _store_key/_mac/derive_subkey(STORE_MAC_PURPOSE). WaitingStore._store_key, _mac, _authentic and warm repeat it nearly line for line. Subtraction: lift the vault-subkey MAC and the verify-on-load pair out of CardStore and delete the copy in WaitingStore.

What this change ships

Inventory (10 items) — 8 justified

Intent: keep an agent's request for a person's action or decision in view across turns and restarts until it is resolved. This is an ADDITION.

  1. Agents gain the waiting_on_you and waiting_on_you_clear tools, listed by default — inherited (draft RFC only)
  2. An "Action for you" card is pinned above both composers until it is answered, the person writes, the agent clears it, or 7 days pass — justified
  3. Any live owner message retires every pinned ask; answering one card retires only that card — justified
  4. A card answer arrives as a user row with commands off, using the existing COMMANDS_OFF_META_KEY — justified
  5. A new per-turn [WAITING ON YOU] context block, capped at 6,000 characters — justified
  6. Sidebar rows, the tab strip, grid panes, the hover card and the Questions tab show the asks — justified
  7. A new persisted waiting_on_you.json store with MAC'd records — duplicate of change_cards.py:CardStore persistence
  8. Owner-only answer and dismiss routes; Shared Crew teammates get 403 — justified
  9. The steer-or-queue functions move to chat_send_steer.py to stay under the line cap — justified
  10. 19 screenshots and 2 recordings under temp-screenshots/ — justified

[FIRST-PRINCIPLES-REVIEWED] db54f61

Description read

[DESCRIPTION-READ] ffece6f985072291b5c176d364a5469249f011396fb125ad8e5b6c96a6925b28

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of db54f610fb7ef48b87783172102ea95f928414fa — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing blocks. The blind reader understood and would use the main controls: the option rows, Send and Done. Both state changes (a card turning into its notice in place, and the stack opening and closing) have recordings.

Notes

  • WaitingHeader shows the agent name, so every card reads "ACTION FOR YOU · default". The reader said "no idea" what "· default" means. Leave the agent name out when it is the default agent.
  • The ✕ only says "Dismiss this ask" to screen readers. The reader "can't tell if the assistant would take it as an answer" and would not press it. Add a visible tooltip such as "Dismiss — the agent is told you skipped this".
  • When the crew is paused, the error reads "…so the ask stays pinned. The crew is paused." The reader did not know how to resume and would "try Send again, worried". Add a resume action, or say what resumes it.

[UX-REVIEWED] db54f61

Description read

[DESCRIPTION-READ] 088fabf276b05e336e76966515fb8baef5489761b6457128d925bf7d00e4e41a

That sha256 names everything this verdict read: the PR description, plus the 20 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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — 🔴 changes requested (blocking)

GPT 6.1 found at least one blocking issue that must be resolved before merging db54f610fb7ef48b87783172102ea95f928414fa. 1 of 4 blocking finding(s) are security-class and were withheld from adjudication, so the blocking verdict stands.

This comment is updated in place on each push.

BLOCKING -- src/kiro_crew/dashboard/chat_api/chat_send.py:1797 -- Regenerating an answer restores command execution

_turn_kwargs["_commands_off"] = True
Trigger: The owner submits /goal clear as an action-card note, receives a reply, then regenerates it while a goal loop exists. api_chat_slot_regenerate passes the stored text to _run_chat without _commands_off, so _turn_slash_gate dispatches _handle_goal_command.
Outcome: Regenerate removes the goal loop instead of generating another reply to the literal note.
Anchor: defect
Fix: Restore commands-off from the server-owned waitingOnYou row provenance when regenerating an answer.
Sites: Queued answers reach the same regeneration path through src/kiro_crew/dashboard/chat_turn/queue_drain.py:1327, which removes the queue-only commands-off flag before recording the user row.

BLOCKING -- src/kiro_crew/dashboard/waiting_on_you_events.py:156 -- Lifecycle routes report success after ask cleanup fails

except Exception:
return
Trigger: The waiting-store lock file is unwritable while the transcript remains writable. A successful rewind reaches clearing_on_success → clear_slot → _persist; the write raises, but cleanup swallows the failure.
Outcome: The endpoint returns 200 and dispatches the rewritten turn while discarded-branch asks remain pinned and enter subsequent agent context.
Anchor: persist-before-you-publish
Fix: Make successful clearance a precondition for rewritten-turn dispatch and expose store failure as an explicit retryable outcome rather than log-and-success.
Sites: Regenerate and edit-resend use the same wrapper; forget_slot swallows deletion failures, and _retire_for_message abandons owner-message retirement after the same store failure.

BLOCKING -- src/kiro_crew/dashboard/waiting_on_you.py:653 -- Uncertain answer identifiers bypass retention bounds

uncertain_ids.append(answer_id)
Trigger: Repeated answer sends interrupted before settlement reach api_waiting_on_you_answer → mark_uncertain. reserve continues admitting fresh answer IDs for that same ask; incognito records skip persistence and its file-size cap.
Outcome: A single ask retains every interrupted attempt indefinitely until retirement, increasing gateway memory and each subsequent deep-copy operation without a container bound.
Anchor: a-bound-bounds-every-field-it-retains
Fix: Apply a shared uncertain-ID retention limit at admission and refuse fresh attempts at that limit without discarding identifiers whose retries must remain suppressed.
Sites: _load_text also appends to uncertain_answer_ids; reserve admits the fresh identifiers retained by both writers.

BLOCKING -- website/src/components/waitingOnYou/useWaitingOnYouActions.ts:75 -- Failed composer transfer loses the unsent note

deleteSubmittedDraft()
if (returned) onReturnToComposer!(text)
Trigger: An action answer receives superseded or cleared after the owner navigates away from chat, and browser draft storage rejects writes. The captured callback reaches restoreToComposer → keepInComposer, which returns lost with no mounted composer.
Outcome: The waiting draft is already deleted, no replacement draft exists, and the owner’s unsent note is lost.
Anchor: residual/crash-data-loss-corruption
Fix: Propagate keepInComposer’s shown/kept/lost result through the callbacks and delete the waiting draft only after successful transfer.
Sites: website/src/components/waitingOnYou/WaitingOnYouStack.tsx:108 also deletes its draft without checking transfer success; main-composer, sidebar-hover and Questions-panel callbacks discard the restoration result.

[BLOCK-MERGE] db54f61
[GPT-REVIEWED] db54f61

Adjudication (Opus 5.5) — is blocking on each finding proportionate?

I upheld all three adjudicable findings (F1–F3) and flagged the fenced one (F4); the gate stays blocked on every finding.

F1 — MEDIUM. When an answer is regenerated, the owner's note is run as a slash command, for example /goal clear removing the goal loop. The answer path only sets commands-off from request meta (chat_send.py:330 → :1796-1797), and regenerate re-runs the stored text through _run_chat (chat_regenerate.py:343) without it. The fix is cheap: regenerate already reads the card-origin flag back from row meta (chat_regenerate.py:329), and the same pattern carries over for this flag.

F2 — The finding is anchored to persist-before-you-publish, which is blocking: true in .review-base-rules/AUTOSDE.yaml:1314-1315. The swallow is confirmed at waiting_on_you_events.py:154-158, inside clearing_on_success (:183-187), which runs only after the handler has already dispatched.

F3 — The finding is anchored to a-bound-bounds-every-field-it-retains, which is blocking: true in .review-base-rules/AUTOSDE.yaml:1710-1711. uncertain_answer_ids grows with no cap at waiting_on_you.py:651-653.

F4 (fenced) — The loss is real but needs three conditions at once: a superseded/cleared refusal (useWaitingOnYouActions.ts:80), no mounted composer (composerRestore.ts:26-28), and browser storage rejecting the write (composerRestore.ts:31). At most one short typed note is lost, so a human could plausibly accept the risk.

[ADJUDICATION] db54f610fb7ef48b87783172102ea95f928414fa total=3 uphold=3 downgrade=0
UPHOLD F1 src/kiro_crew/dashboard/chat_api/chat_send.py:1797 reason=harm-warrants-remedy
UPHOLD F2 src/kiro_crew/dashboard/waiting_on_you_events.py:156 reason=autosde-blocking-rule
UPHOLD F3 src/kiro_crew/dashboard/waiting_on_you.py:653 reason=autosde-blocking-rule
[GPT-ADJUDICATED] db54f610fb7ef48b87783172102ea95f928414fa

[ADJUDICATION-FENCED] db54f610fb7ef48b87783172102ea95f928414fa fenced=1 flagged=1
FLAG F4 website/src/components/waitingOnYou/useWaitingOnYouActions.ts:75 -- Losing the note needs a superseded/cleared refusal (:80) while no composer is mounted (composerRestore.ts:26-28) and browser storage rejects the write (composerRestore.ts:31), and it costs at most one short typed note, a residual a human could plausibly accept.
[GPT-ADJUDICATED-FENCED] db54f610fb7ef48b87783172102ea95f928414fa

🏷️ Fenced finding(s) machine-flagged as likely edge case

The security fence keeps these findings blocking regardless of adjudication; the only clearance path is a human override. The annotate-only pass judged the condition combination each one requires extreme, and pre-drafted the override rationale below. A repository writer must independently verify a rationale before posting it — it is machine-authored, and a wrong override on a security-class finding ships exactly the class the fence exists to stop.

  • F4 website/src/components/waitingOnYou/useWaitingOnYouActions.ts:75 — Losing the note needs a superseded/cleared refusal (:80) while no composer is mounted (composerRestore.ts:26-28) and browser storage rejects the write (composerRestore.ts:31), and it costs at most one short typed note, a residual a human could plausibly accept.

    /ai-review override gpt db54f610fb7ef48b87783172102ea95f928414fa <class>: Losing the note needs a superseded/cleared refusal (:80) while no composer is mounted (composerRestore.ts:26-28) and browser storage rejects the write (composerRestore.ts:31), and it costs at most one short typed note, a residual a human could plausibly accept.
    

Replace <class> with the class that records what you did. These findings are real, so for an accepted risk use owner-decision (link the decision comment in the reason) or deferred #<N> (a tracked follow-up issue); false-positive only if you verified the finding is wrong. Not not-applicable: that class files the override as a rule mismatch in the audit.

False positive or not applicable? A repository writer can comment:
/ai-review override gpt db54f610fb7ef48b87783172102ea95f928414fa false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — 🔴 changes requested (blocking)

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

BLOCK: a queued card answer retires its ask as soon as it is queued, so cancelling that queued message tells the agent the ask was "answered by the person" even though no answer ever reaches it.

BLOCKING — src/kiro_crew/dashboard/handlers/waiting_on_you.py:402
queued = resp.status == 202 or receipt.get("queued") is True / retired = await asyncio.shield(store.settle(slot_key, key, ask_id, answer_id, outcome))
Trigger: The agent is busy and the owner clicks an option, so api_chat queues the answer (queue_for_next_turn(..., waiting_on_you=...), and no row is written yet). settle then retires the ask with REASON_ANSWERED and writes a tombstone. The owner then cancels that queued entry with DELETE /api/chat/slots/{slot}/queue/{queue_id}. api_chat_slot_queue_cancel allows this because row_already_written is false, and it never restores the ask. A Stop escalation that runs slot._queue.clear() drops it the same way.
Outcome: The card is gone for good. On the next turn, turn_block hands over the retired record, which render_waiting_on_you shows as "- , answered by the person". The answer text never reaches the agent. A retry with the same answer_id replays the tombstone and sends nothing.
Anchor: defect
Fix: For a queued answer, keep the ask reserved and pinned, and settle it only when the drain writes the row carrying meta.waitingOnYou. Alternatively, have queue cancel and queue clear call store.release for an entry whose meta carries a waitingOnYou claim, and drop its tombstone.

[BLOCK-MERGE] db54f61
[OPUS-REVIEWED] db54f61

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

False positive or not applicable? A repository writer can comment:
/ai-review override fable db54f610fb7ef48b87783172102ea95f928414fa false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 19, 2026
@unstablebrainiac
unstablebrainiac force-pushed the feat/waiting-on-you-cards branch from 952d355 to 2960b1b Compare November 19, 2026 21:38
@unstablebrainiac

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in website/src/i18n/en.context.json, website/src/i18n/pluralKeys.json and all 13 locale catalogs (each conflicted beside the new globalChatSearch keys; resolved as unions) since this head's base (952d355~1 -> a311517); CI re-running. Locally: isort, flake8, black, mypy, docs lint, 301 related backend tests, tsc, eslint, and 1,317 frontend and i18n tests pass on 2960b1b.

@unstablebrainiac

Copy link
Copy Markdown
Contributor Author

Sensitive change review

Head: 2960b1b

  • What rule changed: No rule changed. security_posture_sinks_gateway.py gains one registry row, "Waiting-on-you asks an agent pins", pointing at dashboard/handlers/waiting_on_you.py.
  • Before -> after: Before, the new answer handler was an output boundary the security posture panel did not list. After, it is listed beside the change-card entry. No redactor, floor or sandbox code changes.
  • Worst case if wrong: The panel describes this sink inaccurately. The handler still runs every agent-written title, detail and option through the exfiltration-URL and credential redactors before storing it.
  • Evidence checked: test/test_security_posture.py and test/test_security_posture_facade.py pass with the row, and the posture test fails without it because the handler calls the redactors. 110 tests across those and the waiting-on-you agent and answer suites pass on this head.
  • No regression:
    • Tools still work: The row is data read by the posture panel only. No tool, route or gate reads it to allow or refuse anything.
    • Backward compatible: One appended tuple in a static registry. Existing rows and their order are unchanged.
    • Existing tests: All existing security posture tests pass unchanged.
  • How to undo: Revert this PR's commit, which removes the row together with the handler it describes.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention 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 readiness: checking Automated validation is still running labels Nov 19, 2026
@unstablebrainiac
unstablebrainiac force-pushed the feat/waiting-on-you-cards branch from 2960b1b to 94a2ee5 Compare November 19, 2026 23:10
@unstablebrainiac

Copy link
Copy Markdown
Contributor Author

Sensitive change review

Head: 94a2ee5

  • What rule changed: No rule changed. security_posture_sinks_gateway.py gains one registry row, "Waiting-on-you asks an agent pins", pointing at dashboard/handlers/waiting_on_you.py.
  • Before -> after: Before, the new answer handler was an output boundary the security posture panel did not list. After, it is listed beside the change-card entry. No redactor, floor or sandbox code changes.
  • Worst case if wrong: The panel describes this sink inaccurately. The handler still runs every agent-written title, detail and option through the exfiltration-URL and credential redactors before storing it.
  • Evidence checked: test/test_security_posture.py and test/test_security_posture_facade.py pass with the row, and the posture test fails without it because the handler calls the redactors. 110 tests across those and the waiting-on-you agent and answer suites pass on this head.
  • No regression:
    • Tools still work: The row is data read by the posture panel only. No tool, route or gate reads it to allow or refuse anything.
    • Backward compatible: One appended tuple in a static registry. Existing rows and their order are unchanged.
    • Existing tests: All existing security posture tests pass unchanged.
  • How to undo: Revert this PR's commit, which removes the row together with the handler it describes.

@github-actions github-actions Bot removed the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 19, 2026
@unstablebrainiac
unstablebrainiac force-pushed the feat/waiting-on-you-cards branch from 94a2ee5 to 1f36404 Compare November 20, 2026 00:42
@unstablebrainiac

Copy link
Copy Markdown
Contributor Author

Sensitive change review

Head: 1f36404

  • What rule changed: No rule changed. security_posture_sinks_gateway.py gains one registry row, "Waiting-on-you asks an agent pins", pointing at dashboard/handlers/waiting_on_you.py.
  • Before -> after: Before, the new answer handler was an output boundary the security posture panel did not list. After, it is listed beside the change-card entry. No redactor, floor or sandbox code changes.
  • Worst case if wrong: The panel describes this sink inaccurately. The handler still runs every agent-written title, detail and option through the exfiltration-URL and credential redactors before storing it.
  • Evidence checked: test/test_security_posture.py and test/test_security_posture_facade.py pass with the row, and the posture test fails without it because the handler calls the redactors. 110 tests across those and the waiting-on-you agent and answer suites pass on this head.
  • No regression:
    • Tools still work: The row is data read by the posture panel only. No tool, route or gate reads it to allow or refuse anything.
    • Backward compatible: One appended tuple in a static registry. Existing rows and their order are unchanged.
    • Existing tests: All existing security posture tests pass unchanged.
  • How to undo: Revert this PR's commit, which removes the row together with the handler it describes.

@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 Nov 20, 2026
@unstablebrainiac
unstablebrainiac force-pushed the feat/waiting-on-you-cards branch from 1f36404 to bc62581 Compare November 20, 2026 01:23
@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 Nov 20, 2026
@unstablebrainiac

Copy link
Copy Markdown
Contributor Author

Sensitive change review

Head: bc62581

  • What rule changed: No rule changed. security_posture_sinks_gateway.py gains one registry row, "Waiting-on-you asks an agent pins", pointing at dashboard/handlers/waiting_on_you.py.
  • Before -> after: Before, the new answer handler was an output boundary the security posture panel did not list. After, it is listed beside the change-card entry. No redactor, floor or sandbox code changes.
  • Worst case if wrong: The panel describes this sink inaccurately. The handler still runs every agent-written title, detail and option through the exfiltration-URL and credential redactors before storing it.
  • Evidence checked: test/test_security_posture.py and test/test_security_posture_facade.py pass with the row, and the posture test fails without it because the handler calls the redactors. 110 tests across those and the waiting-on-you agent and answer suites pass on this head.
  • No regression:
    • Tools still work: The row is data read by the posture panel only. No tool, route or gate reads it to allow or refuse anything.
    • Backward compatible: One appended tuple in a static registry. Existing rows and their order are unchanged.
    • Existing tests: All existing security posture tests pass unchanged.
  • How to undo: Revert this PR's commit, which removes the row together with the handler it describes.

@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: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 20, 2026
@unstablebrainiac
unstablebrainiac force-pushed the feat/waiting-on-you-cards branch from bc62581 to ebb359a Compare November 20, 2026 02:39
@unstablebrainiac

Copy link
Copy Markdown
Contributor Author

Sensitive change review

Head: ebb359a

  • What rule changed: No rule changed. security_posture_sinks_gateway.py gains one registry row, "Waiting-on-you asks an agent pins", pointing at dashboard/handlers/waiting_on_you.py.
  • Before -> after: Before, the new answer handler was an output boundary the security posture panel did not list. After, it is listed beside the change-card entry. No redactor, floor or sandbox code changes.
  • Worst case if wrong: The panel describes this sink inaccurately. The handler still runs every agent-written title, detail and option through the exfiltration-URL and credential redactors before storing it.
  • Evidence checked: test/test_security_posture.py and test/test_security_posture_facade.py pass with the row, and the posture test fails without it because the handler calls the redactors. 110 tests across those and the waiting-on-you agent and answer suites pass on this head.
  • No regression:
    • Tools still work: The row is data read by the posture panel only. No tool, route or gate reads it to allow or refuse anything.
    • Backward compatible: One appended tuple in a static registry. Existing rows and their order are unchanged.
    • Existing tests: All existing security posture tests pass unchanged.
  • How to undo: Revert this PR's commit, which removes the row together with the handler it describes.

@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 Nov 20, 2026
@unstablebrainiac

Copy link
Copy Markdown
Contributor Author

Sensitive change review

Head: db54f61

  • What rule changed: No rule changed. security_posture_sinks_gateway.py gains one registry row, "Waiting-on-you asks an agent pins", pointing at dashboard/handlers/waiting_on_you.py.
  • Before -> after: Before, the new answer handler was an output boundary the security posture panel did not list. After, it is listed beside the change-card entry. No redactor, floor or sandbox code changes.
  • Worst case if wrong: The panel describes this sink inaccurately. The handler still runs every agent-written title, detail and option through the exfiltration-URL and credential redactors before storing it.
  • Evidence checked: test/test_security_posture.py and test/test_security_posture_facade.py pass with the row, and the posture test fails without it because the handler calls the redactors. 110 tests across those and the waiting-on-you agent and answer suites pass on this head.
  • No regression:
    • Tools still work: The row is data read by the posture panel only. No tool, route or gate reads it to allow or refuse anything.
    • Backward compatible: One appended tuple in a static registry. Existing rows and their order are unchanged.
    • Existing tests: All existing security posture tests pass unchanged.
  • How to undo: Revert this PR's commit, which removes the row together with the handler it describes.

@unstablebrainiac
unstablebrainiac force-pushed the feat/waiting-on-you-cards branch from ebb359a to db54f61 Compare November 20, 2026 02:59
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: checking Automated validation is still running labels Nov 20, 2026

This branch has not been deployed

No deployments
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 readiness: action required A blocking check or review needs attention

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant