The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 23, 14:15 UTC
fix(server): checkpoint restore keeps a nested workspace on Windows (#14874)
Jonas B. committed
Oct 11, 2026 at 20:14 UTC
a5331e4c2c0f0a7b85d912e487f5c97bbce921aa
2 files changed
+5
-1
apps/server/src/vcs/GitVcsDriver.test.ts
+1
@@ -1049,6 +1049,7 @@ it.effect("restores empty checkpoints without changing paths outside the workspa
1049
fallbackToHead: false,
1050
}),
1051
);
1052
+ assert.isTrue(yield* fileSystem.exists(cwd));
1053
assert.isFalse(yield* fileSystem.exists(addedPath));
1054
}
1055
yield* fileSystem.writeFileString(
apps/server/src/vcs/GitVcsDriver.ts
+4
-1
@@ -1114,7 +1114,7 @@ export const makeVcsDriverShape = Effect.fn("makeGitVcsDriverShape")(function* (
1114
});
1115
}
1116
// Restoring away the last tracked file can remove a nested workspace directory.
1117
- yield* fileSystem.makeDirectory(input.cwd, { recursive: true }).pipe(
1117
+ const recreateWorkspace = fileSystem.makeDirectory(input.cwd, { recursive: true }).pipe(
1118
Effect.mapError(
1119
(cause) =>
1120
new VcsProcessExitError({
@@ -1126,6 +1126,7 @@ export const makeVcsDriverShape = Effect.fn("makeGitVcsDriverShape")(function* (
1126
}),
1127
),
1128
);
1129
+ yield* recreateWorkspace;
1130
const cleaned = yield* execute({
1131
operation,
1132
cwd: input.cwd,
@@ -1150,6 +1151,8 @@ export const makeVcsDriverShape = Effect.fn("makeGitVcsDriverShape")(function* (
1151
detail: cleaned.stderr.trim() || "Could not clean the checkpoint workspace.",
1152
});
1153
}
1154
+ // On Windows the same clean can remove './' and exit 0.
1155
+ yield* recreateWorkspace;
1156
1157
const headExists = yield* hasHeadCommit(input.cwd);
1158
if (headExists) {