From 5c5b5c7afcf26e6fbeeeea17afba98839c61f650 Mon Sep 17 00:00:00 2001 From: 777genius Date: Fri, 24 Apr 2026 23:04:09 +0300 Subject: [PATCH] fix(opencode): expire stale host leases on startup --- src/main/index.ts | 1 + .../team/opencode/bridge/OpenCodeBridgeCommandContract.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/main/index.ts b/src/main/index.ts index 18bbfd1c..b02a12a0 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -289,6 +289,7 @@ async function cleanupOpenCodeHostsForLifecycle(reason: 'startup' | 'shutdown'): reason, mode: reason === 'shutdown' ? 'force' : 'stale', staleAgeMs: reason === 'startup' ? 5 * 60_000 : null, + leaseStaleAgeMs: reason === 'startup' ? 24 * 60 * 60_000 : null, }); if (result.cleaned > 0) { logger.info( diff --git a/src/main/services/team/opencode/bridge/OpenCodeBridgeCommandContract.ts b/src/main/services/team/opencode/bridge/OpenCodeBridgeCommandContract.ts index 2b76b01b..01db02a4 100644 --- a/src/main/services/team/opencode/bridge/OpenCodeBridgeCommandContract.ts +++ b/src/main/services/team/opencode/bridge/OpenCodeBridgeCommandContract.ts @@ -122,6 +122,7 @@ export interface OpenCodeCleanupHostsCommandBody { mode?: 'stale' | 'force'; projectPath?: string; staleAgeMs?: number | null; + leaseStaleAgeMs?: number | null; } export interface OpenCodeCleanupHostsCommandData {