mirror of
https://github.com/stablyai/orca.git
synced 2026-10-19 08:03:13 +00:00
fix(codex): keep resume migration best effort
This commit is contained in:
+21
-12
@@ -812,18 +812,27 @@ async function prepareCodexSessionResumeForLaunch(args: {
|
||||
return null
|
||||
}
|
||||
|
||||
const migrated = await prepareLegacySharedCodexSessionResume(
|
||||
{
|
||||
agent: 'codex',
|
||||
executionHostId: 'local',
|
||||
filePath: sessionSource.transcriptPath,
|
||||
codexHome: sessionSource.homePath
|
||||
},
|
||||
{
|
||||
isHostSystemDefaultRealHome: () => codexRuntimeHome!.isHostSystemDefaultRealHome(),
|
||||
systemCodexHomePath: systemHomePath
|
||||
}
|
||||
)
|
||||
let migrated = { useRealCodexHome: false }
|
||||
try {
|
||||
migrated = await prepareLegacySharedCodexSessionResume(
|
||||
{
|
||||
agent: 'codex',
|
||||
executionHostId: 'local',
|
||||
filePath: sessionSource.transcriptPath,
|
||||
codexHome: sessionSource.homePath
|
||||
},
|
||||
{
|
||||
isHostSystemDefaultRealHome: () => codexRuntimeHome!.isHostSystemDefaultRealHome(),
|
||||
systemCodexHomePath: systemHomePath
|
||||
}
|
||||
)
|
||||
} catch (error) {
|
||||
// Why: migration is a compatibility repair; its failure must not prevent the PTY from resuming from its trusted origin home.
|
||||
console.warn(
|
||||
'[codex-session-resume] Legacy rollout migration failed; using origin home:',
|
||||
error
|
||||
)
|
||||
}
|
||||
const resumeHome = migrated.useRealCodexHome ? systemHomePath : sessionSource.homePath
|
||||
|
||||
if (args.workspacePath) {
|
||||
|
||||
Reference in New Issue
Block a user