Skip to content

patch: move a thread to another machine, committing and pushing first - #69

Merged
louisefindlay23 merged 1 commit into
mainfrom
patch/move-thread-to-machine
Nov 27, 2026
Merged

louisefindlay23 merged 1 commit into
mainfrom
patch/move-thread-to-machine

Conversation

@louisefindlay23

@louisefindlay23 louisefindlay23 commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

Problem

A thread is stuck on the machine it started on. To keep going elsewhere you start a new thread and paste context by hand, and the original stays active.

Change

Carries the upstream draft pingdotgg#41771 into the fork build, rebased onto current main:

  • Web and desktop get a "Move to…" submenu in the sidebar and chat header. Its entries are the other connected machines, and picking one opens MoveThreadDialog with a project picker. A command palette action per machine opens the same dialog. If the target lacks the project, the dialog offers "Add project to ".
  • Mobile gets "Move to another machine…" in the thread row menu and a move sheet.
  • The server gets threadMove.export, import and complete, and agents get t3_thread_move. The original thread is archived with a "Moved to …" notice, and unarchiving it reverses the move.

On top of the draft:

  • A new threadMove.prepare call (operate scope) commits any uncommitted files on the thread's branch and pushes the branch, so the target receives the work. The client move and the t3_thread_move tool both call it first. If the push fails the move stops and the original thread is left as it was. A folder that is not a Git repository has nothing to carry and does not block the move.
  • The web and mobile dialogs say what will be committed and pushed, in every web and mobile locale. docs/user/thread-sidebar.md is updated.
  • The fork's "Move to project" menu stays next to the new entry on web and mobile.
  • AGENTS.md says to include mobile in every change that benefits it.

Patched nightly

  • Include this change in patched nightlies
  • Keep this change out of patched nightlies

Scope

A feature for the fork build, requested directly by Louise. Fork-only; no upstream PR. It tracks pingdotgg#41771, which is still an open draft, so the next upstream sync may conflict with it.

Verification

Run on a Linux host with no browser and no devices:

  • Typecheck passes for contracts, client-runtime, server, web, mobile and evals, run one package at a time because running all in parallel is killed for memory on this host. vp run i18n:check, format, lint and knip pass.
  • 840 server tests pass in the changed areas (move service, MCP, peer, ws, launch, agent context budget), plus the client-runtime and web menu tests. The new server test covers committing two files, pushing, and skipping a non-repository folder.
  • The agent context budget grew to 63222 bytes because of the new MCP tools. I did not run the evals in evals/README.md.

Not checked:

  • Browser tests (no Playwright Chromium here) and vp unused patches (no pnpm on PATH).
  • Any real client: no web, desktop or iOS/Android run of the move flow, and no remote or tunnel connection.
  • A desktop installer build.
  • A push to a remote that rejects it (hooks, auth). The move should stop, but I only tested it with a mocked push.

This PR had no CI because it conflicted with main after an upstream sync landed; GitHub does not start pull_request workflows for a conflicting PR. It is rebased now.

Model and harness: Claude Sonnet 5.5 in Claude Code, running inside T3 Code. Upstream draft by Jason Laster.

🤖 Generated with Claude Code

@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:XXL labels Nov 26, 2026
@github-actions

Copy link
Copy Markdown

This PR changes the test suite by +20 test cases (browser 0, unit +6, server +14).

Keep tests that would fail for a real reason, and test logic below the UI where it can be. See Testing.

Threads were stuck on the machine they started on. This carries the
upstream draft pingdotgg#41771 into the fork build: a "Move to…"
menu on web and desktop and a "Move to another machine…" action on
mobile export the thread, import it into the same project on the target
(or add the project there first), and archive the original.

On top of that draft, moving first commits any uncommitted files on the
thread's branch and pushes the branch through a new threadMove.prepare
call, so the target receives the work. If the push fails the move stops
and the original thread is left as it was. Merging into main also keeps
the fork's "Move to project" menu next to the new one.

