Auto-open the sandbox browser preview and follow the agent's tab - #506
Merged
Conversation
Open the sandbox Browser panel when the agent loads the browser skill or runs agent-browser, and wrap agent-browser so Chromium's visible tab follows the page the agent is operating on.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
… exactly Install the PATH wrapper first so the agent's first connect is already wrapped, replace a stale .real with the current CLI, and activate only an exact URL match so a parent tab is not stolen.
Image attachments are read from ObjectStore via view_images. Staging them onto a LazySandbox before the turn starts cold-provisions a container and can stall the run past the Playwright timeout. Skip hydrate for kind=image, and skip sandbox.download until the FS is already live.
The chip is a permanent per-conversation count ("1 memories" /
"1 条记忆"), not the old 已记住 / 已更新 verbs.
xfgong
added a commit
that referenced
this pull request
Aug 20, 2026
…r.sh The sandbox image bakes NEKO_WEBRTC_ICESERVERS_* (TURN at 192.168.1.208:3478) into Config.Env so Neko can relay WebRTC media. When start-browser.sh runs as the agent (uid 1000), it re-execs through sudo; /etc/sudoers sets Defaults env_reset and does not include NEKO_* in env_keep, so sudo strips the TURN config. Neko falls back to Google STUN only, ICE has no relay, and the live view white-screens. Preserve the NEKO_* vars across the re-exec via a temp file the root branch sources back. NEKO_ENV_FILE is set on the sudo command line (not the inherited env), so it survives env_reset. Surfaced by PR #506 (auto-open browser preview) once the Browser panel started opening on its own and the agent-started browser path became user-visible. The backend's as_root=True path is unaffected. Requires rebuilding the cubeplex-sandbox image with a new tag and deploying it for the fix to land in running sandboxes.
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
When the agent uses the sandbox browser, the conversation side panel now opens on the Browser tab by itself. After each
agent-browsercommand, Chromium's visible tab is brought to the front so the Neko live view matches the page the agent is operating on.Why
Users currently have to click Browser themselves, and CDP can drive a background tab while the live desktop still shows a different one. Both make takeover and watching the agent harder than they should be.
How
tool_callevents that load thebrowserskill or runagent-browser/start-browser.shopen the sandbox Browser panel (same chat-surface gate as artifact auto-open). User-picked artifacts, attachments, and tool panels are not replaced.start_browserinstalls a PATH wrapper foragent-browserthat activates the session's current page via CDP/json/activate/<id>. No sandbox image rebuild is required; existing sandboxes pick it up on the next live-view start.Theater / maximize is still manual.
Tests
autoOpenPreview+messageStore.autoOpenBrowserunit testsstart_browserunit tests