Pills stay one per client (VS Code, the Claude app, Codex…), but every
event now goes to its session on the SessionBoard and the pill shows the
board:
- name, steps, state and last message are those of the session the pill
shows, the most urgent else the one active last, no longer the oldest
(PillSessionRegistry.displayOwner), and the steps are that session's
only, not a feed shared by every session
- every session finishes on its own: its sound and its "finished",
even while a sibling works ("N session(s) still working" swallowed
them), and for 5 s the pill shows the session that finished; a failure
shows for 30 s
- with several sessions behind it, the pill carries their lines for the
open card (title, state, last step)
- a session that starts waiting for a permission or an answer while it
shares the pill pops out into "<pill>#2"…, named after it, right after
its client's pill; its card, focus and iPhone record are that pill's
(QueuedApproval / QueuedQuestion .shownPill). It folds back after the
answer, a timeout or a denial (3 s at least), or at SessionEnd. A
session alone in its pill waits there, as before
- the Claude app's pill takes the session's title; other agents' pills
keep the agent's name
The approval/question "defer" that held the pill's state is gone: a
waiting session's state comes from the queues. Sessions the registry let
go leave the board.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Groundwork for a pill per session: a pill ID with a "#" suffix
("integration_claude#2") stands for its client's pill. PillCatalog
.basePillId strips it, definition(for:) reads through it, and
AgentTask.pill gives the client pill of a task. The places that ask which
client a pill is (open its app, hooks status, "Always" on the card,
handled/waiting notes, the host shown on a terminal session, the weekly
recap's top agent, instructions from the iPhone and its composer) compare
.pill, not .id. Nothing creates such IDs yet, so nothing changes.
Each pill's notes name its own session's host, no longer always the
first Claude Code pill's. Instructions from the iPhone resume the session
of the pill they were sent to, a session's own pill included. A
question's own iPhone record becomes "<pill>#q<n>" and takes no
instructions, so it can never meet a session pill's "<pill>#<n>".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A pure FIFO of pending AskUserQuestions, like ApprovalQueue: one per
session (a session asking again takes its older question's place and
slot), up to 5. Each question gets a slot on its pill for the iPhone: the
pill's own record for the first, "<pill>#2"… for the others, kept for the
question's life. QuestionQueue.question(answering:onRecord:…) finds the
question an iPhone answer is for, by fingerprint and record, so two
sessions asking the very same question each get their own answer.
Tests in scripts/test-question-queue.sh, in the Build workflow.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>