Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/debug/agentSessionCli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,12 @@ async function main(): Promise<void> {
}
}

void (async () => {
// Keep process alive explicitly - Bun may exit when stdin closes even if async work is pending
const keepAliveInterval = setInterval(() => {
// No-op to keep event loop alive
}, 1000000);

(async () => {
try {
await main();
} catch (error) {
Expand All @@ -507,5 +512,7 @@ void (async () => {
process.stderr.write(`Error: ${message}\n`);
}
process.exitCode = 1;
} finally {
clearInterval(keepAliveInterval);
}
})();