fix: update scripts and hooks for improved worker management and synchronization

This commit is contained in:
Alex Newman
2025-12-09 00:25:53 -05:00
parent 9a27f380c3
commit 5550ecf623
8 changed files with 63 additions and 20 deletions
+4 -1
View File
@@ -7,7 +7,7 @@
*/
import { stdin } from 'process';
import { getWorkerPort } from '../shared/worker-utils.js';
import { ensureWorkerRunning, getWorkerPort } from '../shared/worker-utils.js';
import { silentDebug } from '../utils/silent-debug.js';
export interface SessionEndInput {
@@ -44,6 +44,9 @@ async function cleanupHook(input?: SessionEndInput): Promise<void> {
const { session_id, reason } = input;
// Ensure worker is running
await ensureWorkerRunning();
const port = getWorkerPort();
try {