tabs
- User starts task from extension page (chrome-extension://)
- Background detects it's a system page → agentTabId = undefined
- Agent starts with currentTabId = null
- First navigation creates new isolated tab (tabId returned in JSON result)
- Agent updates currentTabId to the new tab
- All subsequent tools (click, fill, select) receive the new tabId via injection
- 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