fix(sessions): lock store saves; wait for bash close

This commit is contained in:
Peter Steinberger
2026-01-10 17:47:04 +01:00
parent a54706a063
commit 60bf349201
2 changed files with 47 additions and 17 deletions

View File

@@ -436,7 +436,9 @@ export function createBashTool(
);
};
child.once("exit", (code, exitSignal) => {
// `exit` can fire before stdio fully flushes (notably on Windows).
// `close` waits for streams to close, so aggregated output is complete.
child.once("close", (code, exitSignal) => {
handleExit(code, exitSignal);
});