Skip to content

Simplify the Sandbox settings page. - #701

Merged
devikaverma merged 5 commits into
mainfrom
sandbox-settings
Sep 29, 2026
Merged

devikaverma merged 5 commits into
mainfrom
sandbox-settings

Conversation

@rohitprasad15

@rohitprasad15 rohitprasad15 commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Why

The Sandbox page asked for too much up front. Needed cleanup.
Additionally, there were some bugs in running OpenShell run on a Mac: the gateway was never restarted after setup, and if User had older Docker Desktop kernels, it did not have Landlock which lead to failures.

What

  • Page: one switch, then the sandbox types, each with one Set up button until it is ready. Network is "Only the sites you allow" (a tick list, nothing ticked by default) or "Allow everything".
  • OpenShell setup: three rows: Docker running, OpenShell installed (the app no longer installs it), and set up for OpenWorker with the image download. On a Mac it restarts the Homebrew gateway and asks Docker Desktop's kernel for Landlock.
  • Sessions: a session's sandbox starts at its first turn, not on connect or folder pick. Otherwise it created orphan sandboxes.
  • Desktop app: links open the browser (opener plugin). The DMG build requires grpcio, without which OpenShell cannot be used.
  • Config: strict and standard are gone; sandbox_network_profile = "allowlist" with sandbox_network_hosts.

How to try it

  1. Settings ▸ Sandbox on a Mac: turn it on, choose the macOS sandbox, then Choose sites… and Add… ▸ A CLI's login.
  2. For OpenShell: Docker Desktop 29.8 or later, install OpenShell 0.0.116 (docs/openshell.md), then Set up.

Tested

  • pytest: 2,704 pass (the 2 test_tool_result_cap failures are on main too). vitest: 474 pass.
  • On an Apple-silicon Mac with Docker Desktop 29.8.1: a real agent turn in OpenShell and in the macOS sandbox. The session folder was readable and writable, the home folder was absent, unticked sites were refused.
  • Docker Desktop 28.0.4 (kernel 6.10) reproduced the Landlock failure. The new check is covered by tests; the Mac has since been upgraded.
  • Windows: unit tests only, not rerun on a Windows machine.

Not in this PR

  • Windows: the firewall-off check, and a packaged build.
  • The race between servers cleaning up each other's sandbox folders.
  • Links elsewhere in the app, such as chat messages, still do not open in the desktop app.
  • Network and credential changes reach new sessions only.

… presets

Network: registries and search (strict folded in) with the machine's own hosts, or allow everything.
Credentials list only what was added; shipped entries become presets with the variable each tool reads.
A hung docker info no longer fails the OpenShell checklist.
Network allow list holds only the machine's ticked sites, none by default; strict/standard removed.
The app no longer installs OpenShell; setup is two checks and one step with progress.
DMG build requires grpcio so the sidecar can use OpenShell.
…fault

Wire the Tauri opener plugin so openExternal works in the desktop app.
Tools list shows only folders this machine has, all switched off until chosen.
…g line

A session's sandbox is made when its first turn runs, not at connect or folder pick.
The folder step restarts the Homebrew gateway on a Mac and checks the config in use.
The preparing line names the real sandbox.
A throwaway container asks the kernel; without Landlock the Docker row says update Docker Desktop.
A sandbox that exits at start on such a Mac gets the same message instead of ContainerExited.
@rohitprasad15 rohitprasad15 changed the title Sandbox settings: simpler page, allowed sites, OpenShell on a Mac Simplify the Sandbox settings page. Sep 29, 2026

@devikaverma devikaverma left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rohitprasad15
rohitprasad15 marked this pull request as ready for review September 29, 2026 02:31
@devikaverma
devikaverma merged commit 8d230eb into main Sep 29, 2026
6 checks passed
@devikaverma
devikaverma deleted the sandbox-settings branch September 29, 2026 02:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants