Repository navigation
feat: show delegation wake messages as a notice, and add client pair state - #634
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
This branch was successfully deployed
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.
Problem
When a delegated thread or a pair executor changes state, Pylon sends its parent an automatic message written for the agent: a preamble, one JSON line per child, and a paragraph of rules. Web and mobile both showed it as a user bubble, so the user saw a wall of JSON in their own voice, with the edit and rewind actions of a real message.
Separately, neither client had a way to tell whether a thread is paired, to find its executor, or to build the command that turns a pair on.
What changed
The notice
parseDelegationNoticein client-runtime reads only a user-role message whose id has the server'sdelegation-follow-through:prefix, so a person who pastes similar text still sees their own words. It keeps each child's thread, title, status, and one-line failure reason, skips malformed lines, and returns null when nothing usable was read, which falls back to the original text rather than an empty box. Its tests are built from the exact textformatDelegationFollowThroughPromptproduces.DelegationNoticeRowreplaces the bubble with one quiet line per thread (status dot, headline, title, failure reason, Open link). It hasrole="status", an info outline when something is waiting on the user, and none of a message's actions.UserTimelineRowis split so the message row's hooks stay unconditional.Client pair foundations, which the notice uses to tell an executor from a fan-out child and which the pair control builds on next
@t3tools/shared/delegatedThreads: a synchronouspairExecutorThreadIdandisPairExecutorThreadId, tested against the server's formula, including lead ids that contain colons.@t3tools/client-runtime/state/pair: whether a lead can pair and the reason if not, whether the pair is on, what the executor is doing (reusing the client's existing delegated-child status rule, now exported), hiding executors from thread lists, and thethread.createfields that turn a pair on.Evidence
Verified in an isolated dev server with a seeded thread holding two real wake messages. Before: the raw JSON bubble, as reported by the maintainer. After: "Executor finished · Executor · Fix the parser · Open" as one quiet row, and a second notice with the info outline listing "Delegated thread needs your approval" and "Executor failed" with its reason in red. The agent-facing text is absent from the page. Before and after images were shown to the maintainer in the working thread; they are not committed.
Verification
DelegationNoticeRow,MessagesTimeline,MessagesTimeline.logic, and mobilethreadActivity: all passed on the lead's independent run; after the hooks fix,MessagesTimelineandDelegationNoticeRow: 67 passed.vp run -Ftypecheck for client-runtime, shared, web, and mobile: 0 errors.vp run knip:check: exit 0.Not covered
Part of #622.
Contracts, tests, hooks fix, and review by Claude Fable 5.1 in Claude Code; implementation by Gemini 3.8 Flash (High) in Antigravity, as a Pylon delegated child.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.