diff --git a/ccw/src/commands/cli.ts b/ccw/src/commands/cli.ts index ebf0ee3c..f19e7cc6 100644 --- a/ccw/src/commands/cli.ts +++ b/ccw/src/commands/cli.ts @@ -51,9 +51,11 @@ function notifyDashboard(data: Record): void { path: '/api/hook', method: 'POST', timeout: 2000, // 2 second timeout to prevent hanging + agent: false, // Disable Keep-Alive to allow process exit headers: { 'Content-Type': 'application/json', - 'Content-Length': Buffer.byteLength(payload) + 'Content-Length': Buffer.byteLength(payload), + 'Connection': 'close' // Ensure connection closes after response } }); @@ -93,9 +95,11 @@ function broadcastStreamEvent(eventType: string, payload: Record