Skip to content

Draft: two-way teleport with native CLI sessions - #9

Draft
baanish wants to merge 278 commits into
cursor/teleport-claude-1e23from
cursor/teleport-opencode-1e23
Draft

Draft: two-way teleport with native CLI sessions#9
baanish wants to merge 278 commits into
cursor/teleport-claude-1e23from
cursor/teleport-opencode-1e23

Conversation

@baanish

@baanish baanish commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Draft. Do not merge. Stacked on the Claude teleport draft. Native CLI import/export for Codex and Claude only.

What Changed

T3 can list, import, and export text turns between a thread and native Codex or Claude CLI session files. Native files stay native. Import copies a CLI session onto a T3 thread via thread.history.replace. Export writes the thread back. Presence (t3 vs native) swaps Import/Export so both sides are not writers at once.

Grok and OpenCode remain in-app providers. Their native CLI teleport formats are not in this PR.

Review follow-ups on this tip:

  • OpenCode interruptTurn still marks the session ready immediately so Stop can leave Working, but sendTurn waits until session.abort finishes.
  • thread.history-replaced prunes only attachment files previously referenced by that thread, so sanitized thread-id collisions cannot delete another thread's files.
  • Command palette import lists physical projects, not collapsed picker targets.
  • Extra Codex/Claude instances with an explicit empty homePath use the provider default home instead of inheriting the default instance.
  • Import and listing treat a project's thread worktrees (and project subdirectories) as in-project, so Teleport Out from a worktree thread can Teleport In again. Ancestor cwds such as / are rejected.
  • Export wraps pending native presence in acquireUseRelease. Interruptions and post-write failures revert to T3, or persist the real native path if the file was written, instead of leaving teleport-pending:....
  • Teleport lock/schema/identity/file-locked/unsupported-provider/native-write errors derive message from their fields; lockProbeError is gone. Native writes record a stage instead of a free-form message, and schema-version verify failures remap with catchTags.
  • A failed new-thread import deletes the created thread instead of leaving an unbound orphan.
  • In-place import binds teleport ownership before replacing history, so a failed replace cannot leave overwritten messages on an unbound thread.
  • On Windows, replacing a native session moves the existing file aside first so a failed rename can restore it.

Why

Codex and Claude are the native CLIs people actually use, and both write a single jsonl/session file with an atomic writer. Grok and OpenCode teleport were dropped because those CLIs are far less used and the implementations are jankier (Grok's 3-file directory swap, OpenCode's sqlite/JSON dual store and parent-cwd heuristics).

The Grok and OpenCode format work is parked on cursor/teleport-grok-opencode-archive-4ce4 so it can be restored later without reconstructing the adapters.

Stack

  1. Teleport backend
  2. Teleport UI
  3. Codex support
  4. Claude support
  5. This PR — keep Codex and Claude; drop Grok and OpenCode native formats from the tip

UI Changes

Import lives on the new-thread / sessions view. Export lives in the chat header. Composer send is disabled while the thread is in the native CLI. Teleport Out uses cursor-not-allowed while busy. Mobile send is disabled on teleported-out threads (no teleport UI).

New UI

Draft hero Import a native CLI session link

Command palette Import sessions action

Native Claude and Codex sessions in the import picker

Hover

Teleport Out tooltip

Teleport In tooltip

Composer disabled after Teleport Out

Composer disabled when the thread is in the native CLI

Recordings

Codex

codex_teleport_roundtrip_nologo.mp4

Claude

claude_teleport_roundtrip_nologo.mp4

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes
Open in Web Open in Cursor 

t3dotgg and others added 9 commits August 14, 2026 17:35
Co-authored-by: Nickolas Kyryliuk <nickolaskyryliuk@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Register the OpenCode adapter so T3 can list, import, and export text
turns from opencode.db or JSON storage without treating the live db as a
foreign lock.

Co-authored-by: aanishbhirud <aanishbhirud@gmail.com>
Register the Grok session-directory adapter so T3 can list, import, and
export native Grok Build chats.

Co-authored-by: aanishbhirud <aanishbhirud@gmail.com>
@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 735b23b6-9c68-4a19-8714-4e718284694b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

cursoragent and others added 12 commits August 15, 2026 09:02
Stop marked the turn interrupted but left the session running, so the thread stayed Working after abort hung or only emitted turn.aborted.

Co-authored-by: aanishbhirud <aanishbhirud@gmail.com>
A projected running OpenCode thread stayed Working after Stop if the
in-memory provider session was already gone. Interrupt no longer
recovers a session just to abort it, and Stop settles the projection
when there is nothing live to interrupt.

Co-authored-by: aanishbhirud <aanishbhirud@gmail.com>
Keep personal project directories out of the public diff.

Co-authored-by: aanishbhirud <aanishbhirud@gmail.com>
Keep personal project directories out of the public diff.

Co-authored-by: aanishbhirud <aanishbhirud@gmail.com>
Keep live-session titles and personal directories out of the public diff.

Co-authored-by: aanishbhirud <aanishbhirud@gmail.com>
Co-authored-by: aanishbhirud <aanishbhirud@gmail.com>
Co-authored-by: aanishbhirud <aanishbhirud@gmail.com>
- Disable feature-request issue templates
- Direct contributors to Ideas discussions for proposals
…#6649)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…sion (pingdotgg#6538)

Co-authored-by: tsouth89 <tsouth89@users.noreply.github.com>
t3dotgg and others added 6 commits August 20, 2026 23:19
Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: John William Creighton (s243a) <s243a@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ngdotgg#6326)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown

Thread transfer impact

⚠️ The latest CI run did not produce a thread transfer result for f45f89e.

This comment will update automatically after the next completed run.

t3-code Bot and others added 22 commits August 20, 2026 23:05
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: Alex Southwell <4596216+saphid@users.noreply.github.com>
Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
…nment (pingdotgg#7292)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…otgg#7286)

Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
…pingdotgg#7283)

Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
Co-authored-by: aanishbhirud <aanishbhirud@gmail.com>
Co-authored-by: aanishbhirud <aanishbhirud@gmail.com>
Co-authored-by: aanishbhirud <aanishbhirud@gmail.com>
Co-authored-by: aanishbhirud <aanishbhirud@gmail.com>
Co-authored-by: aanishbhirud <aanishbhirud@gmail.com>
…/teleport-opencode-1e23

Co-authored-by: aanishbhirud <aanishbhirud@gmail.com>
Co-authored-by: aanishbhirud <aanishbhirud@gmail.com>
Co-authored-by: aanishbhirud <aanishbhirud@gmail.com>
Co-authored-by: aanishbhirud <aanishbhirud@gmail.com>
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.