Skip to content

Conversation

@gbasin
Copy link
Contributor

@gbasin gbasin commented Jan 12, 2026

Summary

When multiple MCP clients call oracle consult in parallel (e.g., multiple Claude Code sessions), browser mode sessions can contaminate each other because they share the same Chrome tab. This PR fixes the issue by creating isolated tabs for each session.

Changes:

  • Add connectWithNewTab() and closeTab() functions to create/cleanup isolated CDP tabs
  • Use isolated tabs in runBrowserMode instead of connecting to the shared first target
  • Pass through manualLogin and chatgptUrl from user's ~/.oracle/config.json to MCP consult tool

Before: Parallel sessions share one tab → responses get mixed up
After: Each session gets its own tab → responses are isolated

Test plan

  • Run two parallel oracle consult calls with different prompts
  • Verify each session receives its own correct response
  • Verify tabs are cleaned up after sessions complete

🤖 Generated with Claude Code

- Add connectWithNewTab/closeTab functions for isolated CDP tabs
- Use isolated tabs in runBrowserMode to prevent cross-session contamination
- Pass through user's browser config (chatgptUrl, manualLogin, keepBrowser) from ~/.oracle/config.json to MCP consult tool

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@steipete
Copy link
Owner

Oh that's a neat one, thanks!

Resolved conflict in src/mcp/tools/consult.ts by accepting upstream's
enhanced browser controls (profile directory support, thinking time,
keep browser option).
@steipete steipete merged commit 0dd7788 into steipete:main Jan 19, 2026
1 check passed
@steipete
Copy link
Owner

Landed via temp rebase onto main.

  • Gate: pnpm lint && pnpm build && pnpm test
  • Land commit: 320b99e
  • Merge commit: 0dd7788

Thanks @gbasin!

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.

2 participants