Repository navigation
Conversation
Adds the shared /handoff rules (parse, title, when it can run, and the provider-command collision rule) and a client operation that dispatches the existing thread.fork at latest_stable into a listed thread.
Android's header overflow, the iOS header Share menu and the command palette offer Hand off to new thread, Share with guest (New guest link while one is active) and Stop sharing. Creating a link copies it and opens the share sheet; server refusals name where to turn links on.
T3's /handoff is listed before a provider command of the same name; picking the provider's from the menu still sends it to the provider.
Same rules as mobile: a whole-message command that forks at the latest finished reply, opens the new thread and sends the focus there, with a provider /handoff kept reachable from the menu.
6 tasks
This branch has not been 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.
Closes #72. Fork prototype; upstream venue
upstream discussion 30355.Problem
On Android there was no way to hand a session off to a new thread or to share it with a friend:
the thread's ⋮ menu had neither, and typing
/handoffshowed no popup. Mobile could only manage aguest link someone had already created on web.
What existed (upstream main
550c5fa34b)serverEnvironment.createGuestShare(
packages/client-runtime/src/state/server.ts), created from web's sidebar/thread menu and commandpalette. Mobile only had
ThreadGuestShareBar(stop sharing; send/dismiss guest messages).thread.forkwithsourcePoint: latest_stable(Orchestrator.tslatestStableRun) alreadyforks a thread at its latest completed, checkpointed run into a listed thread;
forkSideChatusesit with
sideChat: true. Cross-provider context moves automatically./handoffanywhere. Mobile slash menu:/model/plan/default, then provider commands.Change
No server command or contract change; client only.
packages/shared/src/threadHandoff.ts):/handoff [focus]as the wholemessage; new thread title
<title> (handoff); available once a reply has finished and nothing isrunning (mirrors the server's
latest_stable); the provider-collision rule.threadEnvironment.forkForHandoff:thread.forkatlatest_stablewithoutsideChat./handoff [focus]in web and mobile composers: forks, waits for the new thread, sends thefocus text there as its first message (with the new thread's own modes), and opens it. The menu
item shows why it is unavailable when it cannot run; attachments/context are refused with a
message.
/handoffstays reachable: T3's built-in is listed first; the provider's islisted after it with its own description (or "The provider's own command"). Picking the
provider's item from the menu sends the text to the provider; typing
/handoffor picking T3'sruns the handoff.
palette offer Hand off to new thread, Share with guest (→ New guest link with a confirm
while one is active) and Stop sharing. Creating a link copies it and opens the native share
sheet.
GuestShareCreateErrorreasons map to copy that says where to fix it (guest links off →Settings → Labs → Guest links on the machine running T3 Code; no T3 Connect → start it there).
docs/user/guest-links.md(mobile creates links),docs/user/composer.md(Hand off to a newthread).
Entry points added
/handoff [focus]/handoff [focus]; command palette (same three)/handoff [focus]; command paletteVerification
Run on the exact head
f7ea30a09ain a clean tarball checkout on a fleet runner(
kvnloo/fleet-runnerrun 41719040164, avrea-ubuntu-latest-8-vcpu, Node 26.12.1, pnpm 12.14.0,pnpm install --frozen-lockfile). groot could not install: the OOM guard killedpnpm installthree times.
Negative controls in the same run (tests must bite):
resolveHandoffSend→threadHandoff.test.tsfails"the provider's picked /handoff goes to the provider" (
expected { focus: 'tests' } to be null).composerSlashCommandSearch.test.tsfails"lists T3's /handoff first and keeps the provider's /handoff reachable" (order flipped).
Not verified
forkForHandoff(it reuses thethread.forkpath the server testscover; no server code changed, so no server test was added).
needs the thread's runs, which only the chat view holds.
Commit map
d4ff6d5670feat(client-runtime): fork a thread at its latest reply for /handoff — shared rules +tests,
forkForHandoff.353ee0272ffeat(mobile): share with guest and hand off from the thread menus — action builder +tests,
useThreadShareActions, Android overflow, iOS Share menu, command palette.96ef9399fdfeat(mobile): /handoff [focus] in the composer — slash item, collision rule, send.0cc4192f24feat(web): /handoff [focus] in the composer — slash item, collision rule, send,useThreadHandoff.f7ea30a09adocs(user): mobile guest links and /handoff.Model and harness: Claude Opus 5.5 via Hermes ACP in T3 Code.