Skip to content

extension_storage ​

Read or write chrome.storage in a running extension.

Quick start ​

Read chrome.storage.local and set settings.theme to dark

Asked to set a storage key, the agent writes it through the control channel and reads it back.

Asked to set a storage key, the agent writes it through the control channel and reads it back.

How the agent uses it ​

Every call runs in the extension's background (the engine honours no context), so it proves nothing about what a content script or page can read. A set is read back and the answer says whether the stored value matches. Rides the dev session's control channel, on unless extension_dev was called with allowControl:false. Set one key per call: there is no bulk-object set.

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
Destructiveyes
Idempotentno
Reaches the open webno

Inputs ​

InputTypeRequiredDefaultWhat it does
projectPathstringyesExtension project root (needs a live dev session)
action"get" | "set"yesget reads a key (or the whole area); set writes a key
area"local" | "sync" | "session" | "managed"no"local"
keystringnoKey to get or set
valueanynoValue to set (any JSON value); required for action=set
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 ​