Skip to content

Commit b557e65

Browse files
committed
fix(server): inspect the selected Codex terminal home
1 parent d519703 commit b557e65

4 files changed

Lines changed: 560 additions & 17 deletions

File tree

‎apps/server/src/provider/Drivers/CodexHomeLayout.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,9 @@ export const inspectCodexShadowSqlite = Effect.fn("inspectCodexShadowSqlite")(fu
419419
// links for operator recovery instead of giving launch paths different rules.
420420
for (const entryName of shadowEntryNames) {
421421
if (!SQLITE_ENTRY_NAME.test(entryName)) continue;
422-
const linkPath = path.join(effectiveHomePath, entryName);
422+
// Preserve the directory lookup spelling: path.join would collapse '..'
423+
// before the filesystem can resolve an earlier directory symlink.
424+
const linkPath = `${effectiveHomePath}${effectiveHomePath.endsWith(path.sep) ? "" : path.sep}${entryName}`;
423425
const state = yield* readLinkState({
424426
fileSystem,
425427
sharedHomePath: layout.sharedHomePath,

‎apps/server/src/serverSettings.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1899,6 +1899,7 @@ it.layer(NodeServices.layer)("server settings", (it) => {
18991899
path,
19001900
rawProviderInstanceId: instanceId,
19011901
stateDir: serverConfig.stateDir,
1902+
cwd: process.cwd(),
19021903
env: undefined,
19031904
});
19041905
const persisted = yield* fileSystem.readFileString(serverConfig.settingsPath);

0 commit comments

Comments
 (0)