Skip to content

Import active Codex sessions into T3 - #1

Merged
iam-brain merged 3 commits into
mainfrom
bryan/codex-import-sessions
Mar 9, 2026
Merged

Import active Codex sessions into T3#1
iam-brain merged 3 commits into
mainfrom
bryan/codex-import-sessions

Conversation

@iam-brain

Copy link
Copy Markdown
Owner

Summary

This PR adds a Codex session import flow so users can pick up existing Codex work inside T3.

It lets T3:

  • discover active, non-archived Codex sessions
  • import them as normal T3 threads
  • preserve Codex linkage so imported threads can be resumed from T3
  • archive the linked Codex session when a linked thread is deleted from T3

Fixes pingdotgg#207.

What Changed

Codex import workflow

  • Added server-side Codex import preview/import/delete RPCs
  • Added a short-lived Codex app-server browser layer for:
    • thread/list
    • thread/read
    • thread/archive
  • Imported sessions are stored as first-class T3 threads with Codex linkage metadata
  • Imported history is merged into the existing projection/snapshot flow

Worktree-aware import

  • Import preview groups sessions by owning repo root
  • Sessions are organized into:
    • main
    • worktrees
    • per-worktree session groups
  • Imported threads preserve T3’s existing cwd precedence:
    • thread.worktreePath ?? project.workspaceRoot

Import dialog UX

  • Import entry lives in the add-project flow in the sidebar
  • Added nested collapsible groups
  • Added search/filter
  • Added Select all / Unselect all
  • Added Show unavailable sessions (N)
  • Hidden/unavailable sessions are omitted from the default view
  • Result dialog summarizes imported, skipped, and failed sessions

Delete behavior for Codex-linked imports

  • Linked-thread delete now routes through the server path
  • Active sessions are stopped before delete
  • T3 does not delete the local thread if Codex archive fails
  • If Codex archive succeeds but local delete fails, the error is surfaced clearly as a partial-success case

Why

This closes the gap between Codex and T3 for users who already started work in Codex and want to continue it in T3 without recreating the thread manually.

Commits

  • 06af2e5d Import Codex sessions into T3
  • e81d8ff5 Polish Codex import dialog
  • ca4995c1 Harden Codex-linked import delete flow

Testing

Automated:

bun lint
bun typecheck
bun x vitest run apps/server/src/codexImport/Layers/CodexImportService.test.ts --reporter=dot

Focused coverage also includes:

  • Codex import browser tests
  • import dialog helper/browser tests
  • WS routing tests for Codex import RPCs

Manual:

  • Imported active Codex sessions through the T3 import dialog
  • Verified imported sessions appeared under the correct project/worktree grouping
  • Opened imported threads and confirmed their existing history loaded in T3
  • Continued imported sessions from T3 and verified they remained resumable
  • Deleted imported threads and verified the linked Codex archive/delete behavior

Notes

  • This PR is import-only.
  • I intentionally left the experimental export workflow out of main.

@iam-brain
iam-brain merged commit 899bc5a into main Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

request: import or recreate sessions from Codex

1 participant