Skip to content

fix(browser): stabilize signed-in browser lanes and add explicit live Chrome lane#139

Merged
artemgetmann merged 4 commits into
mainfrom
codex/browser-fix-main
Mar 25, 2026
Merged

fix(browser): stabilize signed-in browser lanes and add explicit live Chrome lane#139
artemgetmann merged 4 commits into
mainfrom
codex/browser-fix-main

Conversation

@artemgetmann
Copy link
Copy Markdown
Owner

Review Fast Path

  • User path fixed: signed-in browser flows no longer degrade because the cloned user lane fails early on CDP attach, and explicit live-browser tasks now have a real lane instead of overloading user.
  • Proof: focused local browser flow on patched runtime succeeded with user (start -> open https://example.com -> snapshot) after previous logs showed repeated browserType.connectOverCDP: Timeout 9000ms exceeded on the same lane.
  • Shared-state footgun removed: user and the real live browser are no longer conflated under one semantic bucket, and the runtime ownership rule is now easier for agents to find.
  • Still hurts: user-live still needs a post-merge smoke against the real Chrome session from main.

Why This Matters

  • The bot was falling back unnecessarily despite a live local CDP socket.
  • Users need both behaviors:
    • safe cloned signed-in browsing
    • real live-browser control when they explicitly mean an already-open tab/window
  • The primary gateway also needs a clear runtime-ownership rule so the production bot does not drift onto a worktree checkout.

Scope Boundary

  • What changed:
    • local loopback CDP attach timing
    • explicit user-live lane
    • chrome alias normalization
    • workflow/runtime/agent guidance for worktree validation vs primary-bot runtime ownership
  • What did not change:
    • user semantics remain cloned and safe by default
  • What still hurts:
    • live-session smoke for user-live must happen after merge from main

Verification

  • Targeted validation:
    • pnpm openclaw:local browser --browser-profile user start
    • pnpm openclaw:local browser --browser-profile user open https://example.com
    • pnpm openclaw:local browser --browser-profile user snapshot --json --timeout 60000
  • Outcome:
    • startup, open, and snapshot succeeded
    • old fast attach-timeout symptom did not reproduce in that flow

AI Assistance

  • AI-assisted
  • Testing degree: targeted

- what:
  - extend local CDP attach timing so the cloned signed-in `user` lane stops failing early during Playwright attach.
  - add explicit `user-live` existing-session lane and normalize informal `chrome` / `chrome-live` requests onto it.
  - update browser docs so `user` means cloned safe lane and `user-live` means the real live Chrome session.
- why:
  - logs showed repeated `connectOverCDP` timeouts even after the local CDP websocket connected.
  - the product needed both a safe signed-in clone and an explicit live-browser lane instead of overloading one name.
- risk:
  - callers using informal `chrome` naming now resolve to the live lane when it exists, which changes behavior for flows that previously assumed the cloned lane.
- what:
  - document that the long-lived LaunchAgent gateway and main bot must run from the `main` checkout, not a feature worktree.
  - add the merge-first, then restart-from-main rule to workflow and runtime operations guidance.
- why:
  - running the live bot from a worktree build creates runtime ownership drift and invalidates repro/debug assumptions.
- risk:
  - low; this is documentation only, but the team has to actually follow it or the footgun stays loaded.
@artemgetmann artemgetmann merged commit e6d9d10 into main Mar 25, 2026
3 of 10 checks passed
vincentkoc pushed a commit that referenced this pull request Apr 28, 2026
…enclaw#59387)

* fix: address issue #139

* changelog: add zalo replay dedupe fix entry

---------

Co-authored-by: Jacob Tomlinson <jtomlinson@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant