Repository navigation
Inbox: an agent can replace an earlier question - #1838
Merged
Merged
Conversation
send_message (and submit_guide) take supersedes: ["<message id>"] or
["<message id>/<key>"], and a question block can carry a
Replaces: <message id>/<key> line (never the prompt). A superseded question
derives state "superseded" with superseded_by { message_id, key | null };
answering it is refused 422 question_superseded, a pick saved on it stays
visible as Not sent and is never sent, and an id that names no open
question of the thread refuses the whole send with invalid_supersedes,
listing the thread's open questions. The window draws the Quiet card
(Replaced / No longer applies), the newer card's Replaces line, the reply
notice and the stale guard at Send. Store stays append-only.
- Replaces: is read only when every token is id-shaped (a message id, optionally /key, or a bare key; one trailing period dropped), so prose such as "Replaces: q-learning with PPO" stays prose. - A pick or decision switch that meets 422 question_superseded sets no error; the thread is read again and the card redraws as Replaced. - Two blocks naming the same old question refuse the send. - The relay pushes for any message that superseded a question (question null for a withdrawal) so it collapses over the stale notification, and only ever offers an open question. - inbox --help: a replayed key with another supersedes is refused.
backnotprop
added a commit
that referenced
this pull request
Oct 11, 2026
… 'changed' line) (#1851) * Inbox: a quiet project in the sidebar no longer draws as a question card * Inbox: the replaced-question notice no longer restyles the attachment pane's changed line
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An agent can now replace an earlier question in an Inbox thread, or say it no longer applies. Built per the owner-approved design: direction A "Quiet", with every recommended default. The design record is not in this repo.
Agent side
send_messagetakessupersedes: ["<message id>"](every open question of that message) or["<message id>/<key>"]. So doessubmit_guide, throughSEND_ROUTING_FIELDS.Replaces: <message id>/<key>. Core's parser reads it whenever the value starts withmsg_orq-, wherever the line sits.Replaces:line stays prose.Replaces:line names its own block's question.invalid_supersedes: …, which names each bad id and lists the thread's open questions (<message id>/<key> (<prompt>), also inopen_questions).SUPERSEDES_DESCRIPTIONis the field's own description, so it reaches the model whole. The send_message description is unchanged, and the guide's working part still survives the 2,048-character cut.plannotator inbox --helpdocumentssupersedesandReplaces:, with an example the test parses. Theplannotatorskill and the marketing reference also cover them.plannotator_inboxis built fromtools/list, and a test checks thatsupersedescomes through.Store (append-only)
superseded_by. Any decision draft on it is dropped.supersededwins overclosed. Old stores replay unchanged.store.test.tsnow includes supersedes, so round-trip, seq and routing-determinism properties all cover it.422 question_superseded.superseded_bychain. The root recordssubject_question; older roots are inferred. An agent's own subject never changes, and neither does the subject after a withdrawal.Window
@plannotator/uigets two additive Viewer seams,renderQuestionCardandrenderQuestionBelowPrompt, documented in its README and HANDOFF. They add no stylesheet classes; the guides.show manifest check is in sync.Phone (Workspaces repo): the wire is additive
InboxQuestion.statecan now be"superseded".InboxQuestion.superseded_by: { message_id, key: string | null } | null, also on the stored question record.InboxMessage.supersedes?: string[]: what the agent asked for.InboxMessage.subject_question?: string | null, on a root.picksandreplyanswer422 question_superseded(withsuperseded_by); thedecisionswitch answers the same.superseded: string[].The surface in this repo draws no question cards; the shell draws message bodies natively. So on the phone, a superseded card should be locked like any card that is not open or picked, and drawn as the Quiet card.
Tests
packages/shared/inbox/store-supersede.test.ts: supersede by key, by message and byReplaces:; replay and append-only; idempotency; refusals; picks never sent; decision draft dropped; sections; derived subject and chain.packages/server/inbox-supersede.test.ts: the real server through the MCP SDK client:supersedes,Replaces:,invalid_supersedeslisting the open keys,submit_guideand the agent-tool schema, and 422 on picks, Send and the decision switch. It puts a tailscale trap first on PATH.packages/inbox/replaced.test.tsx(DOM, added to thetest.ymllist): the card, the links, the no-replacement card, and the stale guard (once, Esc, words only, Answer the new question, the 422 race).tests/e2e/inbox-replaced.spec.ts: Playwright on the compiled binary.Replaces:; the inbox-help guide test.Push (review follow-up)
question: null, so no lock-screen answer actions, and it collapses over the stale notification on the thread's collapse id. The summary's shape is otherwise unchanged.questionis only ever an open question.packages/server/inbox-relay-push.test.ts, with a fake loopback relay; envelopes are opened with the phone's key.Review fixes
Replaces:is read only when every token on it is id-shaped. Lines such asReplaces: q-learning with PPO…andReplaces: msg_ queue drain…stay prose.question_supersededsets no error; the thread is read again and the card redraws as Replaced.invalid_supersedes.