feat: add Deep Research browser automation support#112
Open
xrliAnnie wants to merge 7 commits intosteipete:mainfrom
Open
feat: add Deep Research browser automation support#112xrliAnnie wants to merge 7 commits intosteipete:mainfrom
xrliAnnie wants to merge 7 commits intosteipete:mainfrom
Conversation
6-phase plan for adding ChatGPT Deep Research support via browser automation: - Phase 0: Architecture overview, DOM selectors, iframe strategy - Phase 1: Types, config, and CLI flag plumbing - Phase 2: Core action module (activate, plan auto-confirm, completion polling) - Phase 3: Main flow integration in index.ts - Phase 4: Reattach & session support for long-running research - Phase 5: Testing strategy (unit, integration, live, manual) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wire --deep-research flag through the full config pipeline: CLI → BrowserFlagOptions → buildBrowserConfig → BrowserSessionConfig → BrowserAutomationConfig → ResolvedBrowserConfig. Adds DOM selector constants, 40-min default timeout override, and forces modelStrategy to "ignore" when Deep Research is active. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Create src/browser/actions/deepResearch.ts with three exported functions: - activateDeepResearch: DOM automation to enable Deep Research mode - waitForResearchPlanAutoConfirm: wait for ~70s auto-confirm countdown - waitForDeepResearchCompletion: poll completion over 5-30+ min runs Reuses existing captureAssistantMarkdown/readAssistantSnapshot for response extraction. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wire Deep Research actions into the browser orchestration loop: - Skip thinking time selection when Deep Research is active - Activate Deep Research mode via pill before prompt submission - After submission, wait for research plan auto-confirm (~70s) - Monitor research completion (5-30min) with timeout error enrichment - Return early with extracted result, bypassing normal response flow - Update session timing hint for Deep Research runs - Add Deep Research re-exports to pageActions.ts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add checkDeepResearchStatus() for quick status check during reattach - Export extractDeepResearchResult() for reattach result extraction - Add Deep Research branch to resumeBrowserSession and resumeBrowserSessionViaNewChrome - Show "browser/dr" mode label in oracle status table for Deep Research sessions - Extend zombie timeout threshold for Deep Research sessions (40 min minimum) - Adjust auto-reattach timing: 2 min initial delay, 1 min interval, 5 min per attempt Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add 14 unit tests for activateDeepResearch, waitForResearchPlanAutoConfirm, waitForDeepResearchCompletion, and checkDeepResearchStatus - Add 4 CLI config tests for --deep-research flag behavior - Add 3 session table tests for browser/dr mode label - Add Deep Research reattach test (completed status path) - Add manual test checklist to docs/manual-tests.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The attachment UI verification after submitting a message would throw an error even though the message (with attachments) was already successfully sent. This caused browser runs with file uploads to fail unnecessarily when ChatGPT's DOM did not expose the expected attachment UI on the sent user turn. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--deep-researchCLI flag for ChatGPT Deep Research browser automationoracle session <slug>browser/drmode label inoracle statusfor Deep Research sessionsChanges
BrowserAutomationConfig.deepResearch), config pipeline,--deep-researchCLI flag with--engine browserauto-forcing andmodelStrategy: "ignore"src/browser/actions/deepResearch.ts) —activateDeepResearch,waitForResearchPlanAutoConfirm,waitForDeepResearchCompletion,checkDeepResearchStatussrc/browser/index.ts) — conditional activation, skip thinking time, separate response monitoring with early returnsrc/browser/reattach.ts) — detect completed/in-progress research on reconnect, extend zombie timeout, adjust auto-reattach timingdocs/manual-tests.mdPlan Reference
docs/deep-research-plan/(5 phase plans + overview)Test Plan
🤖 Generated with Claude Code