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
Independence 2: cua's own sandbox for node_repl cells; drop the Codex binary and app-server #115
Child 2 of the independence composite. node_repl runs JavaScript cells under a sandbox that the vendor runtime obtains from the Codex CLI binary (CODEX_CLI_PATH, "the sandbox; no unsandboxed fallback" in src/runtime/launch.mjs), and with the browser surface the runtime can start codex app-server inside CODEX_HOME ($CUA_HOME/state/codex: config, sqlite state, computer-use directory, 443 endpoints). On 2026-10-13 six cua_repl runtimes were alive on the owner's Mac with no codex app-server process, so the app-server is not a standing dependency. A research pass (2026-10-13, report codex-dependency-research.md, to be attached as a comment) maps the exact argv, the seatbelt and Linux sandbox mechanisms and any app-server JSON-RPC methods against the open-source https://github.com/openai/codex at the installed version's revision.
Goal
cua provides node_repl's sandbox itself (its own seatbelt profile launcher on macOS; on Linux the open-source sandbox helper under its licence or cua's own), with the same or stricter policy the spec records for the disabled and scoped profiles, and nothing from CodexCLI.app is extracted or launched; the app-server is dropped when the research shows nothing essential uses it on the cua route, else the essential part is replaced. cua install no longer needs CodexCLI.app; CODEX_HOME disappears or becomes cua's own state directory.
Acceptance
Unit tests with doubles for the launcher; the native acceptance script's sandbox items (read-deny of the secret store, no network where denied) pass on macOS and the Linux VM; npm test, test:mods, plugin validate green; README's sandbox and CODEX_HOME text updated; Decision Log entry in the standalone design spec; plugin minor bump. No regression in cell start latency (measure before and after on the same Mac).
Open
Depends on the research report; design through brainstorming when it lands.
Research landed 2026-10-13 (read-only, static; report kept in the session's job dir as codex-dependency-research.md; installed Codex CLI 0.159.2 matched to public tag rust-v0.159.2 = ff6aec96948b70d94983af2641a6b67c94faeff5). Findings that bind this ticket's design:
Two separate dependencies, neither an agent engine. (a) node_repl's Rust supervisor spawns the persistent kernel and trusted worker through codex sandbox -c shell_environment_policy.inherit=all -c default_permissions=node_repl -c 'permissions.node_repl={filesystem={...},network={enabled=false}}' [--allow-unix-socket ..] -- node --experimental-vm-modules kernel.js|trusted-worker.js ... (SandboxConfig::build_command_spec). (b) It lazily spawns codex app-server --listen stdio:// (JSONL over stdio) only when an auth/config RPC is needed: initialize, getAuthStatus, config/read, configRequirements/read (and config/value/write, config/batchWrite as capabilities). No turn/start, no command/exec. Six live runtimes without an app-server is consistent with native-only use.
macOS containment is a Codex-generated Seatbelt profile run by /usr/bin/sandbox-exec (public codex-rs/sandboxing/src/seatbelt*); Linux is codex-linux-sandbox over bubblewrap + namespaces + seccomp (legacy Landlock non-default). cua's scoped profile = whole-disk read, writes to the run dir and TMPDIR, no network; both children sandboxed alike.
Replacement shape: a cua-owned launcher honouring the recovered sandbox CLI contract (Seatbelt on macOS; a built codex-linux-sandbox or equivalent on Linux), a minimal app-server facade only if any retained path still needs config RPCs, and the login wrapper retired with Remove the ChatGPT extension route, the vendor browser service and the Codex login (ahead of #115) #79. Lowest-disruption first experiment: build the public CLI at the matched tag and use it as CODEX_CLI_PATH in a disposable home. Licences: public Codex Apache-2.0, bubblewrap LGPL v2; CodexCLI.app in ChatGPT.app is the proprietary distribution.
[board] in-design: Owner approved starting #115 (2026-10-17). Route: replace the CodexCLI.app sandbox launcher with a cua-owned one built from the public original at the installed CLI's tag rust-v0.159.2 (ff6aec96). macOS: codex-rs/sandboxing seatbelt.rs and its .sbpl policies, profile generation ported to cua and run through /usr/bin/sandbox-exec. Linux: the codex-linux-sandbox crate built from that tag. The owner accepted the recommendation 'B, with a first experiment under A' (the public CLI built at the tag and dropped into the current binary's slot), with conformance against the current binary before any switch. Design through brainstorming next.
Owner ruling 2026-10-17: the ChatGPT extension route is removed now, ahead of this ticket (#79, rewritten). With it go the vendor browser service and cua login, the app-server's and the login's only callers, so this ticket drops CodexCLI.app whole: the sandbox launcher is the only piece left to replace.
Owner ruling 2026-10-17: with cua's own launcher the kernel and the trusted worker get separate profiles, and the kernel (model cells) is denied reading the secret store (the global and project tiers under ~/.config/claude-secrets), ~/.config/cua and $CUA_HOME/state; the trusted worker, which substitutes {{secret:KEY}}, keeps today's profile. Applies on both hosts: on the vendor host the launcher tells the two children apart by the script it is asked to run. This replaces README's "cua cannot deny the store to cells alone" and is the acceptance item "read-deny of the secret store".
Owner rulings 2026-10-17 (design round 2): (1) the Linux helper (codex-linux-sandbox built from upstream on GCE, static, x64 and arm64) ships as a GitHub release asset on SSFSKIM/cua, pinned in the repo by URL, SHA-256 and upstream commit; cua install fetches and verifies it into $CUA_HOME; system bwrap stays. (2) Linux computer sessions stop defaulting to no sandbox: the kernel (model cells) is confined like scoped (writes only to the run directory and TMPDIR, no network or sockets, the secret store denied) and only the trusted worker gets the network, so sky_linux reaches X11 and the session bus. (3) The Linux vendor host is retired: CUA_REPL_HOST=vendor is refused on Linux, the vendor host remains for macOS computer sessions until #117, and cua's compat launcher for it is macOS-only; this resolves #135. Live spike (mini, 2026-10-17): the macOS native helper runs $CODEX_CLI_PATH app-server --listen stdio:// (initialize, configRequirements/read, config/read) once per helper, and every native call fails with -10005 without it, so the compat launcher carries a minimal app-server answering those three.
Owner approved the design 2026-10-17 (draft converged with a doperpowers:critique debate, ten findings adopted). Forks: (1) the kernel is also denied other sessions' $CUA_HOME/run/ (own run directory stays writable; Linux mount order checked first). (2) If M0 shows the confined worker breaks sky_linux's app launch or screenshots on Linux computer sessions: first launch applications outside the sandbox through the supervisor (gio launch / systemd-run --user, as launch-services does with open on macOS); if that is not reachable, the worker on those sessions runs unconfined as today while the kernel stays confined. Routed to execspec: spec docs/doperpowers/specs/2026-10-17-own-sandbox-design.md, milestones M0 (oracles, facade replay, Linux probes, baselines), M1 (policy, deny list, seatbelt port, own host on macOS), M2 (compat executable; CodexCLI.app leaves the macOS pin), M3 (Linux helper via GitHub Actions with provenance, own host on Linux, confined default, Linux vendor host retired), M4 (#138, CODEX_HOME cleanup, docs, acceptance, latency).
[board] done: All five milestones merged (#153, #156, #158, #160, #161); cua 0.15.0 on main (b68bee6). Final execution report #163. Residue: #157, #159, #162 and tech-debt-tracker.md. The mini's resident update and the leftovers prune wait for the owner.
Activity
SSFSKIM commentedon Oct 13, 2026
Research landed 2026-10-13 (read-only, static; report kept in the session's job dir as codex-dependency-research.md; installed Codex CLI 0.159.2 matched to public tag rust-v0.159.2 = ff6aec96948b70d94983af2641a6b67c94faeff5). Findings that bind this ticket's design:
codex sandbox -c shell_environment_policy.inherit=all -c default_permissions=node_repl -c 'permissions.node_repl={filesystem={...},network={enabled=false}}' [--allow-unix-socket ..] -- node --experimental-vm-modules kernel.js|trusted-worker.js ...(SandboxConfig::build_command_spec). (b) It lazily spawnscodex app-server --listen stdio://(JSONL over stdio) only when an auth/config RPC is needed: initialize, getAuthStatus, config/read, configRequirements/read (and config/value/write, config/batchWrite as capabilities). No turn/start, no command/exec. Six live runtimes without an app-server is consistent with native-only use.sandboxCLI contract (Seatbelt on macOS; a built codex-linux-sandbox or equivalent on Linux), a minimal app-server facade only if any retained path still needs config RPCs, and the login wrapper retired with Remove the ChatGPT extension route, the vendor browser service and the Codex login (ahead of #115) #79. Lowest-disruption first experiment: build the public CLI at the matched tag and use it as CODEX_CLI_PATH in a disposable home. Licences: public Codex Apache-2.0, bubblewrap LGPL v2; CodexCLI.app in ChatGPT.app is the proprietary distribution.SSFSKIM commentedon Oct 17, 2026
[board] in-design: Owner approved starting #115 (2026-10-17). Route: replace the CodexCLI.app sandbox launcher with a cua-owned one built from the public original at the installed CLI's tag rust-v0.159.2 (ff6aec96). macOS: codex-rs/sandboxing seatbelt.rs and its .sbpl policies, profile generation ported to cua and run through /usr/bin/sandbox-exec. Linux: the codex-linux-sandbox crate built from that tag. The owner accepted the recommendation 'B, with a first experiment under A' (the public CLI built at the tag and dropped into the current binary's slot), with conformance against the current binary before any switch. Design through brainstorming next.
SSFSKIM commentedon Oct 17, 2026
Owner ruling 2026-10-17: the ChatGPT extension route is removed now, ahead of this ticket (#79, rewritten). With it go the vendor browser service and
cua login, the app-server's and the login's only callers, so this ticket drops CodexCLI.app whole: the sandbox launcher is the only piece left to replace.SSFSKIM commentedon Oct 17, 2026
Owner ruling 2026-10-17: with cua's own launcher the kernel and the trusted worker get separate profiles, and the kernel (model cells) is denied reading the secret store (the global and project tiers under ~/.config/claude-secrets), ~/.config/cua and $CUA_HOME/state; the trusted worker, which substitutes {{secret:KEY}}, keeps today's profile. Applies on both hosts: on the vendor host the launcher tells the two children apart by the script it is asked to run. This replaces README's "cua cannot deny the store to cells alone" and is the acceptance item "read-deny of the secret store".
SSFSKIM commentedon Oct 17, 2026
Owner rulings 2026-10-17 (design round 2): (1) the Linux helper (codex-linux-sandbox built from upstream on GCE, static, x64 and arm64) ships as a GitHub release asset on SSFSKIM/cua, pinned in the repo by URL, SHA-256 and upstream commit;
cua installfetches and verifies it into $CUA_HOME; system bwrap stays. (2) Linux computer sessions stop defaulting to no sandbox: the kernel (model cells) is confined like scoped (writes only to the run directory and TMPDIR, no network or sockets, the secret store denied) and only the trusted worker gets the network, so sky_linux reaches X11 and the session bus. (3) The Linux vendor host is retired: CUA_REPL_HOST=vendor is refused on Linux, the vendor host remains for macOS computer sessions until #117, and cua's compat launcher for it is macOS-only; this resolves #135. Live spike (mini, 2026-10-17): the macOS native helper runs$CODEX_CLI_PATH app-server --listen stdio://(initialize, configRequirements/read, config/read) once per helper, and every native call fails with -10005 without it, so the compat launcher carries a minimal app-server answering those three.SSFSKIM commentedon Oct 17, 2026
Owner approved the design 2026-10-17 (draft converged with a doperpowers:critique debate, ten findings adopted). Forks: (1) the kernel is also denied other sessions' $CUA_HOME/run/ (own run directory stays writable; Linux mount order checked first). (2) If M0 shows the confined worker breaks sky_linux's app launch or screenshots on Linux computer sessions: first launch applications outside the sandbox through the supervisor (gio launch / systemd-run --user, as launch-services does with open on macOS); if that is not reachable, the worker on those sessions runs unconfined as today while the kernel stays confined. Routed to execspec: spec docs/doperpowers/specs/2026-10-17-own-sandbox-design.md, milestones M0 (oracles, facade replay, Linux probes, baselines), M1 (policy, deny list, seatbelt port, own host on macOS), M2 (compat executable; CodexCLI.app leaves the macOS pin), M3 (Linux helper via GitHub Actions with provenance, own host on Linux, confined default, Linux vendor host retired), M4 (#138, CODEX_HOME cleanup, docs, acceptance, latency).
2 remaining items
repl-parity: the declared kernel exit status, own host's exited(signa…
Merge pull request #156 from SSFSKIM/feat/115-own-sandbox-m1
Merge pull request #158 from SSFSKIM/feat/115-own-sandbox-m2
Parity: the Linux native fixture's configuration transition to the sc…
Merge pull request #160 from SSFSKIM/feat/115-own-sandbox-m3
Merge pull request #161 from SSFSKIM/feat/115-own-sandbox-m4
Merge pull request #163 from SSFSKIM/feat/115-own-sandbox-report
SSFSKIM commentedon Oct 18, 2026
[board] done: All five milestones merged (#153, #156, #158, #160, #161); cua 0.15.0 on main (b68bee6). Final execution report #163. Residue: #157, #159, #162 and tech-debt-tracker.md. The mini's resident update and the leftovers prune wait for the owner.
scripts/mini-watch.mjs: #115's during-run watch, landed from /tmp wit…
Own macOS native engine (#117) M3: engine-aware tooling, comparisons …
#171 M4 T4 evidence: the two repl-parity tests that fail on Linux hos…
#171 M6b: retire the vendor's Linux package (cua 0.30.0) (#594)
#610 follow-up (ruling 1302): cua's own window is starved once covere…