Skip to content

Commit 31dc215

Browse files
openasocketclaude
andcommitted
MAESTRO: Report watchdog kill failures instead of swallowing silently
Log error details (targetSessionId, agentType, idleMs) when the inactivity watchdog fails to kill a hung Auto Run process, instead of silently ignoring the failure with .catch(() => {}). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a1c81f4 commit 31dc215

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/renderer/hooks/agent/useAgentExecution.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,14 @@ export function useAgentExecution(deps: UseAgentExecutionDeps): UseAgentExecutio
223223
agentType: session.toolType,
224224
});
225225
// Kill the hung process — onExit listener will fire and resolve the promise
226-
window.maestro.process.kill(targetSessionId).catch(() => {});
226+
window.maestro.process.kill(targetSessionId).catch((err) => {
227+
window.maestro.logger.log('error', 'Failed to kill hung Auto Run process', 'AgentExecution', {
228+
targetSessionId,
229+
agentType: session.toolType,
230+
idleMs,
231+
error: String(err),
232+
});
233+
});
227234
}
228235
}, 30_000); // Check every 30 seconds
229236

0 commit comments

Comments
 (0)