Host tools — the in-app browser tools: the browser bridge, new-host approvals, cookie masking, screenshots and snapshots. A repository rule for apps/daemon/src/v1/browser/**, apps/daemon/src/v1/mcp/tools/browser-*/**, apps/daemon/src/v1/agents/**/browser.broker*, apps/daemon/src/v1/agents/**/host-browser*, apps/daemon/src/v1/agents/**/event-to-item*; read it before editing a file there.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Rule Daemon Host Tools Browser?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/geniro-io-rule-daemon-host-tools-browser)
---
name: rule-daemon-host-tools-browser
description: "Host tools — the in-app browser tools: the browser bridge, new-host approvals, cookie masking, screenshots and snapshots. A repository rule for apps/daemon/src/v1/browser/**, apps/daemon/src/v1/mcp/tools/browser-*/**, apps/daemon/src/v1/agents/**/browser.broker*, apps/daemon/src/v1/agents/**/host-browser*, apps/daemon/src/v1/agents/**/event-to-item*; read it before editing a file there."
---
<!-- GENERATED by scripts/sync-agent-rules.mjs from .claude/rules/daemon-host-tools-browser.md. DO NOT EDIT: edit the source, then run `pnpm sync:agent-rules`. -->
# Host tools — the in-app browser
- `browser_*` (the in-app browser, `.claude/rules/network-constraints.md`, item 8; `BrowserBroker` over `v1/browser`): seventeen tools that drive the chat's tabs in Electron main; an agent names and colours each tab it opens (`browser_open` `name` / `color`, `browser_label_tab`), and a name or colour the user set on a tab is never overwritten by an agent (main's `BrowserService.labelTab`). `v1/browser` is a leaf module — `BrowserBridgeService` (every desktop socket that sent the gateway's `browser_host` is remembered, most recent first, and forgotten on its disconnect; a paired device's is refused; `browser_request` goes to the most recent one still connected, by socket id only, never a room, so a second desktop client leaving hands the browser back to the window; a request fails at once when no desktop socket is connected (`BROWSER_NO_WINDOW_REASON`, which never claims the window is closed), after `BROWSER_REQUEST_TIMEOUT_MS` (20 s, well inside cursor's fixed 60 s tool deadline), on abort, on the disconnect of the socket it went to and on the run's teardown) and `BrowserHostApprovals` (in memory per run). The CLI permission for every `browser_*` call is auto-approved in every mode (`isHostBrowserCall`, the chat's `autoApproves` and the team executor's in-turn arm): the question is the tool's own new-host card. Outside `auto`, `browser_open` / `browser_navigate` to a host the chat has not approved raise a DEFERRED `approval_request` (`toolName: 'browser_host'`, input `{host, url, memberName}`) and answer at once; the verdict (Approve, Allow for this session as `optionId: 'session'`, Deny) records the host, runs the operation and wakes the agent through `HostWakeBus`. A navigation an operation causes may only reach the hosts the request carries (`allowedHosts`, null in `auto` or after Allow for this session). `browser_navigate` answers success only once the page committed (main's `navigateTab`), fails with the beforeunload sentence when the page's guard kept it, and leaves a guarded page only with `force: true`, which the reader adds to the operation only when true. The sink stays registered past the turn (`keepHostTools`). Team members get the same sink and share their run's tabs and jar. Cookie values an agent sets are masked in the persisted `tool_call` row by `event-to-item` and registered with the redactor first — whatever sits under a `cookies` key, in any shape, so a call the tool refuses is masked too — and a value of 8 characters or more is masked again where a page prints it back into a browser tool's result (or a result whose CLI names no tool, claude); `browser_get_cookies` never returns a value. `browser_screenshot` saves the png at full resolution as a run attachment and names its path in the text (the transcript's card draws it from that path); it adds an MCP image part (`McpToolResult.images`) only on `view: true`, and that copy is main's second capture at CSS-pixel scale (`clip.scale = 1/devicePixelRatio`, `viewPng`), since a picture in the result is what costs the agent's context. `width` / `height` take the shot under `Emulation.setDeviceMetricsOverride` and clear it after, the capture failing or not. `browser_snapshot` answers the element tree alone by default; `interactive: true` keeps only the actionable roles, `text: true` adds the page's visible text in its untrusted fence, and the tool's `PAGE_CONTENT_PREFACE` is the one warning. The gateway takes socket messages up to `BROWSER_REPLY_MAX_BYTES` (16 MiB) for a screenshot reply, and main refuses one whose pictures together pass `BROWSER_SCREENSHOT_MAX_BASE64`.
- A failed `browser_reply` may carry `failure` (`HostToolFailureSchema`; TWIN `BrowserReply` in `apps/ui/src/main/browser/browser-agent-wire.ts`): main marks its own operation time limit `timeout` (`AgentTimeoutError`) and an error that is not an `AgentError` `internal`; the bridge marks its own request deadline `timeout`. The mark rides `BrowserOutcome` to the tool's `McpToolResult.failure`, which raises the daemon's own flag (`.claude/rules/mcp-tools.md`); a refusal main words itself (a stale ref, a host awaiting approval) carries none.