Repository navigation
Conversation
wcares
requested review from
MikeRyanDev,
davidmckayv,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
October 30, 2026 19:49
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem. In the
managedbackendagent-computerstartsBun.serve({ port })with no hostname (src/browser-runtime.tssetshostname: "127.0.0.1"only forlocal-chrome, andsrc/index.tspasses a hostname only when the runtime has one). Bun then listens on every interface. The same process serves
/exec(a shell) and/files/*, behindCOMPUTER_TOKENonly. In the intendeddeployment (a container or a pod) that is fine, but anyone who runs the managed computer directly on a person's own machine (a developer on macOS or Windows, which
browser-runtime.tsalreadyanticipates: "A developer running this directly on a Mac or Windows keeps headless") exposes a token-protected shell and file API to the whole local network, and on Windows triggers the firewall
prompt.
Measured (OpenBot
46642d6, Bun 1.4.3, Linux):COMPUTER_TOKEN=x PORT=47401 COMPUTER_BROWSER_MODE=headless bun run agent-computer/src/index.tslistens on*:47401; a request to the machine'sLAN address gets
200from/healthand401fromPOST /exec(reachable). Bun'sserver.hostnameprintslocalhostin that state, andHOST/HOSTNAMEenvironment variables change nothing, sothere is no existing setting that closes it.
Fix. A new optional
COMPUTER_BIND: when set, the managed computer listens on that address (127.0.0.1keeps it on the machine). Unset keeps today's behaviour exactly, so container images do not change.local-chromestill always binds127.0.0.1. No behaviour change by default.Test.
tests/browser-runtime.test.ts: unset gives no hostname;COMPUTER_BIND=" 127.0.0.1 "gives127.0.0.1(trimmed);allowExecunchanged.After the change (this exact opt-in diff on current upstream main
743649e, Bun 1.4.3, Linux;git apply --checkalso clean on46642d6): unset still listens on*:47421(LAN/health200, unchanged);COMPUTER_BIND=127.0.0.1listens on127.0.0.1:47422, loopback/health200 and a LAN connection is refused;bun test tests/browser-runtime.test.ts: 14 pass, 0 fail (with the new test).Note (not part of this change): the startup line is hard-coded,
agent-computer listening on http://127.0.0.1:<port>, and prints it also when the process listens on every interface (measured above: the line says 127.0.0.1 whilessshows*:47421), which is how the open listener went unnoticed. Printing the address the process was actually told to bind (or "all interfaces") would make it visible.Suggested follow-up (not in this PR): say in the README that running a managed computer outside a container should set
COMPUTER_BIND=127.0.0.1.🤖 Generated with Claude Code