Repository navigation
#115 M4: explicit Codex CLI prune, #138 switch off, docs, 0.15.0 - #161
Merged
Merged
Conversation
…uth.json, installation_id, sqlite files, caches, plugins, skills, log, tmp/arg0 and browser/sessions, and the unused CodexCLI.app (or Linux codex) in installed trees whose pin no longer lists it while no session runs; links never followed; doctor's runtime.leftovers row names them until then
…t, off (it ships off: #138 has not reproduced); tz-probe renders cua's kernel and worker profiles without the line and with it, and its codex launcher needs --codex now that cua installs no Codex CLI
… under a claimed session, cua's compat executable as CODEX_CLI_PATH) instead of the CodexCLI.app cua no longer installs; its socket-allowance variant and the probe lib's drifted copy of the launch go; surface.mjs's secrets note and sandbox.mjs's header say what cua's sandbox now denies
…the compat executable, the macOS nesting refusal, os_log, #138's switch off), the Linux helper and its scoped computer default, the vendor host retired on Linux, CODEX_HOME for the macOS vendor host only, install's cleanup and runtime.leftovers; comments on Linux X access
…, and their sandbox text points to the own-sandbox spec
…t the final acceptance runs
…eftovers (an older cua sharing the home may still launch CodexCLI.app, which run records cannot see); a plain install removes nothing and says how to prune; doctor names the command; the environment's CODEX_HOME is never touched (pinned with a planted directory)
…update every cua sharing the home first, then cua install --prune-leftovers; a plain install removes nothing
…e sweep and a session's release refuse a run/, state/, state/compat/ or kernel/ that is not a real directory (pre-dates M4); the prune refuses then, re-checks for sessions right before each release's CLI goes and again after renaming it aside to a tombstone (renamed back if one appeared), and reports any unreadable directory instead of reading it as clean, which doctor's row warns about
… kernel TMPDIR stated; the prune's re-check, its residual race and its link refusal; the sweep's link refusal
…, and finds the tombstones a failed or interrupted prune leaves: doctor names them, and the next prune removes them without the session conditions
…unconfined after a failed launch (#135), so updating every cua sharing the home first is a precondition
…#138 line off, acceptance groups)
…owser/, runtimes/, a release directory, a linked CodexCLI.app) are still never followed but now reported as not inspected, by doctor (warn), the prune (failed) and a plain install; M4's acceptance recipe follows the approved groups (A headless, B in a CI-opt hold, C skipped), with no live typing
…, not its errno (ENOTEMPTY on GitHub's macOS runner)
… own-sandbox 82/82, linux-native PASS with the vendor host refused, the prune live with and without a session record, and the own host's cold rows against M0 (slower than M0's run-to-run spread; reported, not judged)
…at/115-own-sandbox-m4-gce-evidence
…el's first-cell cost
… the baseline as the same hardware (MemTotal moves by KiB between boots); the M4 Linux cold rows re-compared on the retained runs (PASS), the latency ruling recorded, a release-notes line and a tech-debt line for the first-cell cost
…ence' into feat/115-own-sandbox-m4
…and accept-native's TextEdit typing and close cells run only while TextEdit is the frontmost application, else nothing is sent, key_skipped_not_frontmost is recorded with the frontmost bundle id and the run fails (scripts/accept/key-guard.mjs, one shared helper); release notes: the macOS vendor host's ~60 ms first cell; tech debt: pre-render the compat's seatbelt profile
…ntmost key guard until #162
…hecks, then dispatches with no pause between (pausing() exposes pauseWait and dispatch; sendToPausedSession); the scratch document's super+n path is its own guarded cell; a task's new document and its typing are separate cells, each checked right before it is sent
…d cells count; a comment where task.total counts its rows
…CLI, doctor rows pass), own-sandbox on both hosts (76/76, 86/86), oracles ok, golden 18/18, the switch-off profiles identical to M2's, the fail-closed suites 153/153 and 6/6 (the store's directory name redacted)
…sh scratch homes (plain install removes nothing; --prune-leftovers removes the names and CodexCLI.app, 229 MB freed, keepers and the environment CODEX_HOME untouched, the helper's inode unchanged; a live session defers the CLI; a linked state/codex/tmp is reported, not followed)
…cy PASS on both configurations (the vendor cold.hit row +60 ms, beyond M0's spread and inside the limit, accepted on three runs; the extra runs and the compat timing not run), parity PASS (479/479, 0 undeclared differences), accept-native without TextEdit (11 to 13 PASS; only item 5 differs from M2, by design); the ssfs closure and HID-idle notes; the mini results written up
SSFSKIM
marked this pull request as ready for review
October 18, 2026 16:42
This was referenced Oct 18, 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.
Ticket #115, milestone M4, the last milestone, of
docs/doperpowers/specs/2026-10-17-own-sandbox-design.md("M4 — #138, CODEX_HOME, documentation, final acceptance and release"). The spec's Outcomes & Retrospective is written.Closes #115
Closes #135
#135: the Linux vendor host, which failed open, is retired (M3). Cua's own host on Linux fails closed: acceptance 9, and the parity's
no-unsandboxed-fallbackcase.What changes
cua install --prune-leftovers. An explicit command that removes the Codex CLI's leftovers. A plain install removes nothing; it prints one line naming the leftovers and the command. The prune removes:codexfile from pre-M3 Linux trees;$CUA_HOME/state/codex), never an environment CODEX_HOME.$CUA_HOME/runtimes/<release>/, only when the pin no longer lists the component, and never while a session runs.install.jsonis reported, never read as clean.src/runtime/run-dir.mjs). For every caller, the sweep refuses to delete under arun/,state/,state/compat/orkernel/that is a symlink. This closes an exposure that predates M4. Serve and the agent log the refusal and carry on.denyandallowmodes. Vendor node_repl on macOS hangs about 1 in 8 on the first local-time conversion under the sandbox (ICU tz lookup blocks on launchd) #138 stays open as not reproduced.compare --same-hosttolerates amemoryBytesdifference under 0.1% and nothing else. native-baseline and accept-native send super+n, typing, super+w and super+q only while TextEdit is the frontmost app (scripts/accept/key-guard.mjs), pending Native key events may reach the frontmost app instead of the bound app (Chrome window closed twice after helper typing runs) #162.docs/evidence/2026-10-17-own-sandbox/m4/README.md.Validation Evidence
Everything is in
docs/evidence/2026-10-17-own-sandbox/m4/.Gates:
HOME=$(mktemp -d) CUA_NODE=/opt/homebrew/bin/node npm testgives 2867 pass, 0 fail at 9173dbf. 7c1ffef adds one comment; native-baseline gives 109/109.npm run test:modsgives 133/133.claude plugin validate .passes. Its one warning, about the root CLAUDE.md, predates this work.Mini group A (headless) at 7b87873, item 10 at a920e2f.
--prune-leftoversfrees 229 MB, and doctor goes from warn to pass;state/codex/tmpis reported, not followed.Mini group B (CI-opt hold) at 8782604.
Parity (item 12): vendor 479/479 and cua 479/479. The diff has 0 undeclared differences.
accept-native without TextEdit:
Latency (item 11):
compare --same-hostpasses both configurations.The vendor cold.hit row is beyond M0's run-to-run spread. It was accepted on three runs by the dispatching session; the likely cause is the compat's Node startup. The confirming runs were not taken because of the key-routing risk (Native key events may reach the frontmost app instead of the bound app (Chrome window closed twice after helper typing runs) #162).
GCE (cua-gce, arm64) at 7b87873:
Item 1: no
codex; 883pssamples saw no process named codex.Items 2-5: own-sandbox gives 82/82 in all three modes.
Item 7: linux-native passes, and the vendor host is refused with its sentence.
Item 10: run on a pre-M3 tree, the prune takes it from 452.6 MB to 205.1 MB.
Item 11: Linux latency gives
verdict: PASS, accepted by ruling.Item 12: Linux parity rests on M3's full run at bf7739f (493 cases). M4 changes no Linux launch code.
Owner sitting (group C): skipped by ruling. M4 does not touch the macOS computer route, M2's sitting proved typing and approvals, and group B re-proves the route read-only.
Item 13 (#138): no sittings, by ruling. M0 measured 0 hangs without the line, so no measurement can decide it.
Unresolved Review Findings
None. Every finding from the task reviews and reviewer-high was fixed. The plugin-validator warning about the root CLAUDE.md predates this work and was dismissed as baseline.
Residue
buildLaunchwould makecua-codex-compatan sh check plus exec. It is in tech-debt-tracker.md and was never measured: the timing could not run inside the hold.bundleID="…"only, whilelsappinfoon newer macOS prints"CFBundleIdentifier"="…". The new key guard parses both, and the gate does not. A mini gate stopping with "no bundle id" would come from this.watch.mjswrites to a hardcoded M1 sitting log. Group B's readings landed there and were moved by hand. The log path should follow the run.