-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Bug]: Managed browser cookies never persist to disk (in-memory only) — login sessions lost on every browser/gateway restart (reproduces on 2026.6.10; refile of #15645) #96704
Copy link
Copy link
Closed
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:current-main-reproClawSweeper found a high-confidence current-main issue reproduction.ClawSweeper found a high-confidence current-main issue reproduction.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:data-lossCan lose, corrupt, or silently drop user/session/config data.Can lose, corrupt, or silently drop user/session/config data.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦀 challenger crabExceptional issue quality: high-confidence current-main reproduction and actionable evidence.Exceptional issue quality: high-confidence current-main reproduction and actionable evidence.
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:current-main-reproClawSweeper found a high-confidence current-main issue reproduction.ClawSweeper found a high-confidence current-main issue reproduction.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:data-lossCan lose, corrupt, or silently drop user/session/config data.Can lose, corrupt, or silently drop user/session/config data.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦀 challenger crabExceptional issue quality: high-confidence current-main reproduction and actionable evidence.Exceptional issue quality: high-confidence current-main reproduction and actionable evidence.
Type
Fields
Priority
None yet
Summary
The managed
openclawbrowser profile loses all cookies / login sessions whenever the browser process, or the parent gateway that owns the Chrome child, restarts. This was reported and root-caused in #15645, which was auto-closed as stale, not fixed. It still reproduces on the latest release, so filing fresh per the closing note's request.Root cause
Chrome driven over CDP does not flush cookies to its on-disk SQLite store; cookies live only in memory.
Network.getAllCookiesreturns them in-session, butuser-data/Default/Cookiesstays at 0 rows andDefault/Network/Cookiesis never created. This is documented Chrome-via-CDP behavior; see chromedp/chromedp#818.Reproduction (minimal)
openclaw browser startStorage.setCookiesand a futureexpires, or log into any site in the managed profile.~/.openclaw/browser/openclaw/user-data/Default/Cookies-> 0 rows; noDefault/Network/Cookiesexists.Browser.closewith Preferencesexit_type: Normaland a 45s in-flight wait, the cookie is absent from disk.Evidence / scope
SIGUSR1,config.patch, update) kills it, causing full session loss even without an explicitbrowser stop.Impact
Any browser-SSO automation cold-starts every run and hits the SSO/MFA wall, so it cannot complete unattended.
Proposed fix
Implement CDP cookie save/restore as #15645 specified: on graceful stop and on a periodic flush,
Network.getAllCookies-> a per-profile sidecar; on start,Network.setCookiesto restore. The sidecar should be treated as sensitive profile state.A working local patch already does this in the browser plugin's launch/stop lifecycle and survives both browser restarts and gateway restarts. Happy to open a PR if the maintainers want this upstream.
Refile of #15645.