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
Spike: does Full Disk Access let the vendor's profile enrichment label backends (profileName)? #8
The vendor's profile enrichment never labels a backend with profileName on either Mac (Phase C report, residue 3), so every profiles bind needs the user's explicit pick. Hypothesis (spec Surprises, 2026-10-05): the enrichment reads Chrome's Local State and settings store, and those reads fail with EPERM when the runtime is launched from a process without Full Disk Access (macOS 27 protects Chrome's user-data directory).
Method
On the mini, where Terminal now has Full Disk Access: run the bounded read-only listBrowsers launch (the same one profiles list uses) from (a) a Terminal shell, (b) an SSH shell (sshd processes read Chrome's directory), (c) a shell without Full Disk Access. Compare profileName on the returned backends. Never pick or bind anything.
Deliverable
A findings comment with the three results. If labels appear with Full Disk Access: a follow-up enhancement so profiles bind shows the profile name beside each candidate id (the explicit pick stays mandatory; no auto-bind). If not: record what the enrichment actually fails on. Either way, a Surprises entry in the spec.
[board] in-progress: Spike started: running the read-only listBrowsers launch from an SSH shell on the mini (which can read Chrome's user-data directory) and inspecting backend profile fields.
Spike #8 findings: Full Disk Access is not what blocks the labels. node_repl's default sandbox is.
Conclusion: the hypothesis is refuted. Reading Chrome's directory is necessary but not sufficient. On the mini, from an SSH shell (which can read Chrome's user-data directory), the vendor enrichment still returns no profileName. Three things are confirmed:
The enrichment does run.
It reads Local State without error.
It then fails on mkdtemp(<nodeRepl.tmpDir>/codex…) with EPERM.
The EPERM comes from node_repl's macOS sandbox, not from TCC. cua's tools/call sends no _meta["codex/sandbox-state-meta"], so node_repl applies a restrictive default to the trusted worker: reads are allowed, but writes are denied even to $TMPDIR and /tmp. Sending the same listing with a sandbox state of {"permissionProfile":{"type":"disabled"}} labels the backend: profileName: "ucsd.edu" (Profile 12's display name). With no sandbox state, the result is profileName: null.
Environment
Mac mini: macOS 27.0 (26A428), Node v26.4.0.
cua main at 53d817f (ran git pull first), runtime 26.928.40906, its own Node v24.21.0.
Live host: pid 9939, cua's placed ChatGPT for Chrome host, parent Google Chrome (30559), up since 11:32 KST. The owner did not wake anything; nothing was bound, picked or registered.
What the enrichment does
Source: browser-service.mjs aL/cte/ute/sL (readable chatgpt-26.928.40906/cua_node/@oai/browser-desktop/scripts/browser-service.mjs:67370-67470). The installed runtime's minified copy has the same code.
Guard: the backend's getInfo must carry metadata.extensionInstanceId and metadata.extensionId. The extension (1.26.901 in Profile 12) sends metadata:{extensionId:chrome.runtime.id,extensionInstanceId}.
Read Local State and walk profile.profiles_order.
For each profile whose Local Extension Settings/<extensionId> exists: import("classic-level"), then mkdtemp(nodeRepl.tmpDir + "/codex"), then cp the LevelDB there, then read the key extensionInstanceId.
On a match, set metadata.profileName (and profileIsLastUsed, profileOrdering).
Errors at each step are swallowed by .catch(gt), which only reports to the vendor's error reporter, so the backend comes back unlabelled.
Commands and raw results (all from ssh mac-mini)
1. cd ~/Developer/GitHub/cua && node bin/cua.mjs profiles list --json (the read-only tool) school → Profile 12, ready, extensionInstanceId: "34e8eab6-21ea-47de-a4bf-82696e63f903". ssfs → Profile 1, not_bound. profiles list never prints labels, so the next step prints the backend fields directly.
2. The same liveness launch with the raw backend fields printed. This calls listLiveBackends({home, runtime: resolveRuntime({home}), tabCounts: false}) from src/profiles/inventory.mjs, the call profiles list makes: [{"instanceId":"34e8eab6-21ea-47de-a4bf-82696e63f903","family":"chrome"}]: no profileName. Teardown was confirmed, and no elicitations came up.
3. Each enrichment step, re-run from SSH with the runtime's own node (nothing copied):
Local State is readable. profiles_order is an array of 12 entries, last_used = "Profile 12", and info_cache["Profile 12"].name = "ucsd.edu".
Local Extension Settings/hehggadaopoacecdllhhajmbjkdcmajg exists for Default, Profile 1 and Profile 12, and not for the other 9.
classic-level resolves from the vendor service's location to cua_node/lib/node_modules/classic-level/index.js. Its native binding round-trips a scratch DB. It also imports under an emulation of the trusted worker's registerHooks trusted-path check.
grep -c -a on Profile 12's store finds extensionInstanceId and 34e8eab6-21ea-47de-a4bf-82696e63f903 once each in 000003.log.
4. Watched $TMPDIR during the listing for the vendor's codex* temp copy. I first checked that the watcher catches a quick mkdtemp+rm. Result: no codex* entry was ever created. On the first Mac, whose Chrome directory this shell can read, the same listing over 3 live backends gave the same result: 3 backends, no labels, no temp copy.
5. Observed which Chrome paths the vendor touches. Script: /tmp/cua-spike8/observe-service.mjs on the mini, a trusted browser service that wraps fs/fs/promises via syncBuiltinESMExports, logs to stderr, and delegates every request untouched to the pinned vendor module. Launched with buildLaunch(... services: {browser: observer}):
readFile Chrome/Local State ok
existsSync Chrome/{Default,Profile 1,Profile 12}/Local Extension Settings/hehgg… true (others false)
mkdtemp …/codex error EPERM (x3)
The observer's first log attempt is itself evidence: writes from the trusted worker to /tmp/cua-spike8/… and to $TMPDIR/… failed with EPERM: operation not permitted.
6. The same listing with the sandbox state Codex sends per call. Script: /tmp/cua-spike8/sandbox-meta-listing.mjs. It runs the same LIVENESS_CELL, x-codex-turn-metadata and decline-all elicitations as profiles list, plus _meta["codex/sandbox-state-meta"]:
{"permissionProfile":{"type":"disabled"},"useLegacyLandlock":false,"sandboxCwd":"file://<run dir>"}: mkdtemp ok ×3, cp ok for Profile 12, Default and Profile 1, and {"instanceId":"34e8eab6-21ea-47de-a4bf-82696e63f903","family":"chrome","profileName":"ucsd.edu"}. I repeated this with cua's production src/services/browser.mjs instead of the observer and got the same label.
Every run confirmed teardown. No codex* leftovers in $TMPDIR, and <CUA_HOME>/run and the sessions directory are empty afterwards.
How the mechanism was found: node_repl embeds a SandboxState {permissionProfile, sandboxCwd, useLegacyLandlock} read from codex/sandbox-state-meta, with sandbox-exec / macos_sandbox_failed paths. The pinned codex CLI defines the same struct, with a codexLinuxSandboxExe field, and sends that _meta key on MCP tool calls.
What I could not test
The ticket's three-way comparison (Terminal with Full Disk Access, SSH, a shell without it). Only SSH was run. The console cases need GUI interaction, and I made none.
The Full Disk Access requirement in the console. The source implies it still exists: the Local State read happens before the temp copy, so a runtime launched from a console process without Full Disk Access would also hit TCC's EPERM there. Untested.
Whether the desktop app labels its own backends. That depends on the sandbox state Codex sends there. Not observed.
A narrower profile than disabled. I did not try a managed profile that allows only tmpdir writes. The exact managed / file_system shape should come from openai/codex's PermissionProfile and be checked with a probe, not guessed.
Recommended follow-up
Enhancement (recommended): profiles bind labels candidates itself, outside the vendor runtime. The CLI process reads Local State, copies each profile's Local Extension Settings/<OpenAI extension id> store to cua's own temp directory, and reads extensionInstanceId with the runtime's classic-level. That maps each live instance id to its profile directory and display name.
This beats the vendor label. Display names collide on the mini ("직장" and "l1ngual.com" each appear twice), but the directory is what the registry binds.
It does not depend on the vendor's sandbox policy.
It needs the same Chrome-directory access chromeFacts already needs, falling back to unlabelled with the Full Disk Access hint when the directory is unreadable.
The explicit pick stays mandatory (no auto-bind). Bind could warn when the picked id's directory differs from the key's chromeProfileDirectory.
Separate ticket: cua runs the vendor runtime under node_repl's default sandbox because it never sends codex/sandbox-state-meta. That means no writes to $TMPDIR, /tmp or the session cwd. The same restriction probably affects other vendor paths that need scratch space (downloads, uploads, screenshots to disk; Phase C residue item 4). Whether cua serve should send a scoped sandbox state (tmpdir-only writes, never disabled) is a security-policy call that needs a charter Decision Log entry.
Add a Surprises entry in the spec recording this correction to the 2026-10-05 hypothesis. Not yet written.
Activity
SSFSKIM commentedon Oct 5, 2026
[board] in-progress: Spike started: running the read-only listBrowsers launch from an SSH shell on the mini (which can read Chrome's user-data directory) and inspecting backend profile fields.
SSFSKIM commentedon Oct 5, 2026
Spike #8 findings: Full Disk Access is not what blocks the labels. node_repl's default sandbox is.
Conclusion: the hypothesis is refuted. Reading Chrome's directory is necessary but not sufficient. On the mini, from an SSH shell (which can read Chrome's user-data directory), the vendor enrichment still returns no
profileName. Three things are confirmed:Local Statewithout error.mkdtemp(<nodeRepl.tmpDir>/codex…)with EPERM.The EPERM comes from node_repl's macOS sandbox, not from TCC. cua's
tools/callsends no_meta["codex/sandbox-state-meta"], so node_repl applies a restrictive default to the trusted worker: reads are allowed, but writes are denied even to$TMPDIRand/tmp. Sending the same listing with a sandbox state of{"permissionProfile":{"type":"disabled"}}labels the backend:profileName: "ucsd.edu"(Profile 12's display name). With no sandbox state, the result isprofileName: null.Environment
mainat53d817f(rangit pullfirst), runtime 26.928.40906, its own Node v24.21.0.ChatGPT for Chromehost, parent Google Chrome (30559), up since 11:32 KST. The owner did not wake anything; nothing was bound, picked or registered.What the enrichment does
Source: browser-service.mjs
aL/cte/ute/sL(readablechatgpt-26.928.40906/cua_node/@oai/browser-desktop/scripts/browser-service.mjs:67370-67470). The installed runtime's minified copy has the same code.getInfomust carrymetadata.extensionInstanceIdandmetadata.extensionId. The extension (1.26.901 in Profile 12) sendsmetadata:{extensionId:chrome.runtime.id,extensionInstanceId}.Local Stateand walkprofile.profiles_order.Local Extension Settings/<extensionId>exists:import("classic-level"), thenmkdtemp(nodeRepl.tmpDir + "/codex"), thencpthe LevelDB there, then read the keyextensionInstanceId.metadata.profileName(andprofileIsLastUsed,profileOrdering).Errors at each step are swallowed by
.catch(gt), which only reports to the vendor's error reporter, so the backend comes back unlabelled.Commands and raw results (all from
ssh mac-mini)1.
cd ~/Developer/GitHub/cua && node bin/cua.mjs profiles list --json(the read-only tool)school→Profile 12, ready,extensionInstanceId: "34e8eab6-21ea-47de-a4bf-82696e63f903".ssfs→Profile 1,not_bound.profiles listnever prints labels, so the next step prints the backend fields directly.2. The same liveness launch with the raw backend fields printed. This calls
listLiveBackends({home, runtime: resolveRuntime({home}), tabCounts: false})fromsrc/profiles/inventory.mjs, the callprofiles listmakes:[{"instanceId":"34e8eab6-21ea-47de-a4bf-82696e63f903","family":"chrome"}]: noprofileName. Teardown was confirmed, and no elicitations came up.3. Each enrichment step, re-run from SSH with the runtime's own node (nothing copied):
Local Stateis readable.profiles_orderis an array of 12 entries,last_used = "Profile 12", andinfo_cache["Profile 12"].name = "ucsd.edu".Local Extension Settings/hehggadaopoacecdllhhajmbjkdcmajgexists for Default, Profile 1 and Profile 12, and not for the other 9.classic-levelresolves from the vendor service's location tocua_node/lib/node_modules/classic-level/index.js. Its native binding round-trips a scratch DB. It also imports under an emulation of the trusted worker'sregisterHookstrusted-path check.grep -c -aon Profile 12's store findsextensionInstanceIdand34e8eab6-21ea-47de-a4bf-82696e63f903once each in000003.log.4. Watched
$TMPDIRduring the listing for the vendor'scodex*temp copy. I first checked that the watcher catches a quick mkdtemp+rm. Result: nocodex*entry was ever created. On the first Mac, whose Chrome directory this shell can read, the same listing over 3 live backends gave the same result: 3 backends, no labels, no temp copy.5. Observed which Chrome paths the vendor touches. Script:
/tmp/cua-spike8/observe-service.mjson the mini, a trustedbrowserservice that wrapsfs/fs/promisesviasyncBuiltinESMExports, logs to stderr, and delegates every request untouched to the pinned vendor module. Launched withbuildLaunch(... services: {browser: observer}):The observer's first log attempt is itself evidence: writes from the trusted worker to
/tmp/cua-spike8/…and to$TMPDIR/…failed withEPERM: operation not permitted.6. The same listing with the sandbox state Codex sends per call. Script:
/tmp/cua-spike8/sandbox-meta-listing.mjs. It runs the sameLIVENESS_CELL,x-codex-turn-metadataand decline-all elicitations asprofiles list, plus_meta["codex/sandbox-state-meta"]:none:{"instanceId":"34e8eab6-…","family":"chrome","profileName":null}{"permissionProfile":{"type":"disabled"},"useLegacyLandlock":false,"sandboxCwd":"file://<run dir>"}: mkdtemp ok ×3,cpok for Profile 12, Default and Profile 1, and{"instanceId":"34e8eab6-21ea-47de-a4bf-82696e63f903","family":"chrome","profileName":"ucsd.edu"}. I repeated this with cua's productionsrc/services/browser.mjsinstead of the observer and got the same label.codex*leftovers in$TMPDIR, and<CUA_HOME>/runand the sessions directory are empty afterwards.How the mechanism was found: node_repl embeds a
SandboxState {permissionProfile, sandboxCwd, useLegacyLandlock}read fromcodex/sandbox-state-meta, withsandbox-exec/macos_sandbox_failedpaths. The pinnedcodexCLI defines the same struct, with acodexLinuxSandboxExefield, and sends that_metakey on MCP tool calls.What I could not test
Local Stateread happens before the temp copy, so a runtime launched from a console process without Full Disk Access would also hit TCC's EPERM there. Untested.disabled. I did not try a managed profile that allows only tmpdir writes. The exactmanaged/file_systemshape should come from openai/codex'sPermissionProfileand be checked with a probe, not guessed.Recommended follow-up
profiles bindlabels candidates itself, outside the vendor runtime. The CLI process readsLocal State, copies each profile'sLocal Extension Settings/<OpenAI extension id>store to cua's own temp directory, and readsextensionInstanceIdwith the runtime'sclassic-level. That maps each live instance id to its profile directory and display name.chromeFactsalready needs, falling back to unlabelled with the Full Disk Access hint when the directory is unreadable.chromeProfileDirectory.codex/sandbox-state-meta. That means no writes to$TMPDIR,/tmpor the session cwd. The same restriction probably affects other vendor paths that need scratch space (downloads, uploads, screenshots to disk; Phase C residue item 4). Whethercua serveshould send a scoped sandbox state (tmpdir-only writes, neverdisabled) is a security-policy call that needs a charter Decision Log entry.Record spike #8: the Full Disk Access hypothesis is refuted; node_rep…
SSFSKIM commentedon Oct 5, 2026
[board] done: Findings posted (issue comment): hypothesis refuted; cause is node_repl's default sandbox denying temp writes without sandbox metadata. Follow-ups registered (labelling enhancement, sandbox decision). Docs corrected on main.
#171 M5 x64 at H7.1 (task 129): counted L4d FAILS on one false ok, t1…