docs(prompts,skills): tell agents to own a browser session, not share one

A concurrent agent navigating the default session invalidates another
agent's page and refs, so a named session is required for correctness, not
just for separate cookies. Bound the cost with one session per agent, an
explicit close, and the idle timeout.
This commit is contained in:
Ahmed Allam
2026-08-09 23:33:04 +00:00
committed by Devin AI
parent 55e15f89fd
commit a55245ffcc
2 changed files with 21 additions and 15 deletions
+6 -5
View File
@@ -264,11 +264,12 @@ Remember: A single well-validated high-impact vulnerability is worth more than d
AGENT ISOLATION & SANDBOXING:
- All agents run in the same shared Docker container for efficiency
- Each agent has its own terminal sessions
- Browsers are NOT per-agent: `agent-browser` shares one browser across every agent
using the default session, so another agent may be driving it. Pass
`--session <name>` only when you genuinely need an isolated browser (separate
cookies/logins, e.g. testing two users at once) — each one costs a full Chromium
(~340 MB) on the shared box, and `close` it as soon as you're done with it
- Browsers are NOT per-agent by default: `agent-browser` with no `--session` is one
shared browser, so a concurrent agent's navigation invalidates your page and refs.
Pass `--session <your-agent-name>` for any browser work of your own — then it is
yours alone. Each session is a full Chromium (~340 MB) on this shared box, so keep
one, not several, and `agent-browser --session <name> close` when you're done with
the target; an idle browser is reclaimed automatically after 3 minutes
- All agents share the same /workspace directory and proxy history
- Agents can see each other's files and proxy traffic for better collaboration
+15 -10
View File
@@ -58,13 +58,17 @@ agent-browser screenshot
The browser stays running across commands so these feel like a single
session. Use `agent-browser close` (or `close --all`) when you're done.
The default session is **shared with every other agent in the sandbox**, and each
extra `--session <name>` is a whole extra Chromium (~340 MB) on a box you share —
so open one only when you need isolated cookies, and close it when you're done.
A browser left idle for 3 minutes is reclaimed automatically; the next command
relaunches it, but the page, tabs, refs and cookies are gone. If you're
authenticated and about to go do something else for a while, save the state
first (see [Persist session across runs](#persist-session-across-runs)).
The default session is **shared with every other agent in the sandbox** — if
another agent navigates it, your page and your refs are gone from under you. Use
`--session <your-agent-name>` for your own browser work so nobody else can move
it. Each session is a separate Chromium (~340 MB) on a shared box, so keep one
rather than several, and close it when you're finished with the target.
A browser left idle for 3 minutes is reclaimed automatically to free memory for
the other agents; the next command relaunches it, but the page, tabs, refs and
cookies are gone. If you're authenticated and about to go do something else for a
while, save the state first (see
[Persist session across runs](#persist-session-across-runs)).
## Reading a page
@@ -315,9 +319,10 @@ agent-browser --session b fill @e1 "bob@test.com"
`AGENT_BROWSER_SESSION=myapp` sets the default session for the current
shell.
Every session is a separate Chromium, so this is the most expensive thing you can
do to the shared sandbox — use it for genuine isolation (two users, two cookie
jars), not as a habit, and close each one when the flow is finished:
Use a session named after yourself for your own work — that's what keeps a
concurrent agent from navigating the page out from under you. Every session is a
separate Chromium though, so hold one at a time rather than a collection, and
close each one when its flow is finished:
```bash
agent-browser --session a close