Skip to content

Inbox: an agent can mark a question answered in the person's reply - #4161

Merged
backnotprop merged 25 commits into
mainfrom
feat/inbox-answered-in-words
Nov 29, 2026
Merged

backnotprop merged 25 commits into
mainfrom
feat/inbox-answered-in-words

Conversation

@backnotprop

@backnotprop backnotprop commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

Agent-facing wording awaits the owner's approval; do not merge.

If the person answers a question in the words of their reply rather than on the card, the agent that asked it can mark the question answered by that reply. The card then shows:

  • the person's own words as the answer;
  • "Claude Code took this from your reply · 5:16 PM";
  • a link down to the reply;
  • one Reopen control.

Reopen puts the question back exactly as it was and leaves a note telling the agent not to use those words as the answer.

What the agent sends: send_message gains answered_in_reply: [{"question": "<msg>/<key>", "quote"?: "<exact words>", "reply"?: "<msg id>"}]. The server writes the quote; the agent never writes the answer. The rules:

  • Only the asking session can mark a question (same session, host and computer). A question asked or marked with no session can't be marked, and the agent is told why. The question must be open, or picked and not yet sent.
  • The reply has to be the person's own words in the same thread, after the question and after any Reopen of it. It must have been sent to the asking session and delivered to it or read by that same session; a read with no session reaches nobody. It must hold words the person wrote: the Inbox's action items report never counts. With one such reply it is the default. With more, the entry gives quote (the reply holding those words is used, the reply_to one first) or names reply. The result names, per question, the reply and the words used.
  • If the person picked on the card after that reply, the question can't be marked.
  • The quote must be whole words copied exactly from one paragraph of the person's own words, never from text a Send appends (action items, every feedback section, the skills block) and never from lines the person quoted with >. Without a quote, the whole reply is used, cut at 500 characters.
  • A send from this computer is refused whole (invalid_answered_in_reply, 422) with a one-line reason for each entry.
  • A pick on a marked question is refused (question_answered_in_reply, 409). The window shows a plain line and reads the thread again.

Where it counts: a marked question is not open anywhere. That covers the foot, the folded chip, the list, read_thread (shown with the quote), search, Decide, Mark read, Re-ask and the decision export (answered_in_words).

Linked computers (mark answered-in-reply):

  • The field goes to a computer only when that computer lists the mark. Otherwise the message goes without it, and the result says so in one line.
  • A send that waited for the other computer skips entries that no longer hold, and still lands. The result says which, and a note to the agent (never listed in the thread) tells it later.
  • Reopen appears only when the thread's computer lists the mark.

The reply body's still-open line is unchanged from main, so older windows and phones still strip it. The hint lives in the wake line and the tool text only.

The mobile contract is regenerated in this PR (apps/mobile/contract; nothing under apps/mobile/ios). No data migration, no new keyboard shortcuts, no confirmations.

Known limits:

  • "Couldn't reopen it. Try again." renders grey, not red.
  • Words that only name an option are taken as written: "Not option B" quoted as "option B" is accepted (whole words). The card shows the quote, and Reopen is the backstop.
  • The opening line of a pull request review ("I approved pull request #N") can be quoted.

@backnotprop backnotprop added the ci:e2e Run the full browser suite (Inbox window e2e) on this PR label Nov 28, 2026
…exports stay as they are; e2e reply button and shard time
…k; the reply the agent answers is the default; reopened and taken-back replies no longer count
…ead it; the hint stays in the wake line and tool text
…ssion, never older than a card pick; the person's own words only, whole words; far sends skip stale entries; plain 409 and Reopen failure in the window
…n-words

# Conflicts:
#	apps/mobile/contract/generated/swift/Wire.swift
#	apps/mobile/contract/parity/ledger.json
#	packages/core/inbox-types.ts
An action items report, every section a Send appends (the running app's and a
pull request's feedback included) and lines quoted with > are never the
person's words. A reply counts only when that same session got or read it.
With more than one reply, the entry gives quote or names reply; the result
names the reply and words used. A question asked or marked with no session
says so. A far send's skipped marks leave a note for the agent, and a replay
gives the real reason. The 409 text suits any reader.
… agent's only

The asking session's read of a reply replaces a read another reader left
(no session, or another agent), unless it was delivered, so a peek or another
agent reading first never locks it out. A reply that has not reached the
agent tells it to read the thread with its session, and words found only in
such a reply say so. The not_marked note is never listed in the thread and
reaches the agent through its wake; a replay gives that note's reason. The
field description drops two clauses the refusals already say.
…n-words

# Conflicts:
#	apps/mobile/contract/parity/ledger.json
…n-words

# Conflicts:
#	apps/mobile/contract/generated/swift/Wire.swift
#	apps/mobile/contract/parity/ledger.json
…n-words

# Conflicts:
#	apps/mobile/contract/generated/swift/Wire.swift
#	apps/mobile/contract/parity/ledger.json
@backnotprop
backnotprop marked this pull request as ready for review November 29, 2026 01:25
@backnotprop
backnotprop merged commit 43e9751 into main Nov 29, 2026
110 of 113 checks passed
DuongCoder04 pushed a commit to DuongCoder04/plannotator that referenced this pull request Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:e2e Run the full browser suite (Inbox window e2e) on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant