diff --git a/ccw/src/core/routes/cli-routes.ts b/ccw/src/core/routes/cli-routes.ts index 34c70f47..eaec37fb 100644 --- a/ccw/src/core/routes/cli-routes.ts +++ b/ccw/src/core/routes/cli-routes.ts @@ -87,6 +87,14 @@ export function updateActiveExecution(event: { }): void { const { type, executionId, tool, mode, prompt, output, success } = event; + // Debug log for troubleshooting + console.log(`[ActiveExec] ${type}: ${executionId} (current count: ${activeExecutions.size})`); + + if (!executionId) { + console.warn('[ActiveExec] Missing executionId, skipping'); + return; + } + if (type === 'started') { // Create new active execution activeExecutions.set(executionId, { diff --git a/ccw/src/core/routes/hooks-routes.ts b/ccw/src/core/routes/hooks-routes.ts index a2cad079..cd4ef20e 100644 --- a/ccw/src/core/routes/hooks-routes.ts +++ b/ccw/src/core/routes/hooks-routes.ts @@ -268,6 +268,7 @@ export async function handleHooksRoutes(ctx: HooksRouteContext): Promise