Skip to content

feat(threads): hand off Claude CLI conversations to T3 - #1

Draft
DJProspero1 wants to merge 2 commits into
review/claude-handoff-base-20261103from
task/live-claude-attach
Draft

DJProspero1 wants to merge 2 commits into
review/claude-handoff-base-20261103from
task/live-claude-attach

Conversation

@DJProspero1

@DJProspero1 DJProspero1 commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Problem

A Claude Code CLI conversation should be able to continue in T3 with its full message, tool, reasoning and subagent history. Importing a transcript while the CLI still owns the conversation does not safely transfer control.

Change

Add t3 thread attach SESSION --project PROJECT and t3 thread handoff THREAD_ID, backed by one service exposed through the existing MCP toolkit.

  • If the source CLI is running, ask whether to wait for it and its agents to exit or interrupt them. Waiting is the default; unattended callers must select a policy when the source is running. Ctrl+C cancels waiting without stopping the source.
  • On Linux, explicit interruption verifies the source PID/start identity and owned descendants before stopping them. Other platforms support waiting for the source to exit.
  • Once the source stops, import complete root and child records, keep imported history before subsequent managed runs, and resume the exact native Claude transcript through the existing adapter.
  • After interruption, commit one continuation effect with the completed handoff. The existing outbox and effect worker deliver T3's interrupted-work prompt with retries and command deduplication.
  • Preserve old subagents as history. Their processes are not restored; resumed work must inspect and restart unfinished tasks. New work uses T3's normal streaming, approvals and agent controls.

The contracts, CLI/MCP handlers, import service, persistence guards, ordering and adapter changes all support this transfer. Import cursors use the existing runtime repository; process verification reuses the ACP implementation through a shared module. The user guide explains the commands and platform limits.

This is a Claude-only handoff. It does not provide simultaneous CLI/T3 control, live-follow while waiting, or attachment for other providers. It introduces no database migrations, updater changes or web/mobile controls.

Scope and approval

Upstream approval is pending. This fork draft is not yet eligible for upstream submission.

CONTRIBUTING.md requires explicit maintainer approval of feature direction and scope, including draft PRs. This adds a workflow and does not qualify as a small bug fix or configuration-only exception. The fork owner's authorization and vouch:trusted label do not supply upstream approval.

Maintainer guidance on an earlier teleport proposal calls for a smaller product decision and staged implementation. That comment is context, not approval of this proposal. The proposed scope here is one-way Claude handoff; shared control and other providers are excluded.

Related requests include continuing a terminal conversation in T3 and continuing Claude Code threads. The full research index below is background, not a claim that this PR resolves every linked report.

Related reports and prior implementations

Research references collected on 2026-11-02. These are non-closing links; status is intentionally omitted. No automatic issue-closing keywords are used.

Direct requests and sync proposals (11)
Implementations and import entry points (18)
Import correctness and history problems (28)
Related subagent lifecycle and status problems (31)
Adjacent mechanisms, not equivalent to live Claude attachment (7)
Discussions (7)

Verification

The original verification below applies to 90b5d7d948b48567463a86fd04945aa9185a96b0, based on upstream cefb544af3c9. The current head is 7adb470f02b4cde3384596850eabf153df41d69d.

An official-update compatibility defect was found in a previously deployed build: timestamp-sized imported positions sorted after newly allocated native run positions. The importer now uses T3's unchanged position allocator. The handoff regression asserts imported items occupy the normal history range. vp run check:changed HEAD --concurrency 2 passed before this fix was committed: formatting, lint, both Knip passes, GraphQL generation, typechecks for three packages, and four tests across three files. Existing histories written by the experimental builds require a separate data repair; changing the importer does not repair those stored positions.

The recorded local run of vp run check:changed HEAD --concurrency 2 before committing passed formatting, lint, both Knip passes, dependency-patch validation, GraphQL generation, typechecks for 40 affected packages, and 630 tests across 16 files. Its saved output was checked again during this description audit; tests were not rerun for this metadata-only update.

Focused coverage and observed results:

  • CLI wait/interrupt selection and cancellation; blocked handoff leaves the source running. An isolated real Linux parent/child fixture verifies that interruption stops only the verified owned process tree.
  • Complete import of large 26 MiB records; partial UTF-8, replaced files and symlink escapes; preservation of human text, tool/reasoning records, child lineage and settled statuses.
  • Cursor retries retain model and workspace metadata. The existing adapter test resumes the exact transcript even when its original checkout directory has been deleted.
  • Forced outbox insertion failure rolls back handoff completion. Recovery reclaims an abandoned continuation; draining the effect worker twice sends one continuation. Retried handoff preserves an already-managed runtime, including after history compaction.
  • New imports use the existing no-run history range, and subsequent managed runs use the normal run ranges. No custom ordering behavior is required in later official releases.

A read-only merge simulation against upstream 3d369d5596 completed without conflicts, and git diff --check passed. This does not replace validation after updating the branch.

Not verified: an end-to-end CLI-to-T3 run of this optimized head on either Linux or Windows. The deployed machines still use the earlier build, so their behavior is not evidence for this head. The MCP model-evaluation case is present but has not been run. No GitHub CI or paid model evaluation was started for this audit. No web/mobile UI code changes, screenshots or recordings are included.

Implemented with GPT-6 Astra through the Codex harness in T3 Code. Architectural review by Opus 5.5 through Claude Code.

@github-actions github-actions Bot added size:XXL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Nov 2, 2026
@DJProspero1 DJProspero1 changed the title Follow running Claude Code sessions as native read-only threads Attach live Claude sessions as native T3 threads with text prompts and subagent sync Nov 2, 2026
@DJProspero1 DJProspero1 changed the title Attach live Claude sessions as native T3 threads with text prompts and subagent sync feat(server): attach live Claude sessions as native threads Nov 2, 2026
@DJProspero1 DJProspero1 changed the title feat(server): attach live Claude sessions as native threads feat(threads): follow external Claude sessions and hand off after exit Nov 2, 2026
@DJProspero1 DJProspero1 changed the title feat(threads): follow external Claude sessions and hand off after exit feat(threads): attach existing provider sessions Nov 2, 2026
@DJProspero1 DJProspero1 changed the title feat(threads): attach existing provider sessions feat(threads): hand off Claude CLI conversations to T3 Nov 3, 2026
@DJProspero1
DJProspero1 changed the base branch from review/live-claude-attach-base-20261102 to review/claude-handoff-base-20261103 November 3, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant