Home

mweinbach / agent-coworker

publicmweinbach/agent-coworker
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

fix: ensure background server and child processes are cleaned up on exit

8 months ago

1e201e4
Authored
mweinbach2/20/2026, 6:42:54 PM
All entry points (TUI, CLI REPL, standalone server) now handle SIGHUP
(terminal close) in addition to SIGINT/SIGTERM, and register
process.on('exit') as a last-resort fallback. The server's stop()
method now disposes all active sessions before shutting down, which
aborts running agent turns and closes MCP stdio child processes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Parent54b8172

5 files changed
  • apps/TUI/index.tsx+2−0
  • src/cli/repl.ts+12−0
  • src/index.ts+12−0
  • src/server/index.ts+24−0
  • src/server/startServer.ts+17−0