Skip to content

extension_reload ​

Reload a running extension's background context, or a tab.

Quick start ​

Reload the extension and confirm the worker came back

Asked to reload, the agent reloads the background and confirms the worker came back.

Asked to reload, the agent reloads the background and confirms the worker came back.

How the agent uses it ​

Rides the dev session's control channel, on unless extension_dev was called with allowControl:false. A background reload answers once the engine's ready.json shows the new background attached to the dev server again (value.reattached, value.reattachedMs), so the next read or assertion meets the new generation and not the gap between them; if it has not come back within the budget (timeout, at most 5 seconds) the answer is status reloading with the contract's own stamps.

Page text in the answer ​

Part of this tool's answer is text a web page or the extension wrote. The server fences it between <untrusted-data-ID> and </untrusted-data-ID> with a fresh random ID per call, named in untrusted.boundary. A fence is a signal to the model, not a gate: pair it with --no-ship when the agent reads pages you do not trust. See Server flags and telemetry.

Reference ​

Grouplocal, on by default
TierAct
Needsa dev session, which carries control unless started with allowControl: false
Read onlyno
Destructiveno
Idempotentyes
Reaches the open webno

Inputs ​

InputTypeRequiredDefaultWhat it does
projectPathstringyesExtension project root (needs a live dev session)
context"background" | "content" | "page"no"background"
tabnumbernoFor content/page: a specific tab id
browserstringnoSession browser; defaults to this project's live session
timeoutnumbernoCommand timeout in ms. When omitted, the default depends on the route: 30000 through the dev session's control channel, 10000 over the Firefox debugger protocol, and 15000 per command over the Chromium debug port.

When it fails ​

  • The call is refused because no session is live. Start one with extension_dev or extension_start and call again.
  • The control channel is off. The session was started with allowControl: false. Start it again without that flag.

Next ​