fix: graceful ctrl+c shutdown and await session-end memory writes

This commit is contained in:
William Valentin
2026-02-18 11:30:47 -08:00
parent 55cde541ea
commit 21232748b9
6 changed files with 103 additions and 30 deletions
+15
View File
@@ -5423,6 +5423,21 @@
"docs/plans/state.json"
],
"test_status": "pnpm test:run src/models/retry.test.ts src/models/router.test.ts src/backends/native/agent.test.ts + pnpm typecheck passing"
},
"graceful-shutdown-awaits-session-end-memory": {
"status": "completed",
"date": "2026-02-18",
"updated": "2026-02-18",
"summary": "Improved Ctrl+C/SIGTERM shutdown reliability: daemon now performs bounded graceful signal shutdown with force-exit fallback, gateway now awaits async session disconnect so session-end summaries/memory writes finish before process exit, and TUI signal cleanup now awaits lifecycle shutdown before closing storage.",
"files_modified": [
"src/daemon/services.ts",
"src/gateway/session-bridge.ts",
"src/gateway/server.ts",
"src/gateway/session-bridge.test.ts",
"src/cli/tui.ts",
"docs/plans/state.json"
],
"test_status": "pnpm test:run src/gateway/session-bridge.test.ts src/gateway/server.test.ts src/models/router.test.ts src/models/retry.test.ts + pnpm typecheck passing"
}
},
"overall_progress": {