You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: configurable paths and ports for daemon, Chrome CDP and stream server (for OS-sandboxed use) #2313
We run agent-browser (v0.41.1) inside an OS sandbox (macOS Seatbelt, Windows filtering) that allows only listed loopback ports and one socket folder. Today some of the locations agent-browser picks cannot be set from outside, so we cannot stay inside the allowed set. Here is what we checked in the v0.41.1 source (tag v0.41.1, commit 5868f7c).
Already available:
Socket folder: AGENT_BROWSER_SOCKET_DIR (cli/src/connection.rs:103-106). It uses an existing folder as-is (no chmod), which is what we need.
Missing:
Windows daemon port. The daemon port is derived from the session name, 49152 + hash % 16383 (cli/src/connection.rs:411-431). There is no env var or flag to set it. If that port is taken, the daemon silently falls back to an OS-assigned ephemeral port (cli/src/native/daemon.rs:364-372), which a sandbox cannot allow in advance.
Chrome's remote-debugging (CDP) port. Chrome is always started with --remote-debugging-port=0 (cli/src/native/cdp/chrome.rs:467), and the port is read back from DevToolsActivePort in the profile directory (chrome.rs:946-968). There is no option to choose the port.
Stream server port. AGENT_BROWSER_STREAM_PORT exists (cli/src/native/daemon.rs:110), so this is already available. However, when that port is taken the server falls back to an ephemeral port (cli/src/native/stream/mod.rs:318-322, called with allow_port_fallback = true from daemon.rs).
Requests:
A way to set the daemon's TCP port on Windows, e.g. AGENT_BROWSER_DAEMON_PORT.
A way to set Chrome's remote-debugging port, e.g. AGENT_BROWSER_CDP_PORT or a passthrough that replaces --remote-debugging-port=0. The port would then be read from the given value, not from DevToolsActivePort.
When a fixed port was requested and is taken, fail with a clear error instead of falling back to an ephemeral port, for the daemon (daemon.rs:364-372) and the stream server (stream/mod.rs:318-322). Keep the fallback as the default if you prefer, but make it opt-out.
Related existing issues: #1155 (Unix socket blocked in a sandbox), #1791 and #1796 (--remote-debugging-port=0 on WSL2; #1796 pre-binds a fixed port and is closed), #2136 (Windows derived port taken by another program; it fixes the readiness check but adds no way to set the port).
Activity