Co-Authored-By: Jason Laster <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@louisefindlay23
louisefindlay23 force-pushed the patch/move-thread-to-machine branch from 21d38f7 to d7198ea Compare November 27, 2026 00:15
@louisefindlay23 louisefindlay23 changed the title patch: move a thread to another machine, committing uncommitted work first patch: move a thread to another machine, committing and pushing first Nov 27, 2026
@louisefindlay23 louisefindlay23 added the agent-context-increase Accept agent context growth (upstream syncs) label Nov 27, 2026
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ The exact PR base did not have a successful artifact. Baseline uses the latest successful main measurement shown below.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 21.5 KiB 21.5 KiB 0 B (0.0%) 24.4 KiB ✅
Codex Live turn messages 1 1 0 (0.0%) 8 ✅
Claude Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 21.9 KiB 21.9 KiB 0 B (0.0%) 24.4 KiB ✅
Claude Live turn messages 1 1 0 (0.0%) 8 ✅

Other scenarios

All 64 scenario measurements match main.

All 64 scenario measurements
Provider Scenario Metric Main baseline This PR Impact PR ceiling
Codex short turn resume WebSocket decoded 10.5 KiB 10.5 KiB 0 B (0.0%) 12.7 KiB ✅
Codex short turn resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex long turn running, cold open HTTP decoded 281.7 KiB 281.7 KiB 0 B (0.0%) 302.7 KiB ✅
Codex long turn running, cold open rows 75 75 0 (0.0%) 75 ✅
Codex long turn running, history page HTTP decoded 92.4 KiB 92.4 KiB 0 B (0.0%) 107.4 KiB ✅
Codex long turn running, history page rows 75 75 0 (0.0%) 75 ✅
Codex long turn finished, cold open HTTP decoded 381.5 KiB 381.5 KiB 0 B (0.0%) 410.2 KiB ✅
Codex long turn finished, cold open rows 151 151 0 (0.0%) 151 ✅
Codex long turn finished, socket cold open WebSocket decoded 381.6 KiB 381.6 KiB 0 B (0.0%) 410.2 KiB ✅
Codex long turn finished, socket cold open WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex long turn finished, socket cold open rows 151 151 0 (0.0%) 151 ✅
Codex long turn finished, work page HTTP decoded 186.2 KiB 186.2 KiB 0 B (0.0%) 200.2 KiB ✅
Codex long turn finished, work page rows 150 150 0 (0.0%) 150 ✅
Codex idle thread resume WebSocket decoded 65 B 65 B 0 B (0.0%) 200 B ✅
Codex idle thread resume WebSocket messages 1 1 0 (0.0%) 1 ✅
Codex fleet shell snapshot HTTP decoded 42.4 KiB 42.4 KiB 0 B (0.0%) 53.7 KiB ✅
Codex fleet shell snapshot rows 27 27 0 (0.0%) 27 ✅
Codex fleet shell subscribe WebSocket decoded 65 B 65 B 0 B (0.0%) 200 B ✅
Codex fleet shell subscribe WebSocket messages 1 1 0 (0.0%) 1 ✅
Codex fleet shell resume check HTTP decoded 18 B 18 B 0 B (0.0%) 100 B ✅
Codex fleet shell resume check rows 0 0 0 0 ✅
Codex stale shell reload HTTP decoded 42.4 KiB 42.4 KiB 0 B (0.0%) 53.7 KiB ✅
Codex stale shell reload rows 27 27 0 (0.0%) 27 ✅
Codex stale shell resume WebSocket decoded 140 B 140 B 0 B (0.0%) 400 B ✅
Codex stale shell resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex stale todo list cold open HTTP decoded 72.4 KiB 72.4 KiB 0 B (0.0%) 83.0 KiB ✅
Codex stale todo list cold open rows 75 75 0 (0.0%) 75 ✅
Codex stale todo list cold open nodes 2 2 0 (0.0%) 4 ✅
Codex stale todo list cold open subagents 2 2 0 (0.0%) 4 ✅
Codex stale todo list cold open plans 1 1 0 (0.0%) 2 ✅
Codex stale todo list cold open providerTurns 1 1 0 (0.0%) 2 ✅
Codex stale todo list cold open checkpoints 1 1 0 (0.0%) 2 ✅
Claude short turn resume WebSocket decoded 10.6 KiB 10.6 KiB 0 B (0.0%) 12.7 KiB ✅
Claude short turn resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude long turn running, cold open HTTP decoded 283.3 KiB 283.3 KiB 0 B (0.0%) 302.7 KiB ✅
Claude long turn running, cold open rows 75 75 0 (0.0%) 75 ✅
Claude long turn running, history page HTTP decoded 93.4 KiB 93.4 KiB 0 B (0.0%) 107.4 KiB ✅
Claude long turn running, history page rows 75 75 0 (0.0%) 75 ✅
Claude long turn finished, cold open HTTP decoded 384.2 KiB 384.2 KiB 0 B (0.0%) 410.2 KiB ✅
Claude long turn finished, cold open rows 151 151 0 (0.0%) 151 ✅
Claude long turn finished, socket cold open WebSocket decoded 384.3 KiB 384.3 KiB 0 B (0.0%) 410.2 KiB ✅
Claude long turn finished, socket cold open WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude long turn finished, socket cold open rows 151 151 0 (0.0%) 151 ✅
Claude long turn finished, work page HTTP decoded 188.1 KiB 188.1 KiB 0 B (0.0%) 200.2 KiB ✅
Claude long turn finished, work page rows 150 150 0 (0.0%) 150 ✅
Claude idle thread resume WebSocket decoded 66 B 66 B 0 B (0.0%) 200 B ✅
Claude idle thread resume WebSocket messages 1 1 0 (0.0%) 1 ✅
Claude fleet shell snapshot HTTP decoded 43.0 KiB 43.0 KiB 0 B (0.0%) 53.7 KiB ✅
Claude fleet shell snapshot rows 27 27 0 (0.0%) 27 ✅
Claude fleet shell subscribe WebSocket decoded 66 B 66 B 0 B (0.0%) 200 B ✅
Claude fleet shell subscribe WebSocket messages 1 1 0 (0.0%) 1 ✅
Claude fleet shell resume check HTTP decoded 18 B 18 B 0 B (0.0%) 100 B ✅
Claude fleet shell resume check rows 0 0 0 0 ✅
Claude stale shell reload HTTP decoded 43.0 KiB 43.0 KiB 0 B (0.0%) 53.7 KiB ✅
Claude stale shell reload rows 27 27 0 (0.0%) 27 ✅
Claude stale shell resume WebSocket decoded 140 B 140 B 0 B (0.0%) 400 B ✅
Claude stale shell resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude stale todo list cold open HTTP decoded 73.4 KiB 73.4 KiB 0 B (0.0%) 83.0 KiB ✅
Claude stale todo list cold open rows 75 75 0 (0.0%) 75 ✅
Claude stale todo list cold open nodes 2 2 0 (0.0%) 4 ✅
Claude stale todo list cold open subagents 2 2 0 (0.0%) 4 ✅
Claude stale todo list cold open plans 1 1 0 (0.0%) 2 ✅
Claude stale todo list cold open providerTurns 1 1 0 (0.0%) 2 ✅
Claude stale todo list cold open checkpoints 1 1 0 (0.0%) 2 ✅

Baseline: ded0c46 · PR result: d7198ea · Source CI: success

Scenario and decoded snapshot size

10 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.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@louisefindlay23
louisefindlay23 merged commit 25e1b34 into main Nov 27, 2026
57 of 74 checks passed
@louisefindlay23
louisefindlay23 deleted the patch/move-thread-to-machine branch November 27, 2026 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-context-increase Accept agent context growth (upstream syncs) size:XXL vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants