feat(web): import recent Codex and Claude threads during onboarding - #8066
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 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.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
There was a problem hiding this comment.
One finding: the new agentSessions.import handler treats ProviderSessionDirectory as an optional service and fabricates an AgentSessionScanError when it is absent, even though that service is provided in the same context as ProviderService. See the inline comment.
Posted via Macroscope — Effect Service Conventions
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR introduces a substantial onboarding capability that reads and persists recent Claude and Codex conversation history, then reconnects those threads to provider sessions. Its cross-layer orchestration, persistence, resume behavior, and sensitive transcript handling warrant human review. You can add or adjust custom eligibility rules. Learn more. |
d6a53bc to
d02d817
Compare
d02d817 to
8468b95
Compare
3d037e6 to
e2725bb
Compare
There was a problem hiding this comment.
Reviewed the new/changed Effect service code (AgentSessionImporter.ts, AgentSessionScanner.ts, ws.ts wiring, contracts errors). Dependency acquisition now happens through the environment (yield* Foo.Foo) and the RPC handler provides the services at the boundary, which matches the conventions. One error-modeling issue below.
Posted via Macroscope — Effect Service Conventions
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7d8de88. Configure here.

Project onboarding discovers existing Codex and Claude projects, but leaves their conversations behind.
Import threads active within the last 30 days with their visible messages and provider resume state. Malformed or oversized sessions are skipped, custom provider accounts stay matched, and imported history does not create Git checkpoints.
Focused scanner, importer, orchestration, projection, relay, onboarding, and server RPC tests passed. Scoped type checks also passed for server, web, desktop, mobile, contracts, and client-runtime. No browser or native-client verification was run.
Made by GPT-5.6 Sol using Codex in T3 Code.
Note
Medium Risk
Touches orchestration commands, projections, provider runtime persistence, and onboarding import retries; mistakes could corrupt thread state or clobber live provider bindings, though idempotency and on-conflict-ignore paths are heavily tested.
Overview
Onboarding and a new
agentSessionsImportRPC now pull in Codex and Claude conversations from the last 30 days, not just project roots. The server scans JSONL transcripts (size-capped, parsed for visible user/assistant text), thenimportRecentAgentThreadscreates or reuses threads, dispatchesthread.history.import, and stores provider resume bindings without overwriting an active session.Imported history is modeled as
thread.message-sentevents tagged withhistoryImport, followed bythread.settled. That path skips Git checkpoints, does not mark threads as queued work in projections, and is excluded from agent-awareness “settled” notifications.isImportedAgentSessionMessageIdkeeps imported messages across reverts and out of live turn/queue logic on server and client.The welcome wizard creates projects idempotently (stable command IDs and path resolution) and runs thread import after each project; scan candidates can include
projectIdfor already-imported workspaces so history can still be backfilled.Reviewed by Cursor Bugbot for commit 52aeac1. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Import recent Codex and Claude threads during onboarding
importRecentAgentThreadscreates missing orchestration threads, imports historical messages, and persists provider-session bindings; per-thread failures are logged and skippedthread.history.importorchestration command emitsthread.message-sentevents withmetadata.historyImport=truethen athread.settledevent; only allowed on active, empty threadspartitionOnboardingProjectsin projectImport.logic.ts no longer returnsalreadyImportedCountand includes already-imported projects in available/recent sets;ProviderSessionDirectory.upsertandProviderSessionRuntimeRepository.upsertgain an optionaloptionsparameterMacroscope summarized 52aeac1.