Compare commits

..
Author SHA1 Message Date
Ahmed Allam b0f5c102f9 chore(container): drop the idle-timeout comment 2026-08-09 23:38:36 +00:00
Ahmed Allam 5d6b5fdbd1 chore: trim the idle-timeout comment; show the named-session pattern once 2026-08-09 23:38:14 +00:00
Ahmed Allam a55245ffcc 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.
2026-08-09 23:33:04 +00:00
Ahmed Allam 55e15f89fd fix(container): reclaim abandoned browser sessions
Each agent-browser session is a separate Chromium (~340 MB, ~12 processes)
and nothing owns a browser's lifecycle, so finished, stopped and crashed
agents strand theirs for the life of the sandbox. Enable the daemon's idle
timeout and stop telling agents each of them has its own browser.
2026-08-09 23:33:04 +00:00
-14
View File
@@ -118,20 +118,6 @@ ENV AGENT_BROWSER_USER_AGENT="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36
ENV AGENT_BROWSER_ARGS="--disable-blink-features=AutomationControlled,--no-first-run,--no-default-browser-check,--lang=en-US"
ENV AGENT_BROWSER_SCREENSHOT_DIR=/workspace/.agent-browser-screenshots
ENV AGENT_BROWSER_IDLE_TIMEOUT_MS=180000
USER root
RUN set -eu; \
{ \
for var in AGENT_BROWSER_EXECUTABLE_PATH AGENT_BROWSER_USER_AGENT \
AGENT_BROWSER_ARGS AGENT_BROWSER_SCREENSHOT_DIR \
AGENT_BROWSER_IDLE_TIMEOUT_MS; do \
eval "value=\${$var}"; \
printf 'export %s="${%s:-%s}"\n' "$var" "$var" "$value"; \
done; \
} > /tmp/agent-browser.sh; \
install -m 0644 /tmp/agent-browser.sh /etc/profile.d/agent-browser.sh; \
rm /tmp/agent-browser.sh; \
env -i bash -lc 'test "${AGENT_BROWSER_IDLE_TIMEOUT_MS}" = "180000"'
USER pentester
RUN /home/pentester/.npm-global/bin/agent-browser doctor --offline --quick
RUN set -eux; \