Conversation
# Conflicts: # .github/workflows/test.yml # AGENTS.md # apps/hook/hooks/mod/inbox.ts # apps/hook/server/inbox-help.ts # packages/inbox/inbox.css # packages/server/inbox-mcp.ts # packages/server/inbox-sessions.ts # packages/shared/inbox/agent-link.ts # tests/e2e/playwright.config.ts # tests/helpers/inbox-dom-server.ts
A tagged agent is told to read the thread first. Its read_thread (and its wait_for_reply) marked the thread agent-checked, which settles every plain reply up to that point, so an earlier untagged reply still queued for the owner's connection was never delivered. A session that only has a tag in a thread (never wrote there, owns none of the person's messages) no longer marks the thread checked or its acks seen.
- One Send tags once: every tag in the words and in every comment it carries rides the last reply only, deduped (sendTagsByTarget), so an agent tagged twice gets one reply and one wake, and a comment tag on an earlier target still sends the whole reply. - Wake lines naming another agent (tagged owner, also_tagged, redirected_from) carry only a host's own name: the server maps hosts through INBOX_HOST_NAMES, and inboxWakeText keeps only a name in INBOX_WAKE_AGENT_NAMES; anything else reads "another agent". An MCP agent's self-chosen agent_host no longer reaches another session's prompt. Contract copied into the mod. - A tag whose host does not match the known session: 409 tag_host_mismatch, not "not live any more". - A reply with no owner tagging only MCP agents stays Sent until one of them takes or reads it. - wait_for_reply reads the tagged threads once per call. - A sent reply's tag chip carries the agent's mark over the @ (approved shot 5), drawn in a layer of the message's own.
An Escape that lands right after a Save, before the effect re-binds its listener, saw the edit as still open and closed nothing, so the list stayed up (the Inbox window e2e on CI). The listener now reads the edit state from a ref. The tag marks' painter also stops once disposed (a fonts.ready that settles after unmount painted again).
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.
Builds the owner-approved "tag agents in a reply or a comment" (approval
inbox-tag-agents, Lines variant).What it does
@in the reply box opens the live agent sessions of every project, grouped by agent: the owner first ("Owns this thread"), then each agent, and last the agents that read the Inbox through MCP only ("Reads the Inbox, not woken"). It follows the skill picker's rules: nothing is active until you arrow onto a row, Enter/Tab/Mod+Enter keep their meaning, Escape closes the picker before the reply box, the field hasaria-autocomplete/aria-controls/aria-activedescendant, and a live region says what a pick means.@is only a composer trigger; no new shortcut.@tokens painted, and one line per recipient, each with its own Delivered/Queued/Sending/Saved state and its own Send now. The list row reads "1 of 3 delivered · Pi queued". The thread head and the row show the agents' marks overlapping.Wire (all additive)
tags: [{ host, session, name?, label?, wakes, delivery?, deliver_now_at?, read_at? }]. It never includes the owner; there is no copy per agent. The reply route takestags: [{ host?, session, label? }]and checks them before anything is written. The store parses them again, fail-closed.GET /api/inbox/threads/:id/taggablelists who can be tagged;?recipients=on the sessions route returns each tagged session's connection;send-nowtakes{ session }. The device door forwardstagsunchanged, andGET threads/:id/taggableis on it (contract 7.60).connection.ts, with a byte-equal copy in the mod): the poll capabilitytags: true, the command fieldstagged: { owner }/also_tagged,INBOX_TAGGED_INSTRUCTION,inboxTaggedLineandinboxAlsoTaggedLine. A connection that does not send the capability is never handed what it was only tagged in, so an older plugin can never word a tag as "the person replied to you". The mod, Pi and OpenCode send it. On Pi and OpenCode a tagged command's claim is<reply id>.<session>, so two sessions that share one data dir are each delivered once.wait_for_replywithout a thread also waits on threads the caller was tagged in (in any project) and returnstagged_you: true. The windowedread_threadshowsto(the owner) andtagged: [{ agent, session, you }]on each message, and the transcript reads "to another session (…) · tagged you". Tagged threads appear in the list withtagged_you. An MCP agent's own read recordsread_aton its tag.The required bug fix
Before this change, a reply without
tocounted as read when ANY agent read the thread. So a tagged agent that followed its wake's instruction to read the thread first would swallow the owner's wake. A reply with tags now counts as received for each recipient only when that recipient's own connection delivers it, or that session's ownwait_for_replyreturns it. A tagged session's delivery marks nothing for the owner. This is proved ininbox-tags.test.ts(the tagged read happens before the owner's poll, and the owner is still handed the reply), in the mod test, in the e2e, and by a property instore.test.ts(the op model sends tagged replies and tagged deliveries; routing determinism and the round trip still hold).ui seam (additive, byte-identical when absent)
MentionSource.kindsMentionSource.matchDetailMentionSource.renderNoticeMentionPerson.group(MentionPicker draws runs of one group asrole="group"under a heading;mentionGroupsis exported)These are documented in
packages/ui/README.mdandHANDOFF.md.Merged origin/main
Merged with a merge commit after #2001, #2002 and #2003. Conflicts in the poll fields, the live sessions, the MCP read path, CSS and docs were kept on both sides. Tags are carried into #2002's windowed
read_threadtranscript.Tests
inbox-tags.test.ts(the delivery rule and the bug, the capability, refusals, MCP tags, cross-project answers, Send now, recipients, the windowed transcript; Pi and OpenCodeInboxWakewith stand-in targets sharing one claims folder),connection-tags.test.ts, the door's 7.60 ininbox-devices.test.ts, and the property instore.test.ts.apps/hook/hooks/mod/inbox.test.ts10b: the owner and one tagged session are each woken once with the right wake text, and the tagged read never swallows the owner's wake.packages/inbox/tags.test.ts; the DOM testpackages/inbox/tagAgents.test.tsxoverinbox-dom-server.tstags(added to the test.yml DOM list); the ui seam tests inCommentPopover.mentionSource.test.tsxandmentions.test.ts.tests/e2e/inbox-tags.spec.tson the compiled binary, desktop and phone (44 px rows; nothing overflows at 320 px).Locally: the full
bun testrun, typecheck, the DOM lists, and the tags, send-now, ended-session and new-message e2e specs all pass.Not covered / follow-ups