# feat\(server\): let users withhold browser access from agents · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/commit/5e93541498f3e8c172bba6ad54b2ac742d625705)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

Requested revision: 5e93541498f3e8c172bba6ad54b2ac742d625705

Requested commit: 5e93541498f3e8c172bba6ad54b2ac742d625705

Commit: 5e93541498f3e8c172bba6ad54b2ac742d625705

Tree: c545afa53b70edf70b18d5e9852bbe1ca2113a6d

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
feat(server): let users withhold browser access from agents

Agents could always drive the preview browser, with no way to say no. Adds
Settings → Integrations → Browser → Agent browser access, on by default.

Turning it off withholds the MCP credential in `prepareMcpSession`. That is
the only place a credential is minted and the `/mcp` endpoint accepts nothing
else, so one branch covers all five providers and any external MCP client —
every adapter already treats a missing session as "no MCP server".

The Codex developer instructions describing `preview_*` drop out with the
tools. That is derived from the session's actual MCP configuration via the
existing `hasConfiguredMcpServer`, not from a second read of the setting, so
the prompt cannot describe tools the turn doesn't have. Leaving the text in
would be worse than saying nothing: it steers the model away from Playwright
and agent-browser, so it would talk the agent out of its only remaining
browser automation.

An unreadable settings file denies rather than propagating the error, which
would mean adding ServerSettingsError to a union every caller handles. Denying
is the safe direction: an explicit "off" silently becoming "on" would violate
the user's choice, while the reverse costs one toolset and is visible at once.

The toggle applies to sessions started from then on; a running agent keeps the
tools it was given, which the UI states rather than implying otherwise.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

```

## Parents

- [949feb61e4bfd96669ba0e8cf3dca7c6d7f885b3](https://git.cafe/pingdotgg/t3code/commit/949feb61e4bfd96669ba0e8cf3dca7c6d7f885b3?format=markdown)

[Source at this commit](https://git.cafe/pingdotgg/t3code/tree/5e93541498f3e8c172bba6ad54b2ac742d625705?format=markdown)
