Repository navigation
fix(desktop): copy agent-computer into the deployment so the server starts - #813
Merged
Merged
Conversation
…tarts Since #673 the server imports its egress rules from agent-computer/src/egress, and scripts/start-local-chrome-computer.ts imports agent-computer/src/browser-runtime. The desktop app lays the deployment out from an allowlist of top-level folders that never included agent-computer, so every new desktop install of v0.2.0 had a server that exited at start with "Cannot find module '../../../agent-computer/src/egress'". - Copy agent-computer with the rest of the deployment. - Add a test that walks the real tree and fails when code the desktop unpacks imports, by relative path, anything it does not unpack. - Record the laid-out folders in the deployment stamp. A stamp written by an earlier app (version only) no longer matches, so Install lays the same release out again, and Start sends such an install back to Install instead of running a server that cannot load.
dustywusty
requested review from
MikeRyanDev,
davidmckayv,
guidovizoso,
mxmzb and
tylerslaton
as code owners
October 20, 2026 21:50
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
davidmckayv
approved these changes
Oct 20, 2026
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.
What this changes
A new desktop install of v0.2.0 cannot start OpenBot. The server exits at once:
This PR:
agent-computerto the folders the desktop app lays out (deployment::ALSO_COPIED);everything_the_unpacked_code_imports_is_unpacked_too, which walks the real tree and fails when code the desktop unpacks imports, by a relative path, anything it does not unpack;{"version":"v0.2.0"}) no longer matches, so Install lays the same release out again (no version change), and Start sends such an install back to Install with the existing "Finish installing" message instead of running a server that cannot load.Root cause
67091ed, "Bots work as coworkers", 1 Oct) madeserver/src/computer/policy-network.tsimport../../../agent-computer/src/egressso the egress rules are shared rather than copied.scripts/start-local-chrome-computer.tsalready importedagent-computer/src/browser-runtime.deployment::unpackextracts the release tarball and keeps only the top-level entries inREQUIREDandALSO_COPIED.agent-computerwas never in either list, so the import has nothing to resolve to. It is not a workspace, sobun installdid not notice either.<install>/agent-computeris absent andserver.logshows the error above. Copyingagent-computer/srcfrom the v0.2.0 tag into the install makesbun build server/src/index.tsandworker/src/index.tsresolve every import. Still present onmainat68fd9f6.Where it runs
layoutfield (old stamps read it as empty).Boundary and audit
Changelog
CHANGELOG.mdunderUnreleased("A new desktop install starts its server again").Proof
server/src/computer/policy-network.ts imports ../../../agent-computer/src/egressandscripts/start-local-chrome-computer.ts imports ../agent-computer/src/browser-runtime; passes after.a_deployment_laid_out_by_an_app_that_copied_less_is_fetched_againanda_deployment_laid_out_by_an_earlier_app_requires_installation_before_startfailed before, pass after.cargo fmt --check,cargo clippy --locked --all-targets -- -D warnings,cargo test --locked --lib --bins(541 lib, 149 bin) pass on macOS arm64. Windows and Linux runs are left to CI.