This commit is contained in:
Sylvi Publishing 2026-01-30 11:15:57 -05:00 committed by GitHub
commit 21f383697a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -54,8 +54,10 @@ export function resolveSessionFilePath(
entry?: SessionEntry,
opts?: { agentId?: string },
): string {
const candidate = entry?.sessionFile?.trim();
return candidate ? candidate : resolveSessionTranscriptPath(sessionId, opts?.agentId);
// Always compute path from current environment rather than trusting stored paths.
// Stored absolute paths in sessions.json break when migrating to a different user
// or home directory, causing EACCES errors when accessing the old user's paths.
return resolveSessionTranscriptPath(sessionId, opts?.agentId);
}
export function resolveStorePath(store?: string, opts?: { agentId?: string }) {