Skip to content

[Feature] TabsController and tab tools should honor AbortSignal #538

Description

@gaomeng1900

Context

Follow-up from the robust-aborting work in #532.

The extension's tab tools (open_new_tab, switch_to_tab, close_tab) and TabsController are not integrated with the per-invocation ctx.signal cancellation model. In particular, TabsController.waitUntilTabLoaded() polls via waitUntil() (up to a few seconds, default 60s elsewhere) with raw setTimeout and cannot be interrupted when the task is stopped or disposed.

Goal

  • Pass the task AbortSignal into extension tab tool execution (packages/extension/src/agent/tabTools.ts).
  • Make TabsController.waitUntilTabLoaded() and the underlying waitUntil() accept { signal } so first-party tab operations do not outlive stop/dispose.
  • For remote content-script / background calls that cannot be truly cancelled, add a run-id or late-result guard so stale results cannot mutate the active run.

Notes

  • Relevant files: packages/extension/src/agent/tabTools.ts, packages/extension/src/agent/TabsController.ts, packages/extension/src/agent/MultiPageAgent.ts.
  • The cancellation contract is described in feat: robust aborting #532.

Planned in #532.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Fields

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions