Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): deleted worktree threads recover from a detached checkout #26758

Mergedshivamhwp(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/26758/headmerged by maria-rcks View on GitHub

Closes https://github.com/pingdotgg/t3code/issues/26745

Problem

Deleting a thread's worktree and local branch left every follow-up broken when the project checkout was detached. Recovery could also discard pushed thread work by starting from the project branch.

Change

Restore the retained thread branch or its cached origin/<thread-branch> tip first. If neither exists, use the project branch, cached remote default, or detached HEAD. This changes only missing-worktree recovery, reads local Git refs without fetching, and leaves normal turn startup alone.

Scope and approval

This is a focused fix for the broken recovery reported in https://github.com/pingdotgg/t3code/issues/26745. It qualifies for CONTRIBUTING.md's obvious-bug exception: only the existing missing-worktree recovery and its regression tests change. It adds no client behavior, contracts or settings.

Verification

Native iOS before and after on shiv

Recorded on 2026-10-30 in the native iOS Simulator client on physical shiv, using T3's Simlock pool. Device: iPhone 17e, iOS 27.0. The isolated backend and Metro ran on physical corex, reached over the tailnet. Native client: T3 Code Dev 2.2.0 build 1, arm64 simulator, Xcode 27.1 27A9275, SDK 27.1. Its native fingerprint matches this head: 953468b560e21a2a7cfb6d86a69eda1e061efb8a.

Before backend: c1876b57c9258cc9a5b1a429d76e3f169bfcd9a5. After backend and mobile JS: 4a762c76a07af3a0d0848676ede81972873a59b8.

The reporter used a macOS desktop host and the iOS app. macOS, Linux and Windows hosts run the same platform-independent ProviderTurnStartService.recreateMissingWorktree in ProviderTurnStartService.ts; the diff contains no macOS-only branch.

  1. Start a worktree thread on feature/recovery-test, complete a turn, commit thread.txt, and push to a real bare origin.
  2. Run git worktree remove and git branch -D feature/recovery-test, then git checkout --detach origin/main in the project. Confirm the worktree and local branch are absent while the cached remote tip remains.
  3. Submit the next message using the iOS composer. On the before backend, run 4 fails with "Couldn't recreate thread workspace" and the detached-HEAD error.
  4. Stop that backend and start the exact PR head against the same database and project, without repairing the branch or worktree. Submit another iOS follow-up. Run 5 completes and recreates the branch from the pushed tip. The recording also opens Files and shows the recovered thread.txt.

Before, iOS submission and failure:

iOS follow-up fails on main

https://github.com/user-attachments/assets/0492ccd7-90f4-4226-9f13-d457cc6d146a

After, iOS submission and completion on 4a762c7:

iOS follow-up completes on this head

https://github.com/user-attachments/assets/e95cf4f8-e6dc-4a68-b1af-f9f3c1e2e53f

Recovered pushed file opened in the iOS client

The runtime pass uses the free Replay dev provider through the real adapter, orchestration, provider-start and client paths. Its reply, "first fixture turn complete", is prerecorded. The Git verification below independently checks the real repositories and file; it does not rely on that reply.

Real Git and persisted-run verification on this head
iOS recovery verification
BEFORE server c1876b57c9258cc9a5b1a429d76e3f169bfcd9a5
AFTER server 4a762c76a07af3a0d0848676ede81972873a59b8
iPhone17e iOS27.0, Simlock on physical shiv; Metro + isolated backend corex
Native fingerprint 953468b560e21a2a7cfb6d86a69eda1e061efb8a
Saved pushed tip: bf99fc624fc6e3e7f1cc560df9b486cb7fa05320

$ git -C /tmp/t3code-26745/home/worktrees/project/feature-recovery-test rev-parse HEAD
bf99fc624fc6e3e7f1cc560df9b486cb7fa05320

$ git -C /tmp/t3code-26745/home/worktrees/project/feature-recovery-test rev-parse --abbrev-ref HEAD
feature/recovery-test

$ git -C /tmp/t3code-26745/home/worktrees/project/feature-recovery-test rev-parse --symbolic-full-name @{upstream}
refs/remotes/origin/feature/recovery-test

$ git -C /tmp/t3code-26745/home/worktrees/project/feature-recovery-test rev-parse @{upstream}
bf99fc624fc6e3e7f1cc560df9b486cb7fa05320

$ git -C /tmp/t3code-26745/project rev-parse refs/remotes/origin/feature/recovery-test
bf99fc624fc6e3e7f1cc560df9b486cb7fa05320

$ git -C /tmp/t3code-26745/project rev-parse --abbrev-ref HEAD
HEAD

$ git -C /tmp/t3code-26745/home/worktrees/project/feature-recovery-test show HEAD:thread.txt
Distinctive pushed work for issue 26745 iOS verification.

$ git -C /tmp/t3code-26745/home/worktrees/project/feature-recovery-test push --dry-run
Everything up-to-date

$ git -C /tmp/t3code-26745/home/worktrees/project/feature-recovery-test status --porcelain


Persisted base run: run:thread:mcp%3A72f69e30-90f9-4a73-b1ea-57e8dd81fb9f:ordinal:4 status failed
Persisted head run: run:thread:mcp%3A72f69e30-90f9-4a73-b1ea-57e8dd81fb9f:ordinal:5 status completed
PASS: pushed tip, restored upstream, distinctive file, clean worktree and detached project preserved.

Independent real-Codex verification

Maria's comment 6526205659 reports a Linux web-client check using real Codex gpt-6.1-sol. Before backend: 6575ce32508bd7908444241f3719aa33aaf77f90. After backend: exact current head 4a762c76a07af3a0d0848676ede81972873a59b8. The same thread and database recover without Git repair. I downloaded and inspected her screenshots, recordings and Git transcript. Copies are attached here so the evidence is available without following an external upload service. The original GIF recordings were converted to H.264 MP4 without changing their sequence.

Original comment 6526205659, retrieved from the GitHub API

This is Maria's independent report. Its final limitations describe her run; the native and packaged-client evidence elsewhere in this body covers those shared recovery paths.

> [!NOTE]
> Written by `gpt-6.1-sol` on behalf of Maria

## Verified in a real dev environment

verified as-is on Linux, exact head `4a762c76a07af3a0d0848676ede81972873a59b8`. no product changes or pushes were needed.

- reproduced on `github/main` at `6575ce32508bd7908444241f3719aa33aaf77f90` in a separate worktree after `vp i` and background `vp run dev --no-seed`. used repo Playwright with `/usr/bin/google-chrome` against the actual web client.
- created a project through the app pointing at a real Git repo with a local bare origin. selected a new worktree and Codex `gpt-6.1-sol`. a real provider turn created, committed and pushed `thread.txt` at `356c04403d94b28c8ea296741e7cffb022f26deb`.
- removed that worktree and local branch, retained the cached pushed ref, and detached the project at `origin/main`. submitting a follow-up in the web composer failed with "Couldn't recreate thread workspace" and the detached-HEAD error. persisted run 2 is failed.
- stopped main before starting the exact PR head after `vp i`, using the same isolated database and project without repairing Git state. submitted the identical follow-up through the composer. run 3 completed through the real Codex adapter. the worktree restored the saved pushed SHA, `thread.txt` and upstream `refs/remotes/origin/t3/add-recovery-proof`. the project remained detached.
- neighboring checks: an ordinary follow-up completed and committed `local-only.txt` without pushing. after deleting only the worktree, another real Codex follow-up restored local commit `77bad9cd672e581f41a2a648e6478b77459a6b7e`, preserved both files and stayed exactly one commit ahead of origin. runs 4 and 5 completed. Git independently confirmed the refs, contents and clean status.
- Blacksmith: `vp i && vp test run apps/server/src/orchestration-v2/ProviderTurnStartService.test.ts` passed all 35 tests on this head. the PR had 33 successful CI checks. no mocks, Replay provider, fixtures or demo data were used for the running-app pass.

before, main rejects the follow-up:

![main detached-worktree recovery failure](https://uploads-production-47e4.up.railway.app/files/17cc9400-576d-4c22-b0c4-ed945da56275/before-main.png)

![main composer submission and recovery failure recording](https://uploads-production-47e4.up.railway.app/files/95fa4b81-0ebb-4142-b609-643c206414cc/before.gif)

after, the same thread recovers on this PR:

![pr restores the pushed commit file branch and upstream](https://uploads-production-47e4.up.railway.app/files/34d95006-a8b0-4540-ad22-a50f892434e1/after-pr.png)

![pr composer submission and real codex recovery recording](https://uploads-production-47e4.up.railway.app/files/32aa01b3-9f8a-4ec1-bd7f-713c0e720841/after.gif)

[short Git and persisted-run transcript](https://uploads-production-47e4.up.railway.app/files/ab5b0351-859c-4761-801e-48238554dc27/git-transcript.txt)

## Not verified

native iOS/Android clients, packaged Electron, macOS/Windows hosts, relay/tunnel connections, and other provider adapters were not exercised on this Linux VM. the no-cached-thread-ref fallbacks were covered by the focused real-Git tests, not separate live client scenarios. the origin used here was a real local bare repository, not an external Git hosting service. no performance claim is made. screenshots and exported clips were inspected; uploaded video playback and seeking were checked in Chrome.


<!-- gc2:comment:prcomment_01m66p2d3te00sq14pwfgx4xe9:gh_43080cb7b477e056d3c8e133f60832efe3d6f8c8118e6e3fcd592b6de732320a:e5cb24e424f09b5385fbcc9af5769542def5d29d15679c9ea6311348d2b7bccd -->

Before, composer submission fails after worktree and local-branch deletion with the project detached:

Maria's main failure

https://github.com/user-attachments/assets/8afb8de7-d343-4767-80ad-d7f2dd15d632

After, the identical follow-up completes on this head and reports the preserved pushed tip, branch, upstream and file:

Maria's current-head recovery

https://github.com/user-attachments/assets/bb8b70a0-0b39-4a10-b4db-598b8fa97664

Her subsequent ordinary follow-up commits local-only.txt without pushing. Deleting only the worktree and submitting another follow-up restores local tip 77bad9cd672e581f41a2a648e6478b77459a6b7e, preserves both files and stays exactly one commit ahead of origin. This neighboring case is supported by the Git and persisted-run transcript below; the recordings above show the pushed-branch case.

The original Git and persisted-run transcript is reproduced below.

Current-head pushed-branch and retained-local-branch verification
Deleted branch t3/add-recovery-proof (was 356c044).
HEAD is now at 6708a68 chore: initialize recovery verification

main backend: 6575ce32508bd7908444241f3719aa33aaf77f90
pr backend: 4a762c76a07af3a0d0848676ede81972873a59b8

main persisted runs:
1|completed
2|failed

main failure:
Could not recreate branch 't3/add-recovery-proof' at /home/user/main/.t3/worktrees/recovery-project/t3-61486c33: the project workspace has no current branch to start it from (detached HEAD?).

pr pushed-tip recovery:
356c04403d94b28c8ea296741e7cffb022f26deb
refs/remotes/origin/t3/add-recovery-proof
pushed recovery proof 26758
project branch: HEAD
1|completed
2|failed
3|completed

normal follow-up, local branch ahead of origin:
77bad9cd672e581f41a2a648e6478b77459a6b7e
1	0
77bad9cd672e581f41a2a648e6478b77459a6b7e refs/heads/t3/add-recovery-proof

retained local tip recovery:
77bad9cd672e581f41a2a648e6478b77459a6b7e
1	0
retained local branch proof
pushed recovery proof 26758
project branch: HEAD
persisted runs:
1|completed
2|failed
3|completed
4|completed
5|completed

Focused tests on this head

vp test run apps/server/src/orchestration-v2/ProviderTurnStartService.test.ts, physical corex, Node v26.12.1, exit 0. The real-Git regression covers retained and deleted branches, pushed tips, detached checkouts, the remote default and a project without a remote.

Head: 4a762c76a07af3a0d0848676ede81972873a59b8
note: You are running `vp test` as a Vite+ built-in command. If you meant to run the test npm script, use `vpr test` instead.

 RUN  v5.0.5 /home/shivam/Developer/.state/issue-watch/worktrees/26745


 Test Files  1 passed (1)
      Tests  35 passed (35)
   Start at  11:24:21
   Duration  16.09s (transform 64%, import 15%, tests 12%, setup 8%)

Earlier packaged desktop evidence

These Linux desktop recordings use the packaged app and bundled server, with an isolated profile. Before: main dac8b11ddc25bd5da62a367fdb6c3de777ae2986. After: original PR head 301b24ad093d163ae61f30a3fb77880b9d5fa44a. git range-diff confirms the patch is identical after rebasing to 4a762c76a07af3a0d0848676ede81972873a59b8. The native iOS recordings and focused test output above exercise the current head.

Main desktop failure after worktree and branch deletion

https://github.com/user-attachments/assets/1b9dbbc0-e55d-46fa-818c-5643f49b1799 Packaged Linux desktop before: a follow-up fails after the worktree and branch are deleted.

The same desktop thread recovers and preserves the pushed work

https://github.com/user-attachments/assets/545fa2ec-1c03-4d8e-a739-1715e749be9a Packaged Linux desktop after: the same thread recovers its pushed commit, file, and upstream.

Comparison with the recorded packaged desktop build

The packaged Linux desktop recording above used 301b24ad093d163ae61f30a3fb77880b9d5fa44a. The recovery implementation is unchanged on current head 4a762c76a07af3a0d0848676ede81972873a59b8: both resolveRecreateBase and recreateMissingWorktree in apps/server/src/orchestration-v2/ProviderTurnStartService.ts are byte-for-byte identical. The full service-file diff below shows only main's provider sign-in handling changed elsewhere. The current-head iOS and real-Codex checks above supplement that desktop recording.

The complete comparison and reproduction command follow.

Exact source comparison, hashes and complete service-file diff
Recorded packaged Linux desktop build: 301b24ad093d163ae61f30a3fb77880b9d5fa44a
Current PR head: 4a762c76a07af3a0d0848676ede81972873a59b8
Current PR base: 32ecd71726fee16f335484c1f95cbce126d461f6
Compared file: apps/server/src/orchestration-v2/ProviderTurnStartService.ts

Both resolveRecreateBase and recreateMissingWorktree are byte-for-byte identical.
Recovery source SHA-256 at both commits: a5b50bd3c09fa181b0a025f52b556d5b3a96847681c179239c1aa2f481560f3b
Recovery source length at both commits: 2596 bytes

Reproduce the extraction from each git show output using the slice from
"    const resolveRecreateBase =" through, but excluding,
"    // Build draining callbacks"; compare bytes or their SHA-256.

$ git range-diff 301b24ad093d163ae61f30a3fb77880b9d5fa44a^..301b24ad093d163ae61f30a3fb77880b9d5fa44a 32ecd71726fee16f335484c1f95cbce126d461f6..4a762c76a07af3a0d0848676ede81972873a59b8
1:  301b24ad09 = 1:  4a762c76a0 fix(server): recover a deleted thread worktree from its pushed branch or a detached project

$ git diff 301b24ad093d163ae61f30a3fb77880b9d5fa44a 4a762c76a07af3a0d0848676ede81972873a59b8 -- apps/server/src/orchestration-v2/ProviderTurnStartService.ts
diff --git a/apps/server/src/orchestration-v2/ProviderTurnStartService.ts b/apps/server/src/orchestration-v2/ProviderTurnStartService.ts
index 2384187823..14c93a31ea 100644
--- a/apps/server/src/orchestration-v2/ProviderTurnStartService.ts
+++ b/apps/server/src/orchestration-v2/ProviderTurnStartService.ts
@@ -92,6 +92,9 @@ class WorktreeRecreateNoBaseError extends Schema.TaggedError<WorktreeRecreateNoB
 }
 
 const isProviderTurnStartError = Schema.is(ProviderTurnStartError);
+const isProviderAdapterOpenSessionError = Schema.is(
+  ProviderAdapter.ProviderAdapterOpenSessionError,
+);
 
 /**
  * Claude refuses these before it reads the prompt: replacing a process running background work,
@@ -766,7 +769,12 @@ export const layer: Layer.Layer<
         }),
       );
       if (sessionResult._tag === "Failure") {
-        if (input.willRetry === true) return yield* sessionResult.failure;
+        const failure = sessionResult.failure;
+        const requiresSignIn =
+          "cause" in failure &&
+          isProviderAdapterOpenSessionError(failure.cause) &&
+          failure.cause.requiresSignIn === true;
+        if (input.willRetry === true && !requiresSignIn) return yield* failure;
         yield* settleStartFailure({
           signal: "provider-session-open-failure",
           title: "Provider session failed to open",

Reproduce the byte comparison from the repository:

import hashlib, subprocess
path = "apps/server/src/orchestration-v2/ProviderTurnStartService.ts"
commits = ["301b24ad093d163ae61f30a3fb77880b9d5fa44a", "4a762c76a07af3a0d0848676ede81972873a59b8"]
parts = []
for commit in commits:
    source = subprocess.check_output(["git", "show", f"{commit}:{path}"])
    start = source.index(b"    const resolveRecreateBase =")
    end = source.index(b"    // Build draining callbacks", start)
    parts.append(source[start:end])
    print(commit, len(parts[-1]), hashlib.sha256(parts[-1]).hexdigest())
assert parts[0] == parts[1]

Shared client path and limits

Web and desktop use useComposerSend.ts; iOS and Android use threadOutboxDelivery.ts. Both call shared threadCommands.startTurn, which dispatches the same server command and reaches the tested recovery before opening any provider adapter. Connection transport does not select a different recovery implementation.

Recovery uses cached refs. It does not fetch unseen remote commits or reconstruct deleted branch-base metadata. Other remote names use the existing project-branch or detached-HEAD fallback. No remaining recovery claim depends on an unexercised platform-specific path.

Only the server service and its test change. No contracts, RPC shapes, bundling or scroll behavior change. All test backends, Metro and web servers were stopped by captured or verified port-owner PIDs, and the disposable simulator leases were returned and wiped.

Implemented by Claude Opus 5.5 through Claude Agent in T3 Code. Reproduced, tested and reviewed by GPT-6.1-Sol through the Codex harness in T3 Code.

    1. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Approved at 301b24a

      Macroscope's review found this PR approvable — Deleted managed thread worktrees can now recover from locally available remote refs or a detached checkout. The change is confined to missing-workspace recovery and preserves existing branches and normal turn-start behavior.

      No code changes detected at 4a762c7. Prior analysis still applies.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    2. github-actions[bot](GitHub profile, opens in a new tab)commented

      Thread transfer impact

      ✅ Thread transfer remains within every enforced ceiling.

      ProviderMetricMain baselineThis PRImpactPR ceiling
      CodexTotal thread wire5.0 KiB5.0 KiB−6 B (−0.1%)6.8 KiB✅
      CodexThread snapshot wire3.8 KiB3.8 KiB0 B (0.0%)4.9 KiB✅
      CodexLive turn WebSocket wire1.3 KiB1.2 KiB−6 B (−0.5%)2.0 KiB✅
      CodexLive turn WebSocket decoded21.6 KiB21.6 KiB0 B (0.0%)24.4 KiB✅
      CodexLive turn messages220 (0.0%)8✅
      ClaudeTotal thread wire5.0 KiB5.1 KiB+6 B (+0.1%)6.8 KiB✅
      ClaudeThread snapshot wire3.8 KiB3.8 KiB0 B (0.0%)4.9 KiB✅
      ClaudeLive turn WebSocket wire1.3 KiB1.3 KiB+6 B (+0.5%)2.0 KiB✅
      ClaudeLive turn WebSocket decoded21.9 KiB21.9 KiB0 B (0.0%)24.4 KiB✅
      ClaudeLive turn messages220 (0.0%)8✅

      Baseline: 32ecd71 · PR result: 4a762c7 · Source CI: success

      Scenario and decoded snapshot size

      10 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.

      • Codex decoded thread snapshot: 108.5 KiB
      • Claude decoded thread snapshot: 108.8 KiB

      Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

    3. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      Review in Change Stack →

      No actionable comments were generated in the recent review.

      Recent review info
      Run configuration
      Commits

      Reviewing files that changed from the base of the PR and between 301b24ad093d163ae61f30a3fb77880b9d5fa44a and 9168d0f99a16e04316eeeae5ff910cd00c7b47c0.

      Files selected for processing: 1
      • apps/server/src/orchestration-v2/ProviderTurnStartService.ts

      Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

      Walkthrough

      Worktree recreation now restores an existing remote thread branch when available. Otherwise, it selects a base from the current branch, origin/HEAD, or HEAD. Tests cover these recovery paths and verify that provider sessions and runs start.

      Changes: Worktree Recovery

      Layer / File(s)Summary
      Select a worktree recovery base
      apps/server/src/orchestration-v2/ProviderTurnStartService.ts
      Recovery uses an existing origin/<branch> ref when available. Otherwise, it selects the current branch, origin/HEAD, or HEAD, and reports an error if no commit is available.
      Validate recovery scenarios
      apps/server/src/orchestration-v2/ProviderTurnStartService.test.ts
      Tests cover retained and deleted branches, pushed thread tips, detached HEAD with and without a remote, and verify the recreated worktree configuration and run startup.
      Priority: Normal

      Estimated code review effort: 2 (Simple) | ~10 minutes

      Change: Bug fix · Severity of issue fixed: Medium

      Possibly related issues

      • pingdotgg/t3code#19124 describes turns that cannot start after the worktree and thread branch are removed. This change updates worktree recreation and adds fallback commit bases.
      • pingdotgg/t3code#24389 describes cleanup that removes a worktree while its branch remains. This change updates the subsequent recovery path, but does not change cleanup.

      Suggested labels: bugfix

      Suggested reviewers: yordis

      Merge Risk: Minimal · up to 9168d

      Detached-checkout recovery gains cached-ref fallbacks. No merge-blocking issue was identified; run the normal checks before merging.

      Pre-merge checks: Passed 4
      Check nameStatusExplanation
      Title checkPassedThe title clearly and concisely describes the primary change: recovery of deleted worktree threads from a detached checkout.
      Linked Issues checkPassedThe changes satisfy the coding requirements in directly linked issue #26745. recreateMissingWorktree first restores a retained local branch, then restores refs/remotes/origin/<branch> as the threa…
      Out of Scope Changes checkPassedThe whole-PR diff changes only ProviderTurnStartService.ts and its existing test file. The production changes implement missing-worktree recovery for #26745. The test changes provide regression cove…
      Description checkPassedThe pull request description is complete and follows the required template. It explains the problem, change, scope and approval basis, focused verification results, limitations, screenshots and record…
      Full details: Linked Issues check

      Explanation

      The changes satisfy the coding requirements in directly linked issue #26745. recreateMissingWorktree first restores a retained local branch, then restores refs/remotes/origin/&lt;branch&gt; as the thread branch. If neither exists, it uses the current branch, origin/HEAD, or detached HEAD. The focused real-Git test covers retained, deleted, pushed, detached, remote-default, and no-remote cases. It also verifies the recovered tip, files, upstream, and base metadata.

      Full details: Out of Scope Changes check

      Explanation

      The whole-PR diff changes only ProviderTurnStartService.ts and its existing test file. The production changes implement missing-worktree recovery for #26745. The test changes provide regression coverage for that recovery. No unrelated product area or client change is present.

      Full details: Description check

      Explanation

      The pull request description is complete and follows the required template. It explains the problem, change, scope and approval basis, focused verification results, limitations, screenshots and recordings, and the agent model and harness used.

      Finishing Touches
      📝 Generate docstrings
      • Commit to this branch
      • Create a new PR
      🧪 Generate unit tests (beta)
      • Commit to this branch
      • Create a new PR
      • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
      Comment `@coderabbitai help` to get the list of available commands.
    4. maria-rckscommented

      Note

      Written by gpt-6.1-sol on behalf of Maria

      Verified in a real dev environment

      verified as-is on Linux, exact head 4a762c76a07af3a0d0848676ede81972873a59b8. no product changes or pushes were needed.

      • reproduced on github/main at 6575ce32508bd7908444241f3719aa33aaf77f90 in a separate worktree after vp i and background vp run dev --no-seed. used repo Playwright with /usr/bin/google-chrome against the actual web client.
      • created a project through the app pointing at a real Git repo with a local bare origin. selected a new worktree and Codex gpt-6.1-sol. a real provider turn created, committed and pushed thread.txt at 356c04403d94b28c8ea296741e7cffb022f26deb.
      • removed that worktree and local branch, retained the cached pushed ref, and detached the project at origin/main. submitting a follow-up in the web composer failed with "Couldn't recreate thread workspace" and the detached-HEAD error. persisted run 2 is failed.
      • stopped main before starting the exact PR head after vp i, using the same isolated database and project without repairing Git state. submitted the identical follow-up through the composer. run 3 completed through the real Codex adapter. the worktree restored the saved pushed SHA, thread.txt and upstream refs/remotes/origin/t3/add-recovery-proof. the project remained detached.
      • neighboring checks: an ordinary follow-up completed and committed local-only.txt without pushing. after deleting only the worktree, another real Codex follow-up restored local commit 77bad9cd672e581f41a2a648e6478b77459a6b7e, preserved both files and stayed exactly one commit ahead of origin. runs 4 and 5 completed. Git independently confirmed the refs, contents and clean status.
      • Blacksmith: vp i && vp test run apps/server/src/orchestration-v2/ProviderTurnStartService.test.ts passed all 35 tests on this head. the PR had 33 successful CI checks. no mocks, Replay provider, fixtures or demo data were used for the running-app pass.

      before, main rejects the follow-up:

      main detached-worktree recovery failure

      main composer submission and recovery failure recording

      after, the same thread recovers on this PR:

      pr restores the pushed commit file branch and upstream

      pr composer submission and real codex recovery recording

      short Git and persisted-run transcript

      Not verified

      native iOS/Android clients, packaged Electron, macOS/Windows hosts, relay/tunnel connections, and other provider adapters were not exercised on this Linux VM. the no-cached-thread-ref fallbacks were covered by the focused real-Git tests, not separate live client scenarios. the origin used here was a real local bare repository, not an external Git hosting service. no performance claim is made. screenshots and exported clips were inspected; uploaded video playback and seeking were checked in Chrome.

    5. maria-rcks merged this6366aba

    6. maria-rcks closed this

Sign in to join this conversation.