Tools: How to Use Claude.ai's Research Toggle Inside Claude Code

Tools: How to Use Claude.ai's Research Toggle Inside Claude Code

Source: Dev.to

The Missing Feature That Changes Everything ## The Problem: Web Search vs Research ## What Web Search Does ## What Research Does ## Real World Comparison ## The Gap ## The Solution: Background Agents + Chrome Automation ## Architecture ## Prerequisites ## Install Claude in Chrome Extension ## Critical Fix: The Native Messaging Conflict ## Diagnosing the Problem ## The Fix ## Reverting Later ## Installing the Research Skill ## File Structure ## Step 1: Create the Directories ## Step 2: Create SKILL.md ## Step 3: Create agent-prompt.md ## Step 4: Create the Slash Command ## Step 5: Add to Your Project's CLAUDE.md ## Using the Research Skill ## Step 1: Start Claude Code with Chrome ## Step 2: Verify Connection ## Step 3: Run a Research Task ## Step 4: Send to Background (if needed) ## Step 5: Continue Working ## Step 6: Check Status ## Step 7: Review Results ## Example Workflow ## Troubleshooting ## "Browser extension is not connected" ## Research toggle not found ## Task times out ## Agent skips the Research step ## Why This Matters ## Credits If you've been using Claude Code for development, you've probably noticed something frustrating: you can search the web, but you can't access Claude's powerful Research feature. Web search gives you quick answers in seconds. Research gives you comprehensive, multi-source reports with citations in 5 to 30 minutes. They're not the same thing, and for serious technical decisions, Research is a game changer. This guide shows you how to bring Research into Claude Code using a clever workaround that spawns a background agent to control your browser. When you ask Claude Code to search the web, it: This is great for quick lookups like "What's the syntax for Laravel's whereHas?" or "Who maintains this package?" When you use the Research toggle in Claude.ai, it: This takes 5 to 30 minutes, but the output is dramatically different. Query: "What's new in Laravel 12?" Laravel 12 introduces several new features including improved routing performance and better Eloquent query optimization. The release focuses on developer experience improvements. A 15+ paragraph report covering: For architectural decisions, migration planning, or evaluating new technologies, Research is worth the wait. Claude Code has web search built in. But the Research toggle only exists in the Claude.ai web interface. There's no /research command, no API endpoint, no native way to access it from your terminal. Here's the insight: Claude Code can control your Chrome browser through the Claude in Chrome extension. And Claude.ai runs in Chrome. So we can make Claude Code open Claude.ai, toggle Research, run a query, and extract the results. But there's a catch. Research takes 5 to 30 minutes. If we run this as a normal task, Claude Code would block and wait, wasting your time. The solution is background agents. We spawn a dedicated agent that runs the Research automation while your main Claude Code session continues working on other tasks. When Research completes, the results are saved to your project and the agent reports back. Before setting this up, you need: If you have both Claude Desktop and Claude Code installed, there's a conflict that prevents claude --chrome from connecting to the browser extension. If you see both of these files, you have the conflict: Chrome connects to the first one (Claude Desktop) and ignores Claude Code. Back up the Claude Desktop configuration: If you need Claude Desktop's Chrome integration back: The Research skill consists of several files that tell Claude Code how to perform the automation. Save this as ~/.claude/skills/web-research-task/SKILL.md: Save this as ~/.claude/skills/web-research-task/agent-prompt.md: Save this as ~/.claude/skills/web-research-task/commands/research-via-web.md: Add this section to your project's CLAUDE.md file: You should see a message indicating the Chrome extension is connected. Type /chrome in Claude Code to check the connection status. You should see the extension is detected and connected. Option A - Natural language: Option B - Slash command: If the task doesn't automatically run in the background, press Ctrl+Shift+B to send it to the background. Your main Claude Code session is free. Continue coding, run other commands, or start another task. To see how your background agent is doing: When complete, the agent saves results to: You can reference this file in your main session: Here's a real workflow for planning a Laravel 11 to 12 migration: # Spawn research on Laravel 12 changes > Spawn a background agent to research via Claude.ai: "Complete Laravel 12 migration guide from Laravel 11, including all breaking changes, deprecated features, and new requirements" # Agent starts in background, you continue working > Review my routes/web.php for any deprecated patterns # Check research progress > /bashes # 20 minutes later, research completes # Results saved to ./docs/research/20260126-laravel-12-migration.md # Use the research in your work > @docs/research/20260126-laravel-12-migration.md > Based on this research, create a migration checklist for my project This setup bridges a significant gap in Claude Code's capabilities. For developers making architectural decisions, evaluating technologies, or planning migrations, the difference between a 10-second web search and a 20-minute deep research session is the difference between a guess and an informed decision. The background agent approach means you don't have to choose between thoroughness and productivity. Start the research, continue your work, and integrate the findings when they're ready. It's Claude helping Claude help you. Original idea by @EleanorKonik. This article formalizes her concept into a working implementation. Templates let you quickly answer FAQs or store snippets for re-use. Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse CODE_BLOCK: ┌─────────────────────────────────────┐ │ Your Main Claude Code Session │ │ (Keep working on other tasks) │ └──────────────────┬──────────────────┘ │ Spawn background agent ▼ ┌─────────────────────────────────────┐ │ Background Agent │ │ (Dedicated to research task) │ └──────────────────┬──────────────────┘ │ Uses claude --chrome ▼ ┌─────────────────────────────────────┐ │ Claude in Chrome Extension │ │ (Controls your browser) │ └──────────────────┬──────────────────┘ │ Navigates and interacts ▼ ┌─────────────────────────────────────┐ │ Claude.ai Research Feature │ │ (Runs for 5-30 minutes) │ └──────────────────┬──────────────────┘ │ Extracts results ▼ ┌─────────────────────────────────────┐ │ ./docs/research/report.md │ │ (Saved to your project) │ └─────────────────────────────────────┘ CODE_BLOCK: ┌─────────────────────────────────────┐ │ Your Main Claude Code Session │ │ (Keep working on other tasks) │ └──────────────────┬──────────────────┘ │ Spawn background agent ▼ ┌─────────────────────────────────────┐ │ Background Agent │ │ (Dedicated to research task) │ └──────────────────┬──────────────────┘ │ Uses claude --chrome ▼ ┌─────────────────────────────────────┐ │ Claude in Chrome Extension │ │ (Controls your browser) │ └──────────────────┬──────────────────┘ │ Navigates and interacts ▼ ┌─────────────────────────────────────┐ │ Claude.ai Research Feature │ │ (Runs for 5-30 minutes) │ └──────────────────┬──────────────────┘ │ Extracts results ▼ ┌─────────────────────────────────────┐ │ ./docs/research/report.md │ │ (Saved to your project) │ └─────────────────────────────────────┘ CODE_BLOCK: ls ~/Library/Application\ Support/Google/Chrome/NativeMessagingHosts/ CODE_BLOCK: ls ~/Library/Application\ Support/Google/Chrome/NativeMessagingHosts/ CODE_BLOCK: com.anthropic.claude_browser_extension.json ← Claude Desktop com.anthropic.claude_code_browser_extension.json ← Claude Code CODE_BLOCK: com.anthropic.claude_browser_extension.json ← Claude Desktop com.anthropic.claude_code_browser_extension.json ← Claude Code CODE_BLOCK: mv ~/Library/Application\ Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_browser_extension.json \ ~/Library/Application\ Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_browser_extension.json.backup CODE_BLOCK: mv ~/Library/Application\ Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_browser_extension.json \ ~/Library/Application\ Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_browser_extension.json.backup CODE_BLOCK: mv ~/Library/Application\ Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_browser_extension.json.backup \ ~/Library/Application\ Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_browser_extension.json CODE_BLOCK: mv ~/Library/Application\ Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_browser_extension.json.backup \ ~/Library/Application\ Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_browser_extension.json COMMAND_BLOCK: ~/.claude/skills/web-research-task/ ├── SKILL.md # Main skill documentation ├── agent-prompt.md # Step-by-step instructions for the agent └── commands/ └── research-via-web.md # Slash command definition COMMAND_BLOCK: ~/.claude/skills/web-research-task/ ├── SKILL.md # Main skill documentation ├── agent-prompt.md # Step-by-step instructions for the agent └── commands/ └── research-via-web.md # Slash command definition CODE_BLOCK: mkdir -p ~/.claude/skills/web-research-task/commands CODE_BLOCK: mkdir -p ~/.claude/skills/web-research-task/commands COMMAND_BLOCK: # Claude Web Research Task ## Purpose This skill enables Claude Code to spawn a dedicated background agent that uses Claude in Chrome to access Claude.ai's Research toggle, run deep research queries, and return comprehensive results. IMPORTANT: This task MUST run as a background agent because Research takes 5 to 30+ minutes. Do NOT skip this step or try to inline it into other workflows. ## Prerequisites 1. Claude in Chrome Extension installed and authenticated 2. Claude Code v2.0.60+ (for background agents) 3. Paid Claude subscription (Pro/Team/Max/Enterprise) 4. Chrome browser running ## How to Invoke ### Option 1: Background Agent (Recommended) Start Claude Code with Chrome integration: claude --chrome Then spawn the research task: Spawn a background agent to research via Claude.ai: "Your query here" Press Ctrl+Shift+B if not automatically backgrounded. ### Option 2: Slash Command /research-via-web "Your query here" ## Workflow Steps The background agent will: 1. Open new Chrome tab to https://claude.ai 2. Wait for page load 3. Click "Research" toggle (bottom left of chat interface) 4. Enter the research query in the chat input 5. Submit and wait for research to complete (5-30 minutes) 6. Extract the full response including citations 7. Save to file: ./docs/research/[timestamp]-[query-slug].md 8. Return summary to main Claude Code session ## Critical Instructions When executing this task: - Run as BACKGROUND AGENT (use run_in_background: true) - DO NOT attempt to speed this up or skip steps - WAIT for the Research feature to fully complete - Poll the page every 30 seconds to check completion status - Only extract results AFTER seeing the full research output ## Expected Timeline | Phase | Duration | |-------|----------| | Navigate to claude.ai | 5-10 seconds | | Toggle Research | 2-5 seconds | | Enter query | 5-10 seconds | | Research execution | 5-30 minutes | | Extract results | 10-30 seconds | | Save to file | 2-5 seconds | Total: 6 to 35 minutes (mostly waiting for Research) COMMAND_BLOCK: # Claude Web Research Task ## Purpose This skill enables Claude Code to spawn a dedicated background agent that uses Claude in Chrome to access Claude.ai's Research toggle, run deep research queries, and return comprehensive results. IMPORTANT: This task MUST run as a background agent because Research takes 5 to 30+ minutes. Do NOT skip this step or try to inline it into other workflows. ## Prerequisites 1. Claude in Chrome Extension installed and authenticated 2. Claude Code v2.0.60+ (for background agents) 3. Paid Claude subscription (Pro/Team/Max/Enterprise) 4. Chrome browser running ## How to Invoke ### Option 1: Background Agent (Recommended) Start Claude Code with Chrome integration: claude --chrome Then spawn the research task: Spawn a background agent to research via Claude.ai: "Your query here" Press Ctrl+Shift+B if not automatically backgrounded. ### Option 2: Slash Command /research-via-web "Your query here" ## Workflow Steps The background agent will: 1. Open new Chrome tab to https://claude.ai 2. Wait for page load 3. Click "Research" toggle (bottom left of chat interface) 4. Enter the research query in the chat input 5. Submit and wait for research to complete (5-30 minutes) 6. Extract the full response including citations 7. Save to file: ./docs/research/[timestamp]-[query-slug].md 8. Return summary to main Claude Code session ## Critical Instructions When executing this task: - Run as BACKGROUND AGENT (use run_in_background: true) - DO NOT attempt to speed this up or skip steps - WAIT for the Research feature to fully complete - Poll the page every 30 seconds to check completion status - Only extract results AFTER seeing the full research output ## Expected Timeline | Phase | Duration | |-------|----------| | Navigate to claude.ai | 5-10 seconds | | Toggle Research | 2-5 seconds | | Enter query | 5-10 seconds | | Research execution | 5-30 minutes | | Extract results | 10-30 seconds | | Save to file | 2-5 seconds | Total: 6 to 35 minutes (mostly waiting for Research) COMMAND_BLOCK: # Web Research Agent Instructions You are a background agent tasked with performing deep research using Claude.ai's Research feature via Chrome automation. ## Your Mission Execute deep research through the Claude.ai web interface and return comprehensive results. ## Step-by-Step Execution ### Step 1: Navigate to Claude.ai Open a new Chrome tab and navigate to https://claude.ai Wait for the page to fully load. Look for: - The chat interface - The model selector - The input field at the bottom If you see a login screen, STOP and notify the user. ### Step 2: Start a New Conversation Click "New chat" to ensure you have a fresh conversation. ### Step 3: Enable Research Toggle Location: Bottom left of the chat interface, look for "Research" button. Action: Click the Research toggle to enable it. The button should change state (often turns blue or shows as active). Verification: Confirm Research mode is enabled before proceeding. ### Step 4: Enter the Research Query Type the research query into the chat input field. ### Step 5: Submit and Monitor Press Enter or click Send to submit the query. CRITICAL WAITING PERIOD: - Research takes 5 to 30+ minutes - DO NOT interrupt or timeout early - Poll the page every 30 to 60 seconds to check status Completion indicators: - Research progress bar reaches 100% - "Research complete" message appears - Final formatted output with citations is visible - No more loading indicators ### Step 6: Extract Results Once complete, extract: 1. The full research response text 2. All citations and sources 3. Any structured data or summaries ### Step 7: Save Results Create the output file with this format: Filename: YYYYMMDD-HHMMSS-[query-slug].md Content: # Research: [Query Title] **Generated**: [ISO Timestamp] **Duration**: [Approximate duration] **Source**: Claude.ai Research Feature **Query**: [Original query] --- [FULL RESEARCH CONTENT HERE] --- ## Sources Referenced [List all citations from the research] Save location: ./docs/research/ ### Step 8: Report Back Return to the main Claude Code session with: - Confirmation of completion - File path where results are saved - Brief 2-3 sentence summary of key findings ## Important Reminders 1. PATIENCE IS REQUIRED: Research is slow by design. Do not rush. 2. BACKGROUND ONLY: This task must run as a background agent. 3. COMPLETE EXTRACTION: Wait for ALL content before extracting. 4. PRESERVE CITATIONS: Sources are critical; never omit them. COMMAND_BLOCK: # Web Research Agent Instructions You are a background agent tasked with performing deep research using Claude.ai's Research feature via Chrome automation. ## Your Mission Execute deep research through the Claude.ai web interface and return comprehensive results. ## Step-by-Step Execution ### Step 1: Navigate to Claude.ai Open a new Chrome tab and navigate to https://claude.ai Wait for the page to fully load. Look for: - The chat interface - The model selector - The input field at the bottom If you see a login screen, STOP and notify the user. ### Step 2: Start a New Conversation Click "New chat" to ensure you have a fresh conversation. ### Step 3: Enable Research Toggle Location: Bottom left of the chat interface, look for "Research" button. Action: Click the Research toggle to enable it. The button should change state (often turns blue or shows as active). Verification: Confirm Research mode is enabled before proceeding. ### Step 4: Enter the Research Query Type the research query into the chat input field. ### Step 5: Submit and Monitor Press Enter or click Send to submit the query. CRITICAL WAITING PERIOD: - Research takes 5 to 30+ minutes - DO NOT interrupt or timeout early - Poll the page every 30 to 60 seconds to check status Completion indicators: - Research progress bar reaches 100% - "Research complete" message appears - Final formatted output with citations is visible - No more loading indicators ### Step 6: Extract Results Once complete, extract: 1. The full research response text 2. All citations and sources 3. Any structured data or summaries ### Step 7: Save Results Create the output file with this format: Filename: YYYYMMDD-HHMMSS-[query-slug].md Content: # Research: [Query Title] **Generated**: [ISO Timestamp] **Duration**: [Approximate duration] **Source**: Claude.ai Research Feature **Query**: [Original query] --- [FULL RESEARCH CONTENT HERE] --- ## Sources Referenced [List all citations from the research] Save location: ./docs/research/ ### Step 8: Report Back Return to the main Claude Code session with: - Confirmation of completion - File path where results are saved - Brief 2-3 sentence summary of key findings ## Important Reminders 1. PATIENCE IS REQUIRED: Research is slow by design. Do not rush. 2. BACKGROUND ONLY: This task must run as a background agent. 3. COMPLETE EXTRACTION: Wait for ALL content before extracting. 4. PRESERVE CITATIONS: Sources are critical; never omit them. COMMAND_BLOCK: # /research-via-web Execute deep research using Claude.ai's Research feature via Chrome automation. ## Usage /research-via-web "Your research query here" ## Behavior This command MUST be run as a background agent. When invoked: 1. Spawns a dedicated background agent 2. Uses Claude in Chrome to navigate to claude.ai 3. Enables the Research toggle 4. Submits the query 5. Waits for full completion (5 to 30 minutes) 6. Extracts and saves results to ./docs/research/ ## CRITICAL: Background Execution Required Research takes significant time. This command runs autonomously while you continue other work. Press Ctrl+Shift+B after invoking to send to background if needed. ## Examples /research-via-web "Compare Inertia.js vs Livewire for Laravel SPAs in 2026" /research-via-web "Best practices for SQL Server query optimization" /research-via-web "SharePoint Framework SPFx performance patterns" ## Output Location Results saved to: ./docs/research/YYYYMMDD-HHMMSS-query-slug.md COMMAND_BLOCK: # /research-via-web Execute deep research using Claude.ai's Research feature via Chrome automation. ## Usage /research-via-web "Your research query here" ## Behavior This command MUST be run as a background agent. When invoked: 1. Spawns a dedicated background agent 2. Uses Claude in Chrome to navigate to claude.ai 3. Enables the Research toggle 4. Submits the query 5. Waits for full completion (5 to 30 minutes) 6. Extracts and saves results to ./docs/research/ ## CRITICAL: Background Execution Required Research takes significant time. This command runs autonomously while you continue other work. Press Ctrl+Shift+B after invoking to send to background if needed. ## Examples /research-via-web "Compare Inertia.js vs Livewire for Laravel SPAs in 2026" /research-via-web "Best practices for SQL Server query optimization" /research-via-web "SharePoint Framework SPFx performance patterns" ## Output Location Results saved to: ./docs/research/YYYYMMDD-HHMMSS-query-slug.md COMMAND_BLOCK: ## Deep Research via Claude.ai When deep research is needed (not just web search), spawn a background agent: Spawn a background agent for web research: "YOUR QUERY" Or use the slash command: /research-via-web "YOUR QUERY" This opens Claude.ai via Chrome, toggles Research, runs the query, and saves results to ./docs/research/ CRITICAL: This MUST run as background agent. Takes 5 to 30 minutes. Do not skip or inline into other workflows. ### When to Use Research vs Web Search | Use Research | Use Web Search | |--------------|----------------| | Complex analysis | Quick fact lookup | | Multi-source synthesis | Single answer needed | | Comprehensive reports | During active coding | | When citations matter | Speed is priority | COMMAND_BLOCK: ## Deep Research via Claude.ai When deep research is needed (not just web search), spawn a background agent: Spawn a background agent for web research: "YOUR QUERY" Or use the slash command: /research-via-web "YOUR QUERY" This opens Claude.ai via Chrome, toggles Research, runs the query, and saves results to ./docs/research/ CRITICAL: This MUST run as background agent. Takes 5 to 30 minutes. Do not skip or inline into other workflows. ### When to Use Research vs Web Search | Use Research | Use Web Search | |--------------|----------------| | Complex analysis | Quick fact lookup | | Multi-source synthesis | Single answer needed | | Comprehensive reports | During active coding | | When citations matter | Speed is priority | CODE_BLOCK: claude --chrome CODE_BLOCK: claude --chrome CODE_BLOCK: Spawn a background agent to research via Claude.ai: "What are the latest Laravel 12 features and breaking changes from Laravel 11?" CODE_BLOCK: Spawn a background agent to research via Claude.ai: "What are the latest Laravel 12 features and breaking changes from Laravel 11?" CODE_BLOCK: /research-via-web "What are the latest Laravel 12 features and breaking changes from Laravel 11?" CODE_BLOCK: /research-via-web "What are the latest Laravel 12 features and breaking changes from Laravel 11?" CODE_BLOCK: Show status of background agents CODE_BLOCK: Show status of background agents CODE_BLOCK: ./docs/research/YYYYMMDD-HHMMSS-query-slug.md CODE_BLOCK: ./docs/research/YYYYMMDD-HHMMSS-query-slug.md CODE_BLOCK: @docs/research/20260126-143022-laravel-12-features.md Summarize the key breaking changes I need to handle for migration CODE_BLOCK: @docs/research/20260126-143022-laravel-12-features.md Summarize the key breaking changes I need to handle for migration COMMAND_BLOCK: # Start Claude Code with Chrome claude --chrome # Spawn research on Laravel 12 changes > Spawn a background agent to research via Claude.ai: "Complete Laravel 12 migration guide from Laravel 11, including all breaking changes, deprecated features, and new requirements" # Agent starts in background, you continue working > Review my routes/web.php for any deprecated patterns # Check research progress > /bashes # 20 minutes later, research completes # Results saved to ./docs/research/20260126-laravel-12-migration.md # Use the research in your work > @docs/research/20260126-laravel-12-migration.md > Based on this research, create a migration checklist for my project COMMAND_BLOCK: # Start Claude Code with Chrome claude --chrome # Spawn research on Laravel 12 changes > Spawn a background agent to research via Claude.ai: "Complete Laravel 12 migration guide from Laravel 11, including all breaking changes, deprecated features, and new requirements" # Agent starts in background, you continue working > Review my routes/web.php for any deprecated patterns # Check research progress > /bashes # 20 minutes later, research completes # Results saved to ./docs/research/20260126-laravel-12-migration.md # Use the research in your work > @docs/research/20260126-laravel-12-migration.md > Based on this research, create a migration checklist for my project - Runs a single search query - Reads the top 10 results - Summarizes what it finds - Returns an answer in 10 to 30 seconds - Breaks your question into multiple search strategies - Runs dozens of searches across different angles - Reads full articles, not just snippets - Follows links to related content - Cross-references sources for accuracy - Identifies patterns and contradictions - Synthesizes everything into a comprehensive report - Includes proper citations - Complete feature changelog with code examples - Breaking changes from Laravel 11 - Step by step migration guide - Performance benchmarks comparing v11 vs v12 - Community reception and early adopter feedback - Package compatibility status - Links to 20+ authoritative sources - Visit Claude Chrome Extension - Click "Add to Chrome" - Sign in with your Claude account when prompted - Pin the extension to your toolbar (click puzzle icon, then pin) - Quit Chrome completely (Cmd+Q on Mac, not just closing the window) - Restart Chrome - Open the Claude extension by clicking its icon in the toolbar - Test the connection with claude --chrome - Check if Chrome is running - Check if extension is installed and signed in - Run the native messaging fix (see Critical Fix section above) - Restart Chrome completely (Cmd+Q) - Try claude --chrome again - Ensure you have a paid Claude plan (Pro, Team, Max, or Enterprise) - The Research toggle is at the bottom left of the Claude.ai chat interface - Try manually verifying it exists by visiting claude.ai - Research can legitimately take 30+ minutes for complex queries - Don't interrupt the process - If it fails, try a more specific query - Make sure you're running as a background agent - The skill files must be installed correctly - Check that CLAUDE.md includes the instruction to NOT skip Research