mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-03 09:13:30 +00:00
Start() bound the shared *rod.Browser to a context built with context.WithTimeout(ctx, 15s) and a deferred cancel, so the browser's context was canceled the moment Start() returned. Any later reuse of the shared handle then failed immediately with "context canceled" — most visibly m.browser.Incognito() in tenantBrowserLocked, so a successful "start" action was followed by a failing tab creation for scoped (tenant|user|agent) agent sessions. The getPage path masked this via its auto-reconnect (reconnectLocked uses a background context), but the incognito path has no such recovery. Connect with the default background context, the same way reconnectLocked already does. The local launcher path stays bounded by launchCtx and remote reachability by resolveRemoteCDP, so no meaningful connect-time guard is lost.