chore: address review feedback - log cleanup errors, add inline comment

This commit is contained in:
zhangxy-zju 2026-03-25 15:51:37 +08:00
parent 38d0acb01c
commit e1371ec781
2 changed files with 4 additions and 1 deletions

View file

@ -112,7 +112,9 @@ export async function runAcpAgent(
// Without this, orphan subprocesses keep the Node.js event loop alive
// and the CLI process never terminates after the IDE disconnects.
runExitCleanup()
.catch(() => {})
.catch((err) => {
debugLogger.error('[ACP] Cleanup error:', err);
})
.finally(() => {
process.exit(0);
});

View file

@ -409,6 +409,7 @@ export async function main() {
if (config.getExperimentalZedIntegration()) {
await runAcpAgent(config, settings, argv);
// Clean up child processes and force exit, matching other non-interactive modes
await runExitCleanup();
process.exit(0);
}