fix: harden resume after compaction failures (#195)

* fix: harden resume after compaction failures

* test: cover resume compaction safeguards

* fix: address resume safeguard review findings
This commit is contained in:
sooth
2026-04-03 10:31:06 -04:00
committed by GitHub
parent 6987a54a71
commit b0d796e5c3
8 changed files with 499 additions and 27 deletions

View File

@@ -3137,7 +3137,7 @@ async function run(): Promise<CommanderCommand> {
});
}
logError(error);
process.exit(1);
return await exitWithError(root, errorMessage(error), () => gracefulShutdown(1));
}
} else if (feature('DIRECT_CONNECT') && _pendingConnect?.url) {
// `claude connect <url>` — full interactive TUI connected to a remote server
@@ -3644,7 +3644,7 @@ async function run(): Promise<CommanderCommand> {
success: false
});
logError(error);
await exitWithError(root, `Unable to load transcript from file: ${options.resume}`, () => gracefulShutdown(1));
await exitWithError(root, errorMessage(error), () => gracefulShutdown(1));
}
}
}
@@ -3686,7 +3686,7 @@ async function run(): Promise<CommanderCommand> {
success: false
});
logError(error);
await exitWithError(root, `Failed to resume session ${sessionId}`);
await exitWithError(root, errorMessage(error));
}
}