- Rust 48.8%
- TypeScript 48.4%
- JavaScript 2.2%
- Shell 0.4%
- PowerShell 0.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
An agent on the self-hosted runner read secrets_register's 'ask the user to run bw unlock --raw'
and macro_run's 'once a key has been registered', concluded a vault login macro was impossible,
and gave up, although bw: references already resolve through the exchange (
|
||
| .claude-plugin | ||
| .gitea/workflows | ||
| crates | ||
| docs/superpowers | ||
| packaging | ||
| plugin | ||
| router | ||
| scripts | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENSE | ||
| README.md | ||
| rust-toolchain.toml | ||
playwright-mcp-plus
Centralized browser lifecycle for Playwright MCP on a multi-session host.
Four Playwright MCP servers configured at user scope meant every Claude Code session spawned all four at startup, whether or not a browser was ever used. Measured on a multi-user dev host on 2026-09-07 with 14 live sessions: ~6.3 GB resident across 146 playwright-mcp processes, 42 Xvfb processes and 10 Chrome processes — while exactly one browser was driving a page.
This repository replaces that with one daemon per host.
browserd(Rust) owns every browser resource: named instances, Xvfb displays, Chrome processes, screen recording, storage state and reaping.browserctlis a thin client used to drive and prove the daemon without an MCP layer.- The forked
@playwright/mcprouter is Plan 2 and does not exist yet.
Design: docs/superpowers/specs/2026-09-08-playwright-mcp-plus-design.md
Plan: docs/superpowers/plans/2026-09-08-browserd-daemon.md
Install as a Claude Code plugin
/plugin marketplace add https://git.siwatsystem.com/siwatsystem-public/playwright-mcp-plus.git
/plugin install playwright-plus@siwat-plugins
On first start the plugin downloads the release matching its version (browserd for your OS plus
the bundled router, about 12 MB), checks both against the release's SHA256SUMS, unpacks them
under the plugin data directory and starts browserd if nothing is listening. Needs Node 22+ and a
Chromium-family browser; no Rust, npm install or unit files. The checksum catches corruption, not a
compromised release host: both files come from the same place. Claude Code reads MCP servers at
startup, so restart the session after installing.
Supported: Linux x64/arm64, macOS x64/arm64, Windows x64. A browserd already running (systemd, launchd) is reused rather than replaced.
Releasing
- Set the same new version in
crates/browserd/Cargo.toml,crates/browserctl/Cargo.tomlandplugin/.claude-plugin/plugin.json. - Commit, then
git tag vX.Y.Z && git push origin main vX.Y.Z. .gitea/workflows/release.ymlchecks the versions agree, runs every test, cross-builds the five targets with cargo-zigbuild on the Linux runner, bundles the router, and publishes a Gitea release with the archives andSHA256SUMS. Needs a repo secretRELEASE_TOKEN(Gitea token withwrite:repository).
scripts/package-release.sh runs the same build locally (OUT=/some/dir; needs pip install ziglang and cargo install cargo-zigbuild). Test a plugin build without publishing by pointing
BROWSERD_RELEASE_DIR at its output.
Install from source
cargo install --path crates/browserd --locked
cargo install --path crates/browserctl --locked
mkdir -p ~/.config/systemd/user
cp packaging/browserd.service ~/.config/systemd/user/
systemctl --user daemon-reload
systemctl --user enable --now browserd.service
macOS
cargo install --path crates/browserd --locked
cargo install --path crates/browserctl --locked
sed "s|__HOME__|$HOME|" packaging/macos/com.siwatsystem.browserd.plist \
> ~/Library/LaunchAgents/com.siwatsystem.browserd.plist
launchctl load ~/Library/LaunchAgents/com.siwatsystem.browserd.plist
Windows
cargo install --path crates\browserd --locked
cargo install --path crates\browserctl --locked
powershell -ExecutionPolicy Bypass -File packaging\windows\install.ps1
Platforms
All OS differences live behind the Platform trait (crates/browserd/src/platform.rs, mirrored
for the router in router/src/platform.ts). The daemon logic never asks which OS it is on.
| Linux | macOS | Windows | |
|---|---|---|---|
| Control endpoint | $XDG_RUNTIME_DIR/browserd.sock |
$TMPDIR/browserd.sock |
\\.\pipe\browserd-<USERNAME> |
| Child supervision | systemd user units (survive a daemon crash); direct children if no systemd | direct children | direct children (taskkill /T) |
| State directory | ~/.local/state/browserd |
~/Library/Application Support/browserd |
%LOCALAPPDATA%\browserd |
headless, host screens |
yes | yes | yes |
virtual screen, recording |
yes (Xvfb, ffmpeg) | no, refused up front | no, refused up front |
| Remote VNC handoff | yes (x11vnc) | not enabled by default | no |
| Local handoff notification | notify-send |
osascript |
PowerShell balloon |
Overrides: BROWSERD_SOCKET (control endpoint), CHROME_PATH (browser), XDG_STATE_HOME
(state). Without systemd, children die with the daemon: browserd stops them on SIGTERM/Ctrl-C,
but a hard kill of the daemon leaves its Chrome running, which systemd units never do.
macOS and Windows are checked by cargo check --target and unit tests of the platform rules; the
daemon has been run end to end on Linux only.
Usage
BROWSERD_TOKEN is the session token. It scopes instance names: desktop
under one token is a different browser from desktop under another. Names
beginning shared/ are the opt-in cross-session namespace.
export BROWSERD_TOKEN=my-session
browserctl create --name headless-probe
browserctl create --name headed-probe --screen virtual --viewport 1280x720
browserctl create --name on-my-monitor --screen host --viewport 1280x720
browserctl list
browserctl record-start --id i1 --fps 10
browserctl record-stop --id i1
browserctl destroy --id i1
Handing a step to the user
browser_handoff is for the one step a script must not do for a person: a CAPTCHA, an approval
prompt, a consent wall. It opens the stuck browser's current page in a visible host-screen browser
with the same cookies, sends a desktop notification (notify-send), waits until the page condition
until is true, copies the cookies back and reloads the original tab.
| Argument | Meaning |
|---|---|
browser |
the stuck browser (optional when only one is open) |
url |
page to show; defaults to the stuck tab's URL |
reason |
what the user is asked to do, shown in the notification |
until |
JS expression run in the visible page every 2 s; default: title and URL no longer look like a challenge page |
timeout |
seconds before returning timeout (default 90; keep under the client's tool timeout) |
user_agent |
applied to both browsers, for clearances bound to it |
keep |
leave the window open after success |
Only cookies are carried, not localStorage. A timeout leaves the window open, so repeating the call
resumes instead of starting over. It never solves or bypasses a challenge. Claude Code discovers
tools once at startup, so a running session needs a restart to see it.
Screens
--screen decides where a browser's windows go. --headed is the older
spelling of --screen virtual and still works.
| Mode | Window | Recording |
|---|---|---|
headless (default) |
none | no |
virtual |
a private Xvfb owned by the instance | yes |
host |
the logged-in desktop session, on the real monitor | no |
Host mode sets no DISPLAY of its own: the transient unit already inherits
DISPLAY, WAYLAND_DISPLAY and XAUTHORITY from the systemd user manager,
which is the logged-in session's own environment. It is refused up front when
no session is reachable, because a Chrome with nowhere to draw fails as a 30s
DevToolsActivePort timeout rather than as an error anyone can read.
Two things follow from sharing one desktop with the user: several host
instances overlap on the same screen and the user's own input reaches them,
and record-start is refused — browserd grabs only framebuffers it owns, and
grabbing the real desktop would capture whatever else is on it. Use
--screen virtual to record.
Verified on 2026-09-18:
| Check | Result |
|---|---|
| Host instance | Chrome 151, no --headless, display: null, CDP reachable |
| Window | Browser.getWindowForTarget reports 1280x720, state normal |
| Recording a host instance | refused: "runs on the logged-in session" |
| Virtual instance alongside it | Xvfb :2000, recording still produces an mp4 |
Recordings land in $XDG_STATE_HOME/browserd/recordings/<id>/, mode 0700.
Storage state lives in $XDG_STATE_HOME/browserd/state/, mode 0600. Both can
contain credentials.
Measured on this host
browserd resident: 4472 KB
replaces (14 sessions): ~6.3 GB across 198 processes
Verified end to end on 2026-09-08:
| Check | Result |
|---|---|
| Socket permissions | srw------- |
| Headless instance | Chrome 151, CDP reachable on the reported port |
| Headed instance | Xvfb :2067, headed UA, reported port == ss port |
| Recording | h264 1280x720, 4.2 s, dir drwx------ |
| Idle TTL reaping | ttl=5 instance and its unit gone after one reaper tick |
| Surviving instance | default-TTL instance kept at refcount 0 |
Socket activation
browserd.socket owns the listening socket; the daemon is started on the first
connection and exits again once it holds no connections and no instances for
BROWSERD_IDLE_EXIT consecutive 10s ticks (default 3). Verified on
2026-09-08:
| Check | Result |
|---|---|
| Before any connect | socket active, service inactive, 0 browserd processes |
| First connect | activates; log reads adopted socket-activated listener fd=3 |
| Idle 42 s | exits; 0 processes; socket still listening |
| Next connect | reactivates |
| Idle 42 s holding an instance | stays active — instances block exit |
Install the socket, not the service:
cp packaging/browserd.service packaging/browserd.socket ~/.config/systemd/user/
systemctl --user daemon-reload
systemctl --user enable --now browserd.socket
Setting BROWSERD_IDLE_EXIT=0 disables idle exit. Run it that way if you ever
start the service directly, because without the socket unit listening, an exit
makes browserd unreachable.
Router
The MCP server Claude Code talks to. It owns no browser state: browserd owns
lifecycle, and the router holds one upstream @playwright/mcp connection per
named browser, re-publishing upstream's 24 tools with an added browser
parameter.
It is not a fork. @playwright/mcp 0.0.80 is a 1.2 KB shim over
playwright-core's generated bundle, with no tool schemas in it to patch, but
its exported createConnection returns a usable MCP server. Schemas are read
at runtime via listTools, so upstream tool changes flow through without a
code change here.
claude mcp add playwright-plus -- node /path/to/playwright-mcp-plus/router/src/index.ts
All 34 tools exist from startup: 10 lifecycle (browser_open,
browser_release, browser_instances, browser_record_start,
browser_record_stop, macro_list, macro_register, macro_register_dir, macro_run,
secrets_register) plus upstream's 24. browser_open takes the same screen values as browserctl.
Every tool must be published in the first tools/list. Claude Code
discovers tools once, at startup; a tool that is not in that first response
never becomes callable, and notifications/tools/list_changed does not rescue
it. Upstream's schemas therefore come from a snapshot committed at
router/src/upstream-tools.json rather than from a live connection —
regenerate with npm run gen:upstream-tools after bumping @playwright/mcp,
which a test enforces by comparing the snapshot against the installed version.
Calling a browser tool with nothing open launches one named default, matching
the servers this replaced. Pass browser to target a specific one.
Session identity
browserd scopes every instance name to the router's session token, which is
random per process by default — two sessions cannot reach each other's
browsers. Setting BROWSERD_TOKEN pins it instead, so saved storage state, and
therefore a login, survives a reap and a new session. Anything sharing that
value shares its browsers, so it is opt-in.
Verified on the host, 2026-09-08
| Check | Result |
|---|---|
| Tool list | 8 lifecycle tools; 32 after opening a browser |
| Two named browsers | each browser_navigate reached its own Chrome |
| Ambiguity | Several browsers are open (desktop, phone); pass "browser" to say which. |
| Recording | h264 1280x720, 28.2 s, decodes clean under ffmpeg -f null |
| Macro | returned Example Domain from the live page |
| Storage state, same session | reopen reported restored_storage_state: true |
| Storage state, separate process | with BROWSERD_TOKEN pinned, also true |
Measured memory
router, idle 91 MB per session
browserd, idle 5 MB once per host
legacy playwright-mcp 1991 MB across 133 processes
legacy Xvfb 965 MB across 48 processes
The router is not free: Node plus the MCP SDK is a ~67 MB floor. The win comes from replacing four servers per session with one, dropping Xvfb entirely for headless work, and sharing and reaping browsers instead of leaving one Chrome per session alive.
Importing @playwright/mcp costs ~74 MB on its own (measured: 67 MB to 141 MB
RSS), so it is imported lazily on the first browser_open. A session that never
opens a browser — most of them — never pays it. Doing that import eagerly took
the idle router from 91 MB to 160 MB, which is the exact waste this project
exists to remove.
Macros
A macro is a named, parameterised script run against one browser, so a
multi-step flow costs one tool call instead of a dozen. Bodies run with page
and args in scope and nothing else — process, require, globalThis,
fetch, module and eval are shadowed — under a wall-clock timeout.
On-disk macros live in $XDG_STATE_HOME/browserd/macros/<name>.json and are not
writable over the protocol. macro_register adds one for the current session
only; it is discarded when the session ends and cannot shadow a disk macro.
Macros from a directory. macro_register_dir { path, recursive? } registers
every macro in a directory for the session, so a project can keep its macros in
version control instead of pasting bodies into tool calls. Two file formats:
<name>.json—{ "params": [...], "body": "..." }, as for on-disk macros.<name>.js/<name>.mjs— the file is the body. Leading comment lines declare parameters:// @param <name> [secret] [required] [description](several at once:// @param a, b, c description). The description may contain any punctuation and is shown to the agent in the tool schema. Every argument the body reads must be declared: calls that pass an undeclared argument are refused before the page is touched, and loading a macro whose body reads an undeclared one prints a warning (macro_register_dirreturns it inwarnings).
// nlm_login.js
// @param email required
// @param password secret required
await page.getByRole('textbox', { name: /email/i }).fill(args.email);
Calling it again for the same directory reloads it: edited files take effect and
macros whose files were deleted are unregistered. It follows the same rules as
macro_register — session only, cannot replace an on-disk macro (reported under
skipped) — and file names must be plain identifiers. At most 200 files of
256 KB each are read. For macros the operator owns, set
PLAYWRIGHT_MCP_PLUS_MACRO_DIRS (colon-separated); those load at startup as
on-disk macros, .js files included.
Macros as tools, and a cheap macro_list. Every macro is also published as a
tool of its own, with an input schema built from its parameters, so a call is
nlm_ask { notebook, question } instead of macro_run { macro: "nlm_ask", args: { … } }.
A macro whose name would shadow a built-in is published as macro_<name>. The
tool description is the macro's first header comment (or "description" in a
.json macro). Direct calls take the same browser argument and obey the same
secret rules as macro_run.
Claude Code reads the tool list once at startup, so only macros that exist then
become callable tools: put the directories you want in
PLAYWRIGHT_MCP_PLUS_MACRO_DIRS. Macros registered later still work through
macro_run, and the router sends tools/list_changed for clients that do refresh.
A macro may raise its own wall-clock limit with a header line // @timeout <seconds> ("timeout_s" in a .json
macro), up to 30 minutes; the default stays 30 s. Use it for flows that wait on a slow page.
macro_list prints one line per macro — name(req*, secret!, optional) [source] - description —
instead of JSON, and takes filter (substring), verbose (the old JSON) and load
(register a directory for the session, then list; same as macro_register_dir).
Secrets are passed by reference, never by value. A parameter marked
secret takes the name of an entry in $XDG_STATE_HOME/browserd/secrets.env,
or a Bitwarden reference (below); passing a literal is refused, and the refusal
does not echo what was passed. Every result that leaves the router is
redacted — a macro's return value, its errors, and upstream tool results, which
is what stops browser_evaluate reading input.value back out of the page.
{
"params": [
{ "name": "user", "required": true },
{ "name": "password", "secret": true, "required": true }
],
"body": "await page.fill('#u', args.user); await page.fill('#p', args.password); await page.click('#go'); return 'ok';"
}
Bitwarden
A reference shaped bw:<item>/<field> is fetched from Bitwarden through the
bw CLI at bind time. password, username, totp, uri and notes map to
their own bw get subcommand; any other field name is looked up among the
item's custom fields. The item may contain slashes — the field is the last
segment, so bw:work/ad/prod/password reads password from work/ad/prod.
The vault is unlocked per session, at runtime, with secrets_register:
secrets_register { session_key: "<output of `bw unlock --raw`>" }
macro_run { macro: "login", args: { user: "qa-bot", password: "bw:github.com/password" } }
The key is verified against the vault before it is accepted, so a stale one
fails at registration rather than inside the first macro that needs a
credential. It is held in memory by that one router process and never written to
disk, so each session registers its own and nothing outlives the session.
BW_SESSION in the environment is deliberately ignored — a session's reach
should not depend on how the router was launched.
A session key unlocks the whole vault, and secrets_register puts it in the
transcript. That is the accepted trade for per-session registration. What the
router does about it:
- The key joins the redaction set on arrival, so no later result or error echoes it, and it is scrubbed from its own rejection message.
- The confirmation names the account and server, never the key.
- Any tool call whose arguments contain a value this session has resolved is
refused. That blocks the obvious follow-on — a page telling the agent to
navigate to
evil.example/?k=<credential>. - The key reaches
bwthrough--sessionin argv, so it is also readable from/procby anything running as the same user on the host.
Whether a reference exists is answered by its shape, without contacting the
vault. Probing would make macro_run an existence oracle for entry names, and
would fail every bind before a key is registered.
Session-registered macros are an arbitrary-code-execution surface over MCP, accepted knowingly. The shadowing and the timeout bound an ordinary macro; they do not make a hostile one safe.
Remote handoff (web VNC)
browser_handoff_remote hands a screen=virtual browser to the person who started the session, for a
step an agent must not do: a login, CAPTCHA or 2FA code. For a browser on the user's own monitor see the
host-screen handoff instead; this one is for a headless server where nobody is at the seat.
action: "open"(default): browserd starts a handoff on the instance's Xvfb display and the router asks the host's web front end (the exchange, with the session's identity token) for a one-time link. The agent gets the link and relays it.- The person opens it in their own browser, sees the screen live and drives it with mouse, keyboard and a Paste button, then presses Done (or closes the page).
action: "wait"blocks until the handoff ends and reportshanded_back(login state is saved);action: "cancel"takes the browser back. While a handoff is open every other tool on that browser is refused, so the agent does not act on the page the person is typing into.
Where the pieces live: crates/browserd/src/handoff.rs (the VNC door), router/src/remote-handoff.ts (the
tool). The web front end, link/cookie handling, noVNC and the nginx vhost are deployment, not part of this repo.
The door is a unix socket in a per-handoff directory under BROWSERD_HANDOFF_DIR (unset = feature off),
readable by the daemon's user and one named group only. x11vnc -inetd runs per connection on that socket's
stdio, so no TCP port exists. The directory also holds a random password and marker files (done,
activity) the front end uses to end the handoff or keep it alive; browserd ends it on done, when its
instance disappears, or after 30 minutes with no activity. The agent receives only an opaque handoff id.
What this does not do: the agent still drives the same browser over CDP and the X display is not access-controlled, so an agent that wants the keystrokes can get them (a script in the page, or an X client). The router lock and the separate channel keep an honest agent from seeing them; they do not stop a hostile one. Per-session accounts and an Xauthority cookie are the next step.
cargo test -p browserd --test handoff -- --ignored runs the real Xvfb + x11vnc check that the VNC process
owns no listening TCP socket.
Monitor doors (watching without a handoff)
A person can watch their own browsers without anyone asking for a handoff. With BROWSERD_MONITOR_DIR set (unset =
off), every screen=virtual browser created by a host-verified owner (the CDP-door owner, see below) gets a
VIEW-ONLY door the moment it exists: <dir>/<owner>/<door id>/ with rfb.sock (each connection starts
x11vnc -viewonly -nosel -inetd on the instance's display), its own pw, and meta.json (name, session label, age,
page title and address, refreshed every 8 s from the browser's DevTools listing, query and fragment dropped).
crates/browserd/src/monitor.rs.
- Scope, enforced where the browser is created: headless and host-screen browsers never get a door; a client with no
verified owner gets none; the owner's directory is the only place that owner's doors exist (the front end lists a
directory, it does not filter a shared list). A
shared/browser gets its door only for the owner who created it. - View-only is the server process's flag, so a client that sends keys, pointer or clipboard is ignored by x11vnc itself.
"Take control" is not an upgrade of the door: the front end drops a
takefile, browserd opens an ordinary interactive handoff for the instance under the creating session's token and writes its id totaken(new directory, new password). - A takeover started from the monitor page does NOT pause the agent: the router is not told and none of its tools
is refused; person and agent may both act on the browser. Only the agent-initiated
browser_handoff_remotelocks the agent out while the person drives (a deliberate "please do this for me").browser_monitor_linkasks the exchange for the watch page link (/monitor/link, or/monitor/revoke). - The router announces a display-only session label in
hello(session); browserd drops anything that is not[A-Za-z0-9_-]{1,64}.
cargo test -p browserd --test monitor -- --ignored runs a real Xvfb + x11vnc with the monitor flags and shows an RFB
pointer event does not move the X pointer, while the same event without -viewonly does.
CDP over a unix socket (sessions in their own network namespace)
Chrome's debugging port is on the host's loopback, and a router in another network namespace cannot dial it. The port also must not be opened to any network: CDP has no authentication, so whoever reaches it owns the browser and every login in it. So browserd can serve, per browser and per owner, a unix socket that forwards to that port.
BROWSERD_CDP_DIR(daemon; unset = off) names a directory holding one subdirectory per owner. The host makes each one (root, group-readable by the sessions' account) with a random secret in.key, and binds only that subdirectory into that owner's sessions. Sockets are<instance id>.sockin it, mode 0660, removed with the instance.hellomay carryownerandowner_key; the daemon believes the owner only if the key matches.key. A client that names no owner gets the old reply with nocdp_socket.- Router:
BROWSERD_CDP_DIR(the directory as this process sees it) andBROWSERD_CDP_OWNER. When set and the reply carriescdp_socket, the router starts a listener on 127.0.0.1: in its own namespace that pipes to that socket and hands Playwright that port (macros, the upstream MCP server and storage-state capture all use it). Unset: the direct connection tocdp_url, as before.
File exchange (files the browser saves, for sessions that cannot see its disk)
The browser runs under another account on a disk a session cannot see, so a PDF it downloaded or saved, or a recording, used to be unreachable from the session that asked for it. With a file exchange every owner (the same host-verified owner as for CDP doors) has a directory the browser writes and only that owner's sessions can read.
BROWSERD_FILES_DIR(daemon; unset = off) names a root with one host-made directory per owner, andout/inside it: owned by the daemon's account, group-readable by the sessions' account (setgid 2750), bound into that owner's sessions only. The daemon never creates or follows a link there. It needs the owner check of the doors above to know whose is whose.- On
browser_createthe daemon writes the browser profile's default download folder to thatout/(so any download lands there under its real name, whichever tool or page caused it) and repliesfiles_dir(its own path, for the router only; never shown to a person). Ashared/browser has none. Recordings (browser_record_start) are written there too (recording-<name>-<time>.mp4, at most 30 minutes) and the reply names the file. - Bounds, enforced by a sweep every 10 s: files older than 24 h go (1 h once the owner has no connection left), then the oldest until
an owner is under 4 GiB (whole root 20 GiB); links, directories and anything not a plain file are removed; files are made group-readable.
BROWSERD_FILES_MAX_AGE_SECS,_ENDED_AGE_SECS,_OWNER_MAX_BYTES,_TOTAL_MAX_BYTESoverride. Only names and sizes are logged. - Router:
BROWSERD_FILES_DIRis the directory as the session sees it (<dir>/out). A tool that causes a download (or a macro) reports the new file by its session path and afriendly_path(downloads/<name>, relative to the person's own directory);browser_fileslists them. Macros getbrowserFiles(chromeDir,name(),path(),size(),friendly()); with it a macro tells the browser to save inchromeDirand reportspath(). The router closes the Playwright connection a macro opened afterwards, because a fresh connection tells the browser to save downloads in its own temporary folder, which nothing can read. - Uploads need no directory:
browser_file_upload/browser_dropread the file in the router (the session's own view) and Playwright ships the bytes over the DevTools connection (a browser that is not on the same machine; up to 50 MB per file; upstream also limits paths to the session's working directory). The browser is never given a path.
Known limits
- A session that drives its own Chrome can make that Chrome read what the daemon's account can read. The door gives a session
full control of its browser (that is the point), and Chrome runs as the daemon's account for everyone: through it a hostile session
can navigate to
file://paths or name host paths in CDP calls, including other owners' exchange directories. The exchange keeps the router's own tools and results from crossing owners; closing this needs one Chrome account (or mount namespace) per owner. - The router is not free. Node plus the MCP SDK is a ~67 MB floor per session. See the measurements above for what that buys.
- A pinned
BROWSERD_TOKENis shared identity. Anything using the same value shares its browsers and its saved storage state. That is the point, but it is the one setting that trades isolation for persistence. - Redaction is text-only. Values are stripped from text results and refused in tool arguments once the router has seen them, but a screenshot is pixels: a "show password" toggle, a TOTP code or a post-login page is captured as-is. A vault value is also unknown to the redactor until the first lookup resolves it.
- The guard raises the cost of leaking a key; it does not unsay it. A
session key that went through
secrets_registeris in the transcript, and the agent can reason about it from there. Rotate withbw lockwhen a session ends if that matters. - A
secretparameter still hands the value to macro code. A session-registered macro receives the resolved credential inargsand can post it anywhere it can navigate. Keep credential-bearing macros on disk. - Recordings and storage state can contain credentials. Directories are 0700 and state files 0600, but the contents are whatever was on screen or in the session.