Skip to main content

tabs

  1. User starts task from extension page (chrome-extension://)
  2. Background detects it's a system page → agentTabId = undefined
  3. Agent starts with currentTabId = null
  4. First navigation creates new isolated tab (tabId returned in JSON result)
  5. Agent updates currentTabId to the new tab
  6. All subsequent tools (click, fill, select) receive the new tabId via injection
  7. Parallel subagents each get initialTabId: null → create their own tabs when needed

| File | Change
|
|------------------------------------------------|------------------------------------------ --------------------------------------------------|
| background.ts:856-884 | Detect system pages and set
agentTabId=undefined; open sidepanel FIRST to preserve gesture |
| lib/agent/ReactGraph.ts:798-808 | Inject currentTabId into ALL tools
needing tabId (navigate, click, fill, select, scroll) |
| lib/agent/ReactGraph.ts:816-821 | Update currentTabId when navigate creates new tab |
| lib/extension/tools/NavigationTools.js:259-295 | Handle tabId===null as "create isolated
tab" |
| lib/extension/tools/SubAgentTool.js:91 | Pass initialTabId: null to subagents for isolation |
| AiAgent.ts:92,253,405-406 | Track and pass initialTabId through agent creation chain