You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(acp): retry missing session history from another project - #44926
Retrying an ACP import from the session’s original folder could report that the session was already imported after its original T3 project changed folders, leaving the transcript missing. The retry now uses the native session binding to find the existing thread and reads its missing history from the requesting project’s folder. The regression test verifies both the destination thread and the folder used for the retry.
Commit 40b0a98a20 (main). T3 says the ACP session is already imported and hides the retry until the list refreshes. The transcript stays missing. Expected: The retry restores the transcript in the existing T3 thread.
The cause is at apps/server/src/provider/AcpRegistrySessions.ts:180. Ran cd apps/server && pnpm exec vp test run src/ws.test.ts with the repro test added: it failed in 2 of 2 runs on a clean checkout, with expected false to equal true in the output.
Evidence
Environment: Linux x64, the repository's own tests.
Outside view: not shown in the running app. The app gets there by itself fails: Import skips the missing transcript only when the existing thread belongs to a different project than the one whose folder still lists the session, and a person cannot put the app in that state. No screen or project command changes a project's folder, and adding that folder again reuses the project that already owns it; the retry path is reached only by pointing the original project somewhere else through the project update API.
Tests
ba951ecf41 adds the failing test, alone, before the fix.
pnpm exec vp run check:changed a9b301f9273716ea4a4e80361c3a1bfce274ab39 passed on head.
Not in this change
Cross-project repairs require a verified native session binding because a derived thread ID alone cannot establish which native session the importer would read.
Completed imports and threads that have already run keep their existing behavior.
This change covers retries after a folder change through the project API. It adds no project folder editing UI.
Who did the work
Repro written by GPT 6.2 Sol, in Codex
Outside view by Grok 4.7, in Grok
Duplicate check judged by Claude Opus 5.5, in Claude Code
Written by GPT 6.2 Sol, in Codex
Trimmed by Claude Opus 5.5, in Claude Code
Reviewed by Claude Opus 5.5, in Claude Code, and by GPT 6.2 Sol, in Codex, and by Grok 4.7, in Grok
Reproduction, checks and proof run by a program on base and head, not by an agent
Made in T3 Code by GPT 6.2 Sol, Claude Opus 5.5 and Grok 4.7
Reviewing files that changed from the base of the PR and between 700f0a8 and eb09931.
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
No actionable comments were generated in the recent review.
Walkthrough
Cross-project ACP session imports now continue to history-pending checks when a native-session owner exists. Tests verify listing and importing these sessions with the original workspace root, including after the owner project’s root changes.
Changes: ACP history repair
Layer / File(s)
Summary
Cross-project session history repair apps/server/src/provider/AcpRegistrySessions.ts, apps/server/src/ws.test.ts
Cross-project imports with an existing native-session owner can proceed to history repair. The test checks that repair uses the session’s original workspace root after the owner project’s root changes.
pingdotgg/t3code#39575 — The changes cover restoring missing ACP history on a cross-project import, but do not change the behavior where a failed history read is marked complete.
Suggested reviewers:juliusmarminge
Merge Risk: Minimal · previous review 700f0
This change lets a retry restore missing ACP session history in an existing thread after the project's folder has changed. It reads that history from the requesting project's folder. The change is small and covered by a regression test, and no concrete problem remains that should block merging.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "fix(acp): retry missing session history from another project" matches the main change: the retry path for a missing ACP session transcript now uses the native session binding and reads hist…
Description check
The description follows the template. It has Problem, Change, Scope (links related issues and explains the bug-fix scope), Verification (names the failing and passing commits, the exact test command, …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "fix(acp): retry missing session history from another project" matches the main change: the retry path for a missing ACP session transcript now uses the native session binding and reads history from the requesting project's folder. It is specific, follows conventional commit form, and is under 72 characters.
Full details: Description check
Explanation
The description follows the template. It has Problem, Change, Scope (links related issues and explains the bug-fix scope), Verification (names the failing and passing commits, the exact test command, and the observed results), and a Who did the work section. It also covers what is out of scope. The Problem section gives expected behavior and reproduction steps. The Scope section does not explicitly name the issue that shows the bug, but it lists related issues. The description is mostly complete.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Reviewing files that changed from the base of the PR and between 5fc4388 and 700f0a8.
Files selected for processing: 2
apps/server/src/provider/AcpRegistrySessions.ts
apps/server/src/ws.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
Real web app, Chromium 1280×800, light theme, fresh database per commit, real OpenCode ACP 2.4.2. Created a native conversation; imported into Project A while provider startup was deliberately unavailable; moved A from folder X to Y through the project API; created Project B at X; retried Import from B, clicked Refresh, then opened the original A thread. Captures are cropped to exclude private environment labels.
Base provider logs contain only the original failed initialize. Head additionally initializes successfully and completes session/load; historyOrigin changes from unset to v1_import.
Not shown:
The guard against a cross-project derived-ID collision without a verified native binding was not exercised; this proof covers the reported retry of a verified binding.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size:XS0-9 changed lines (additions + deletions).vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Retrying an ACP import from the session’s original folder could report that the session was already imported after its original T3 project changed folders, leaving the transcript missing. The retry now uses the native session binding to find the existing thread and reads its missing history from the requesting project’s folder. The regression test verifies both the destination thread and the folder used for the retry.
Related: #39575, #34043, #36358, #39576
Reproduction on main
Commit 40b0a98a20 (main). T3 says the ACP session is already imported and hides the retry until the list refreshes. The transcript stays missing. Expected: The retry restores the transcript in the existing T3 thread.
The cause is at
apps/server/src/provider/AcpRegistrySessions.ts:180. Rancd apps/server && pnpm exec vp test run src/ws.test.tswith the repro test added: it failed in 2 of 2 runs on a clean checkout, withexpected false to equal truein the output.Evidence
Environment: Linux x64, the repository's own tests.
Proven: the repro fails at the test commit ba951ecf41 and passes on the head 700f0a8baa, both on main a9b301f927.
Outside view: not shown in the running app. The app gets there by itself fails: Import skips the missing transcript only when the existing thread belongs to a different project than the one whose folder still lists the session, and a person cannot put the app in that state. No screen or project command changes a project's folder, and adding that folder again reuses the project that already owns it; the retry path is reached only by pointing the original project somewhere else through the project update API.
Tests
pnpm exec vp run check:changed a9b301f9273716ea4a4e80361c3a1bfce274ab39passed on head.Not in this change
Who did the work
Made in T3 Code by GPT 6.2 Sol, Claude Opus 5.5 and Grok 4.7