Skip to content

feat(browser): make signed-in use chrome mcp clone - #831

Merged
artemgetmann merged 5 commits into
mainfrom
codex/browser-signed-in-mcp-default-20260531
Jun 5, 2026
Merged

artemgetmann merged 5 commits into
mainfrom
codex/browser-signed-in-mcp-default-20260531

Conversation

@artemgetmann

@artemgetmann artemgetmann commented May 31, 2026 •

Copy link
Copy Markdown
Owner

Review Fast Path

  • User path fixed: signed-in browser profile now uses a cloned signed-in Chrome session through Chrome MCP for GrabFood/Jarvis work.
  • Proof: focused tests + build passed; isolated raw signed-in status showed driver=existing-session, transport=chrome-mcp, cdpReady=true; GrabFood open/screenshot/snapshot/safe click all succeeded.
  • Shared-state footgun removed: openclaw remains the managed CDP fallback; signed-in is the built-in Chrome MCP clone lane; user-live remains the real live Chrome lane.
  • Still hurts: shared LaunchAgent/runtime ownership still needs correction after merge before main Telegram/Jarvis proof; current launchd service did not match the isolated lane during validation.

Why This Matters

  • Jarvis was correctly choosing profile="signed-in" for logged-in GrabFood work, but current main still routed built-in signed-in through managed CDP/Playwright helpers.
  • This makes the product default match the intended browser truth: signed-in web work uses the Chrome MCP cloned profile; clean/public fallback work uses openclaw.

Scope Boundary

  • Changed: built-in signed-in profile resolution, Chrome MCP existing-session lifecycle/action hardening, docs/tool guidance, and focused tests.
  • Did not change: openclaw managed browser fallback, user-live real Chrome attach semantics, Telegram runtime ownership, payment/checkout policy.
  • Rebase note: branch was rebased onto origin/main and includes one reconciliation commit preserving PR fix(browser): propagate snapshot timeouts #856 snapshot-timeout guidance plus PR feat(browser): make signed-in use chrome mcp clone #831 Chrome MCP behavior.

Verification

  • git diff --check origin/main...HEAD passed.
  • pnpm test -- src/browser/chrome-mcp.test.ts src/browser/routes/agent.existing-session.test.ts src/agents/tools/browser-tool.test.ts passed: 64 browser-route/Chrome-MCP tests + 53 browser-tool tests.
  • pnpm test -- src/browser/server-context.existing-session.test.ts passed: 4 tests.
  • pnpm build passed.

Isolated raw proof used:

  • OPENCLAW_HOME=.openclaw-signed-in-default/home
  • OPENCLAW_STATE_DIR=.openclaw-signed-in-default/state
  • OPENCLAW_CONFIG_PATH=.openclaw-signed-in-default/openclaw.json
  • foreground gateway on 23947, channels skipped.

Raw results:

  • node openclaw.mjs browser --url ws://127.0.0.1:23947 --token <redacted> --browser-profile signed-in status --json
    • profile: signed-in
    • driver: existing-session
    • transport: chrome-mcp
    • running: true
    • cdpReady: true
    • userDataDir: .openclaw-signed-in-default/state/browser/signed-in/user-data
  • tabs --json returned Chrome MCP pages.
  • open https://food.grab.com/id/en/ --json returned targetId: 2, URL https://food.grab.com/id/en/.
  • screenshot --json wrote an isolated media file under .openclaw-signed-in-default/state/media/browser/...jpg.
  • snapshot --json --timeout 60000 returned GrabFood content and refs, including location/search/category controls.
  • Safe action proof: click 1_21 --json succeeded, then tabs --json showed https://food.grab.com/id/en/cuisines/coffee-delivery/47; status still reported driver=existing-session, transport=chrome-mcp, cdpReady=true.

Runtime Ownership Gap

During isolated proof, gateway status showed the loaded shared LaunchAgent still points at the default service/runtime, not this isolated lane. I did not run gateway restart because that would take over shared launchd from a feature worktree.

After merge, before Telegram/Grab Jarvis proof:

  1. Fast-forward ~/Programming_Projects/openclaw to merged main.
  2. Restart/reinstall the shared gateway from the sacred home clone or update /Applications/Jarvis.app runtime, depending on the intended owner.
  3. Verify runtime identity before live Telegram proof.

AI Assistance

  • AI-assisted
  • Testing degree: targeted + isolated raw browser proof

@artemgetmann
artemgetmann force-pushed the codex/browser-signed-in-mcp-default-20260531 branch from c14654d to d2b0c34 Compare June 5, 2026 11:52
@artemgetmann
artemgetmann marked this pull request as ready for review June 5, 2026 11:53
Codex added 5 commits June 5, 2026 19:57
- normalize legacy browser action timeout and dblClick aliases before dispatch
- keep Chrome MCP timeouts at the request layer and recover opened tabs after navigation timeouts
- improve existing-session dropdown/press guidance with targeted tests
- risk: limited to browser tool and Chrome MCP existing-session paths
- what changed: keep evaluate_script timeouts out of Chrome MCP tool args, focus targeted existing-session presses, and pass only element refs through chooseOption evaluate args
- why: live signed-in Batik proof exposed Chrome MCP rejecting timeout args plus natural targeted press/dropdown calls failing on existing-session profiles
- behavior/risk: narrows text-ref recovery to exact visible matches after missing uid errors; stable refs remain strict and live proof stopped before passenger Continue/payment
- what changed: split attach-vs-tool timeout handling, stabilized screenshot temp reads, coalesced signed-in clone launches, and kept existing-session timeout overrides at the request layer
- why: post-ready MCP timeouts and duplicate clone parents were causing false approval guidance and flaky signed-in browser smokes
- behavior/risk: scoped to Chrome MCP existing-session lifecycle; targeted tests, build, raw smoke, and visible Batik smoke passed
@artemgetmann
artemgetmann force-pushed the codex/browser-signed-in-mcp-default-20260531 branch from d2b0c34 to 751c26e Compare June 5, 2026 12:00
@artemgetmann
artemgetmann merged commit cf660d2 into main Jun 5, 2026
22 of 24 checks passed
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