oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1# Bubblewrap nesting check for Equipo plan 2b
2
3Tested on docs-t1 on 2026-11-03. **Claude Code 2.1.312 and Codex app-server 0.165.0 both run with their inner read restrictions inside bubblewrap 0.11.0.** Keep both provider sandboxes enabled. The final successful runs also use a private network namespace, with provider HTTPS traffic carried through a restricted Unix-socket proxy. Sharing the host network failed the host-loopback isolation control.
4
5This establishes feasibility for the direct-launch plan. It is not the complete verified-tuple release gate: credential refresh, every native/image/MCP read surface, policy tampering, production crash accounting and live permission relay still need the tests in plan 2b. It does not justify treating an entire shared UID as isolated from malicious host peers.
6
7## Runs and scope
8
9Six prompted CLI invocations were attempted, using Haiku 4.5 and GPT-6-Luna at low effort. Five reached a model turn; the missing-bubblewrap control refused startup with zero turns and zero API duration. Status commands, schema generation and process controls sent no prompts. No helper/reviewer agents, Paseo operations, sign-ins, product changes, commits, pushes or copy-review server were used.
10
11| Invocation | Result |
12| --- | --- |
13| Claude 1, shared network | Native workspace Read succeeded; sentinel Read denied; the compound Bash command was refused before execution. Not shell-sandbox proof. |
14| Claude 2, shared network | A fixed read script ran in Claude's own sandbox. Workspace readable; sentinel absent; sandbox marker present. |
15| Codex 1, shared network | App-server initialized and completed a turn, but shell execution failed because the separately packaged code-mode host was not mounted. Not tool-isolation proof. |
16| Codex 2, private network | Matching code-mode host mounted; app-server profile observed; shell output visible and sentinel denied. |
17| Claude 3, private network | Native and shell workspace reads succeeded; native sentinel denied and shell sentinel absent. |
18| Claude dependency control, private network without API relay | Hide inner bwrap executable: process exited 1 before any model turn. |
19
20An earlier app-server **control connection**, before the first Codex turn, stalled because the temporary Python reader mixed buffered text reads with `select`. It was stopped without a prompt. A queue-backed reader fixed the test harness; this was not a provider protocol failure. The successful run's sent RPCs are retained below.
21
22## Mounts, identity and versions
23
24The scratch root was `/home/paulca/.cache/tmp/equipo-bwrap-juGSFQ`, under the on-disk `$TMPDIR`. The throwaway workspace was not this project. Two private scratch runtime homes were mounted separately at `/home/runner/.claude` and `/home/runner/.codex`. Only the selected credential file was bind-mounted read-only from its source; credentials were neither printed nor copied. Claude's nonsecret `oauthAccount` metadata was staged from the selected home's `.claude.json` to permit its identity-status check. No shared settings/history/plugin symlinks were imported.
25
26Sources were `/home/paulca/.paseo/zerosub/homes/claude-2b21c7944303/.credentials.json` and `/home/paulca/.codex/auth.json`. Reading the explicitly named Claude source does not involve Paseo. The two known exhausted Claude homes were not tried again. No failover occurred.
27
28```text
29$ hostname
30DOCS-T1
31$ bwrap --version
32bubblewrap 0.11.0
33$ claude --version
342.1.312 (Claude Code)
35$ codex --version
36codex-cli 0.165.0
37```
38
39CLI-observed identities, before prompting:
40
41```json
42{"provider":"claude","loggedIn":true,"authMethod":"claude.ai","configDirectory":"/home/runner/.claude","email":"paul@rslw.com","subscriptionType":"max"}
43{"provider":"codex","account":{"type":"chatgpt","email":"paul@tito.io","planType":"promax"},"backendOrigin":"https://chatgpt.com","accountRoutingOverride":"NO_CONSTRAINT"}
44```
45
46Claude initially reported null email when only the credential file was mounted. After staging the matching identity metadata, `claude auth status --json` reported the email above. That status is local CLI account metadata, not a separately verified remote identity assertion. Codex `account/read` returned its account and routing. Production must lock the selected binding and reject missing/mismatched identity or changed credential generations.
47
48The only visible home in each non-model mount control was `runner`; its contents were just the selected `.claude` or `.codex`. A marker written there appeared in the corresponding scratch home on the host. `/home/paulca` remained absent. The host sentinel remained `equipo-outside-nonsecret` after both providers' denied reads. The credential sources were mounted read-only; all runtime writes stayed in scratch. `/etc` was read-only; `/etc/claude-code/CLAUDE.md` was present, but no managed settings JSON was found and `/etc/codex` was absent. This probe did not establish config exclusion merely by omitting the user home. Plan 2b controls and hashes managed files explicitly.
49
50Binary SHA-256 observations:
51
52```text
53bwrap 0dfa36b98ada69568aaaa741fe210d2150a1441433bd13c428137d6a972a959c
54claude 4f4178ce41d83e23341ebfbaecdbcf8ea6bf7baea0690025abe49eeec3a5d01d
55codex c06a67fd8ac76508dc78bd99ce20c9f317b8d568beda59485f3f4134df9962d5
56codex-code-mode-host 522935d4392ec9674fab60b239b5495992c6a93e4deb65113a216b6f5451ccd4
57```
58
59## Read-denial evidence
60
61Claude's supplied settings were:
62
63```json
64{"disableAllHooks": true, "enabledPlugins": {}, "sandbox": {"enabled": true, "failIfUnavailable": true, "allowUnsandboxedCommands": false, "autoAllowBashIfSandboxed": true, "filesystem": {"denyRead": ["/outside", "/home/runner/.claude", "/home/runner/.codex"]}}, "permissions": {"deny": ["Read(//outside/**)", "Read(//home/runner/.claude/**)", "Read(//home/runner/.codex/**)"], "allow": ["Read", "Bash"]}}
65```
66
67The final Claude turn returned these actual tool results, not only the assistant's conclusion:
68
69```text
70Read /workspace/inside.txt:
711 equipo-inside-readable
722
73Read /outside/sentinel.txt:
74<tool_use_error>File is in a directory that is denied by your permission settings.</tool_use_error>
75Bash python3 /control/read.py:
76/workspace/inside.txt: equipo-inside-readable
77/outside/sentinel.txt: [Errno 2] No such file or directory: '/outside/sentinel.txt'
78/proc/1/comm: 3
79sandbox_marker 1
80```
81
82The `3` comm value comes from Claude's inner namespace; it is not a host PID. The outer invocation used `--as-pid-1`. Claude completed with `is_error:false`, exit 0, session `024280d2-bf63-4699-a3f8-ad6cd49027ea`.
83
84The dependency control, with `/dev/null` mounted over the inner `/usr/bin/bwrap`, returned:
85
86```text
87exit 1
88result.subtype = error_during_execution
89result.is_error = true
90result.num_turns = 0
91result.duration_api_ms = 0
92result.total_cost_usd = 0
93Sandbox required but unavailable: sandbox is enabled but dependencies are missing: bubblewrap (bwrap) not installed
94```
95
96Codex's observed thread policy included:
97
98```json
99{"model":"gpt-6-luna","modelProvider":"openai","approvalPolicy":"never","approvalsReviewer":"user","activePermissionProfile":{"id":"probe","extends":null},"runtimeWorkspaceRoots":["/workspace"]}
100```
101
102`config/read(includeLayers:true)` retained the exact configured profile. The server's legacy sandbox summary was `workspaceWrite` with network disabled; that summary alone does not represent deny entries. The app-server command item proved they took effect:
103
104```text
105item.type = commandExecution
106item.status = completed
107item.aggregatedOutput =
108 equipo-inside-readable
109 cat: /outside/sentinel.txt: Permission denied
110 namespace-init=codex
111item.exitCode = 0
112turn.status = completed
113```
114
115Exit 0 came from the final `cat /proc/1/comm`; the earlier denied `cat` is established by its output. Do not infer every command succeeded from the compound command's exit. Thread: `01a1a062-6ef2-7920-a32c-6e934356bb4b`; turn: `01a1a062-6f5d-7b53-95aa-95047f82baf3`.
116
117Codex emitted cumulative input/output totals 14,054/96, then 28,254/142. Final `last` was 14,200/46, only the final model request. This corroborates the prior probe's requirement to journal per-session totals and derive per-turn deltas.
118
119## Lifetime and escape controls
120
121A non-model Python command ran as namespace init under the same outer containment flags, with private network enabled. It started a detached `setsid sleep 600`, a double-forked sleeper and a child that attempted a cgroup migration. The observer took the host init PID from bubblewrap's JSON status FD, opened PID descriptors for the exact namespace members, killed the init through its PID descriptor and polled those descriptors for exit. Namespace membership enumeration was test instrumentation, not the proposed production containment gate.
122
123```text
124init 1
125/run/user/1001/bus False
126/run/user/1001/systemd/private False
127/home/paulca False
128.ssh False
129/proc/1/root/home/paulca False
130/sys/fs/cgroup False
131homes ['runner']
132namespace pid:[4026532762]
133members [(2083869, 'python3'), (2083903, 'sleep'), (2083905, 'python3'),
134 (2083906, 'python3'), (2083908, 'python3')]
135migration attempt: [Errno 2] No such file or directory: '/sys/fs/cgroup/cgroup.procs'
136bwrap exit 137 all pidfds exited True count 5
137```
138
139The exact host observation and kill code, after the recorded control launch, was:
140
141```python
142stat=[json.loads(l) for l in (P/'control-status.json').read_text().splitlines()];init=stat[0]['child-pid']
143ns=os.readlink('/proc/'+str(init)+'/ns/pid'); members=[];fds=[]
144for path in pathlib.Path('/proc').glob('[0-9]*'):
145 try:
146 if os.readlink(path/'ns/pid')==ns:
147 pid=int(path.name);fds.append(os.pidfd_open(pid));members.append((pid,(path/'comm').read_text().strip()))
148 except OSError:pass
149print('namespace',ns,'members',members,flush=True)
150print('migration attempt:',(P/'repo/cgroup.txt').read_text(),flush=True)
151signal.pidfd_send_signal(fds[[x[0] for x in members].index(init)],signal.SIGKILL)
152p.wait(10)
153poll=select.poll()
154for fd in fds:poll.register(fd,select.POLLIN)
155ready=set();deadline=time.time()+5
156while len(ready)<len(fds) and time.time()<deadline:ready.update(fd for fd,ev in poll.poll(100))
157print('bwrap exit',p.returncode,'all pidfds exited',len(ready)==len(fds),'count',len(ready),flush=True)
158for fd in fds:os.close(fd)
159```
160
161The migration was refused because no cgroup filesystem was exposed. The process that attempted it was still present before the kill and was included in the exit checks. This test did not move a process into another user's cgroup. Detached descendants were terminated even when reparented to namespace init; no process-group assumption was used. Some observed members were already zombies; readable PID descriptors establish exit, not necessarily that the host has reaped every zombie immediately.
162
163For network reachability, the host controller bound its own temporary listener to `127.0.0.1` on an ephemeral port and ran `socket.connect_ex` inside each configuration:
164
165```text
166network-shared exit 0
167network-shared 0
168network-private exit 0
169network-private 111
170```
171
172`0` means reachable; `111` is connection refused. The final provider launches therefore added `--unshare-net`. A fixed socat process inside the namespace bound only its private `127.0.0.1:18080` and forwarded to an explicitly mounted Unix socket. The host-side CONNECT proxy allowed only exact named public provider destinations on port 443. Successful Codex traffic used `chatgpt.com`; successful Claude traffic used `api.anthropic.com`. Claude's optional `http-intake.logs.us5.datadoghq.com` connection was denied and the turn still completed.
173
174The tested proxy allowlist also contained `claude.ai`, `platform.claude.com`, `api.openai.com` and `auth.openai.com`; those were not needed in the successful turns. Plan 2b starts from the observed minimum and separately tests refresh needs. The probe proxy is a disposable feasibility helper, not production code: its full limits, concurrent cleanup, abstract-socket controls and malicious CONNECT parsing need the plan's tests. No claim of universal network non-reachability is made: the named provider endpoints are deliberately reachable. Host service sockets/paths were absent and the owned host-loopback control was unreachable.
175
176## Commands and helper inputs
177
178The following are the recorded argument arrays rendered with shell quoting. All stdout and stderr were captured separately under the scratch root. Private-network runs started `proxy.start(P/'egress/proxy.sock')` in the controller before launch and called `shutdown()`/`server_close()` afterward. The proxy helper and namespace helpers are included below so the bind targets and commands are inspectable after scratch cleanup.
179
180The temporary directories were `repo`, `outside`, `claude-home`, `codex-home`, `tmp`, `control` and `egress`. `repo/inside.txt` held `equipo-inside-readable`; `outside/sentinel.txt` held `equipo-outside-nonsecret`. `codex-home/config.toml` was empty. `empty.json` contained `{"mcpServers":{}}`. Claude's staged `.claude.json` contained only the source `oauthAccount` object and `hasCompletedOnboarding:true`.
181
182### claude-identity
183
184```sh
185/usr/bin/bwrap --unshare-pid --unshare-ipc --unshare-uts --unshare-cgroup --die-with-parent --new-session --as-pid-1 --cap-drop ALL --ro-bind /usr /usr --ro-bind /etc /etc --symlink usr/bin /bin --symlink usr/lib /lib --symlink usr/lib64 /lib64 --proc /proc --dev /dev --dir /run --dir /sys --dir /home/runner --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/tmp /tmp --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/repo /workspace --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/outside /outside --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/control /control --chdir /workspace --clearenv --setenv PATH /usr/bin:/bin:/opt --setenv HOME /home/runner --setenv TMPDIR /tmp --setenv LANG C.UTF-8 --ro-bind /home/paulca/.local/share/claude/versions/2.1.312 /opt/claude --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/claude-home /home/runner/.claude --ro-bind /home/paulca/.paseo/zerosub/homes/claude-2b21c7944303/.credentials.json /home/runner/.claude/.credentials.json --setenv CLAUDE_CONFIG_DIR /home/runner/.claude --setenv CLAUDE_SECURESTORAGE_CONFIG_DIR /home/runner/.claude --setenv CLAUDE_TMPDIR /tmp --setenv CLAUDE_CODE_DISABLE_AUTO_UPDATE 1 --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/claude.json /config/claude.json --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/empty.json /config/mcp.json /opt/claude auth status --json
186```
187
188### codex-identity
189
190```sh
191/usr/bin/bwrap --unshare-pid --unshare-ipc --unshare-uts --unshare-cgroup --die-with-parent --new-session --as-pid-1 --cap-drop ALL --ro-bind /usr /usr --ro-bind /etc /etc --symlink usr/bin /bin --symlink usr/lib /lib --symlink usr/lib64 /lib64 --proc /proc --dev /dev --dir /run --dir /sys --dir /home/runner --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/tmp /tmp --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/repo /workspace --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/outside /outside --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/control /control --chdir /workspace --clearenv --setenv PATH /usr/bin:/bin:/opt --setenv HOME /home/runner --setenv TMPDIR /tmp --setenv LANG C.UTF-8 --ro-bind /home/paulca/.codex/packages/standalone/releases/0.165.0-x86_64-unknown-linux-musl/bin/codex /opt/codex --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/codex-home /home/runner/.codex --ro-bind /home/paulca/.codex/auth.json /home/runner/.codex/auth.json --setenv CODEX_HOME /home/runner/.codex /opt/codex login status
192```
193
194### claude-turn
195
196```sh
197/usr/bin/bwrap --unshare-pid --unshare-ipc --unshare-uts --unshare-cgroup --die-with-parent --new-session --as-pid-1 --cap-drop ALL --ro-bind /usr /usr --ro-bind /etc /etc --symlink usr/bin /bin --symlink usr/lib /lib --symlink usr/lib64 /lib64 --proc /proc --dev /dev --dir /run --dir /sys --dir /home/runner --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/tmp /tmp --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/repo /workspace --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/outside /outside --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/control /control --chdir /workspace --clearenv --setenv PATH /usr/bin:/bin:/opt --setenv HOME /home/runner --setenv TMPDIR /tmp --setenv LANG C.UTF-8 --ro-bind /home/paulca/.local/share/claude/versions/2.1.312 /opt/claude --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/claude-home /home/runner/.claude --ro-bind /home/paulca/.paseo/zerosub/homes/claude-2b21c7944303/.credentials.json /home/runner/.claude/.credentials.json --setenv CLAUDE_CONFIG_DIR /home/runner/.claude --setenv CLAUDE_SECURESTORAGE_CONFIG_DIR /home/runner/.claude --setenv CLAUDE_TMPDIR /tmp --setenv CLAUDE_CODE_DISABLE_AUTO_UPDATE 1 --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/claude.json /config/claude.json --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/empty.json /config/mcp.json /opt/claude -p --verbose --output-format stream-json --model claude-haiku-4-5 --effort low --setting-sources '' --disable-slash-commands --strict-mcp-config --mcp-config /config/mcp.json --tools Read,Bash --settings /config/claude.json 'Do only these checks, no skills or agents. Use Read on /workspace/inside.txt then /outside/sentinel.txt. Then use Bash exactly once: cat /workspace/inside.txt; cat /outside/sentinel.txt; printf "namespace-init="; cat /proc/1/comm . End the command at comm without the dot. Report actual results briefly. Do not bypass any denial.'
198```
199
200### claude-shell
201
202```sh
203/usr/bin/bwrap --unshare-pid --unshare-ipc --unshare-uts --unshare-cgroup --die-with-parent --new-session --as-pid-1 --cap-drop ALL --ro-bind /usr /usr --ro-bind /etc /etc --symlink usr/bin /bin --symlink usr/lib /lib --symlink usr/lib64 /lib64 --proc /proc --dev /dev --dir /run --dir /sys --dir /home/runner --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/tmp /tmp --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/repo /workspace --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/outside /outside --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/control /control --chdir /workspace --clearenv --setenv PATH /usr/bin:/bin:/opt --setenv HOME /home/runner --setenv TMPDIR /tmp --setenv LANG C.UTF-8 --ro-bind /home/paulca/.local/share/claude/versions/2.1.312 /opt/claude --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/claude-home /home/runner/.claude --ro-bind /home/paulca/.paseo/zerosub/homes/claude-2b21c7944303/.credentials.json /home/runner/.claude/.credentials.json --setenv CLAUDE_CONFIG_DIR /home/runner/.claude --setenv CLAUDE_SECURESTORAGE_CONFIG_DIR /home/runner/.claude --setenv CLAUDE_TMPDIR /tmp --setenv CLAUDE_CODE_DISABLE_AUTO_UPDATE 1 --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/claude.json /config/claude.json --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/empty.json /config/mcp.json /opt/claude -p --verbose --debug-file /tmp/claude-debug.txt --output-format stream-json --model claude-haiku-4-5 --effort low --setting-sources '' --disable-slash-commands --strict-mcp-config --mcp-config /config/mcp.json --tools Bash --settings /config/claude.json 'Run Bash exactly once: python3 /control/read.py . End at .py without the final dot. This is a disposable read-isolation check. No skills or agents, no other actions, do not bypass a denial. Report tool output.'
204```
205
206### codex-app
207
208```sh
209/usr/bin/bwrap --unshare-pid --unshare-ipc --unshare-uts --unshare-cgroup --die-with-parent --new-session --as-pid-1 --cap-drop ALL --ro-bind /usr /usr --ro-bind /etc /etc --symlink usr/bin /bin --symlink usr/lib /lib --symlink usr/lib64 /lib64 --proc /proc --dev /dev --dir /run --dir /sys --dir /home/runner --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/tmp /tmp --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/repo /workspace --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/outside /outside --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/control /control --chdir /workspace --clearenv --setenv PATH /usr/bin:/bin:/opt --setenv HOME /home/runner --setenv TMPDIR /tmp --setenv LANG C.UTF-8 --ro-bind /home/paulca/.codex/packages/standalone/releases/0.165.0-x86_64-unknown-linux-musl/bin/codex /opt/codex --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/codex-home /home/runner/.codex --ro-bind /home/paulca/.codex/auth.json /home/runner/.codex/auth.json --setenv CODEX_HOME /home/runner/.codex /opt/codex app-server --listen stdio:// -c 'model="gpt-6-luna"' -c 'model_reasoning_effort="low"' -c features.apps=false -c features.multi_agent=false -c 'approval_policy="never"' -c 'default_permissions="probe"' -c 'permissions.probe.filesystem={":root"="read","/workspace"="write","/outside"="deny","/home/runner/.codex"="deny"}' -c permissions.probe.network.enabled=false
210```
211
212### codex-private
213
214```sh
215/usr/bin/bwrap --unshare-pid --unshare-ipc --unshare-uts --unshare-cgroup --die-with-parent --new-session --as-pid-1 --cap-drop ALL --ro-bind /usr /usr --ro-bind /etc /etc --symlink usr/bin /bin --symlink usr/lib /lib --symlink usr/lib64 /lib64 --proc /proc --dev /dev --dir /run --dir /sys --dir /home/runner --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/tmp /tmp --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/repo /workspace --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/outside /outside --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/control /control --chdir /workspace --clearenv --setenv PATH /usr/bin:/bin:/opt --setenv HOME /home/runner --setenv TMPDIR /tmp --setenv LANG C.UTF-8 --unshare-net --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/egress /egress --setenv HTTPS_PROXY http://127.0.0.1:18080 --setenv HTTP_PROXY http://127.0.0.1:18080 --setenv https_proxy http://127.0.0.1:18080 --ro-bind /home/paulca/.codex/packages/standalone/releases/0.165.0-x86_64-unknown-linux-musl/bin/codex /opt/codex --ro-bind /home/paulca/.codex/packages/standalone/releases/0.165.0-x86_64-unknown-linux-musl/bin/codex-code-mode-host /opt/codex-code-mode-host --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/codex-home /home/runner/.codex --ro-bind /home/paulca/.codex/auth.json /home/runner/.codex/auth.json --setenv CODEX_HOME /home/runner/.codex /usr/bin/python3 /control/exec_proxy.py /opt/codex app-server --listen stdio:// -c 'model="gpt-6-luna"' -c 'model_reasoning_effort="low"' -c features.apps=false -c features.multi_agent=false -c 'approval_policy="never"' -c 'default_permissions="probe"' -c 'permissions.probe.filesystem={":root"="read","/workspace"="write","/outside"="deny","/home/runner/.codex"="deny"}' -c permissions.probe.network.enabled=false
216```
217
218### claude-private
219
220```sh
221/usr/bin/bwrap --unshare-pid --unshare-ipc --unshare-uts --unshare-cgroup --die-with-parent --new-session --as-pid-1 --cap-drop ALL --ro-bind /usr /usr --ro-bind /etc /etc --symlink usr/bin /bin --symlink usr/lib /lib --symlink usr/lib64 /lib64 --proc /proc --dev /dev --dir /run --dir /sys --dir /home/runner --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/tmp /tmp --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/repo /workspace --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/outside /outside --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/control /control --chdir /workspace --clearenv --setenv PATH /usr/bin:/bin:/opt --setenv HOME /home/runner --setenv TMPDIR /tmp --setenv LANG C.UTF-8 --unshare-net --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/egress /egress --setenv HTTPS_PROXY http://127.0.0.1:18080 --setenv HTTP_PROXY http://127.0.0.1:18080 --setenv https_proxy http://127.0.0.1:18080 --ro-bind /home/paulca/.local/share/claude/versions/2.1.312 /opt/claude --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/claude-home /home/runner/.claude --ro-bind /home/paulca/.paseo/zerosub/homes/claude-2b21c7944303/.credentials.json /home/runner/.claude/.credentials.json --setenv CLAUDE_CONFIG_DIR /home/runner/.claude --setenv CLAUDE_SECURESTORAGE_CONFIG_DIR /home/runner/.claude --setenv CLAUDE_TMPDIR /tmp --setenv CLAUDE_CODE_DISABLE_AUTO_UPDATE 1 --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/claude.json /config/claude.json --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/empty.json /config/mcp.json /usr/bin/python3 /control/exec_proxy.py /opt/claude -p --verbose --output-format stream-json --model claude-haiku-4-5 --effort low --setting-sources '' --disable-slash-commands --strict-mcp-config --mcp-config /config/mcp.json --tools Read,Bash --settings /config/claude.json 'Do only these checks, no skills or agents. Use Read on /workspace/inside.txt then /outside/sentinel.txt. Then use Bash exactly once: python3 /control/read.py . End at .py without the final dot. Report actual output briefly. Do not bypass denials.'
222```
223
224### claude-missing-bwrap
225
226```sh
227/usr/bin/bwrap --unshare-pid --unshare-ipc --unshare-uts --unshare-cgroup --die-with-parent --new-session --as-pid-1 --cap-drop ALL --ro-bind /usr /usr --ro-bind /etc /etc --symlink usr/bin /bin --symlink usr/lib /lib --symlink usr/lib64 /lib64 --proc /proc --dev /dev --dir /run --dir /sys --dir /home/runner --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/tmp /tmp --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/repo /workspace --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/outside /outside --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/control /control --chdir /workspace --clearenv --setenv PATH /usr/bin:/bin:/opt --setenv HOME /home/runner --setenv TMPDIR /tmp --setenv LANG C.UTF-8 --unshare-net --ro-bind /home/paulca/.local/share/claude/versions/2.1.312 /opt/claude --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/claude-home /home/runner/.claude --ro-bind /home/paulca/.paseo/zerosub/homes/claude-2b21c7944303/.credentials.json /home/runner/.claude/.credentials.json --setenv CLAUDE_CONFIG_DIR /home/runner/.claude --setenv CLAUDE_SECURESTORAGE_CONFIG_DIR /home/runner/.claude --setenv CLAUDE_TMPDIR /tmp --setenv CLAUDE_CODE_DISABLE_AUTO_UPDATE 1 --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/claude.json /config/claude.json --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/empty.json /config/mcp.json --ro-bind /dev/null /usr/bin/bwrap /opt/claude -p --verbose --output-format stream-json --model claude-haiku-4-5 --effort low --setting-sources '' --disable-slash-commands --strict-mcp-config --mcp-config /config/mcp.json --tools Bash --settings /config/claude.json 'Reply with ok.'
228```
229
230### control
231
232```sh
233/usr/bin/bwrap --unshare-pid --unshare-ipc --unshare-uts --unshare-cgroup --die-with-parent --new-session --as-pid-1 --cap-drop ALL --ro-bind /usr /usr --ro-bind /etc /etc --symlink usr/bin /bin --symlink usr/lib /lib --symlink usr/lib64 /lib64 --proc /proc --dev /dev --dir /run --dir /sys --dir /home/runner --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/tmp /tmp --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/repo /workspace --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/outside /outside --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/control /control --chdir /workspace --clearenv --setenv PATH /usr/bin:/bin:/opt --setenv HOME /home/runner --setenv TMPDIR /tmp --setenv LANG C.UTF-8 --unshare-net --json-status-fd 3 /usr/bin/python3 /control/children.py
234```
235
236### network-shared
237
238```sh
239/usr/bin/bwrap --unshare-pid --unshare-ipc --unshare-uts --unshare-cgroup --die-with-parent --new-session --as-pid-1 --cap-drop ALL --ro-bind /usr /usr --ro-bind /etc /etc --symlink usr/bin /bin --symlink usr/lib /lib --symlink usr/lib64 /lib64 --proc /proc --dev /dev --dir /run --dir /sys --dir /home/runner --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/tmp /tmp --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/repo /workspace --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/outside /outside --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/control /control --chdir /workspace --clearenv --setenv PATH /usr/bin:/bin:/opt --setenv HOME /home/runner --setenv TMPDIR /tmp --setenv LANG C.UTF-8 /usr/bin/python3 -c 'import socket; s=socket.socket(); s.settimeout(1); print(s.connect_ex(("127.0.0.1",58005)))'
240```
241
242### network-private
243
244```sh
245/usr/bin/bwrap --unshare-pid --unshare-ipc --unshare-uts --unshare-cgroup --die-with-parent --new-session --as-pid-1 --cap-drop ALL --ro-bind /usr /usr --ro-bind /etc /etc --symlink usr/bin /bin --symlink usr/lib /lib --symlink usr/lib64 /lib64 --proc /proc --dev /dev --dir /run --dir /sys --dir /home/runner --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/tmp /tmp --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/repo /workspace --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/outside /outside --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/control /control --chdir /workspace --clearenv --setenv PATH /usr/bin:/bin:/opt --setenv HOME /home/runner --setenv TMPDIR /tmp --setenv LANG C.UTF-8 --unshare-net /usr/bin/python3 -c 'import socket; s=socket.socket(); s.settimeout(1); print(s.connect_ex(("127.0.0.1",58005)))'
246```
247
248### claude-home-control
249
250```sh
251/usr/bin/bwrap --unshare-pid --unshare-ipc --unshare-uts --unshare-cgroup --die-with-parent --new-session --as-pid-1 --cap-drop ALL --ro-bind /usr /usr --ro-bind /etc /etc --symlink usr/bin /bin --symlink usr/lib /lib --symlink usr/lib64 /lib64 --proc /proc --dev /dev --dir /run --dir /sys --dir /home/runner --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/tmp /tmp --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/repo /workspace --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/outside /outside --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/control /control --chdir /workspace --clearenv --setenv PATH /usr/bin:/bin:/opt --setenv HOME /home/runner --setenv TMPDIR /tmp --setenv LANG C.UTF-8 --unshare-net --ro-bind /home/paulca/.local/share/claude/versions/2.1.312 /opt/claude --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/claude-home /home/runner/.claude --ro-bind /home/paulca/.paseo/zerosub/homes/claude-2b21c7944303/.credentials.json /home/runner/.claude/.credentials.json --setenv CLAUDE_CONFIG_DIR /home/runner/.claude --setenv CLAUDE_SECURESTORAGE_CONFIG_DIR /home/runner/.claude --setenv CLAUDE_TMPDIR /tmp --setenv CLAUDE_CODE_DISABLE_AUTO_UPDATE 1 --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/claude.json /config/claude.json --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/empty.json /config/mcp.json /usr/bin/python3 -c 'import pathlib,os; p=pathlib.Path("/home/runner/.claude/mount-marker"); p.write_text("owned-scratch"); print("home",os.listdir("/home")); print("runner",os.listdir("/home/runner")); print("other-home",pathlib.Path("/home/paulca").exists()); print("managed",pathlib.Path("/etc/claude-code").exists(),pathlib.Path("/etc/codex").exists())'
252```
253
254### codex-home-control
255
256```sh
257/usr/bin/bwrap --unshare-pid --unshare-ipc --unshare-uts --unshare-cgroup --die-with-parent --new-session --as-pid-1 --cap-drop ALL --ro-bind /usr /usr --ro-bind /etc /etc --symlink usr/bin /bin --symlink usr/lib /lib --symlink usr/lib64 /lib64 --proc /proc --dev /dev --dir /run --dir /sys --dir /home/runner --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/tmp /tmp --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/repo /workspace --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/outside /outside --ro-bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/control /control --chdir /workspace --clearenv --setenv PATH /usr/bin:/bin:/opt --setenv HOME /home/runner --setenv TMPDIR /tmp --setenv LANG C.UTF-8 --unshare-net --ro-bind /home/paulca/.codex/packages/standalone/releases/0.165.0-x86_64-unknown-linux-musl/bin/codex /opt/codex --ro-bind /home/paulca/.codex/packages/standalone/releases/0.165.0-x86_64-unknown-linux-musl/bin/codex-code-mode-host /opt/codex-code-mode-host --bind /home/paulca/.cache/tmp/equipo-bwrap-juGSFQ/codex-home /home/runner/.codex --ro-bind /home/paulca/.codex/auth.json /home/runner/.codex/auth.json --setenv CODEX_HOME /home/runner/.codex /usr/bin/python3 -c 'import pathlib,os; p=pathlib.Path("/home/runner/.codex/mount-marker"); p.write_text("owned-scratch"); print("home",os.listdir("/home")); print("runner",os.listdir("/home/runner")); print("other-home",pathlib.Path("/home/paulca").exists()); print("managed",pathlib.Path("/etc/claude-code").exists(),pathlib.Path("/etc/codex").exists())'
258```
259
260### Codex private-network RPC input
261
262No legacy sandbox field or exec-only `--ignore-user-config` flag was supplied. Only this one `turn/start` was sent on the successful private-network connection.
263
264```json
265{"id": 1, "method": "initialize", "params": {"clientInfo": {"name": "equipo_bwrap_probe", "version": "1"}, "capabilities": {"experimentalApi": true}}}
266{"method": "initialized", "params": {}}
267{"id": 2, "method": "account/read", "params": {"refreshToken": false}}
268{"id": 3, "method": "config/read", "params": {"cwd": "/workspace", "includeLayers": true}}
269{"id": 4, "method": "thread/start", "params": {"model": "gpt-6-luna", "cwd": "/workspace", "approvalPolicy": "never", "permissions": "probe", "developerInstructions": "Only perform the disposable probe. No skills or agents.", "historyMode": "legacy"}}
270{"id": 5, "method": "turn/start", "params": {"threadId": "01a1a062-6ef2-7920-a32c-6e934356bb4b", "input": [{"type": "text", "text": "Run exactly one shell command, no skills or agents: cat /workspace/inside.txt; cat /outside/sentinel.txt; printf \"namespace-init=\"; cat /proc/1/comm . End at comm without the final dot. Do not bypass denials. Report the tool results briefly."}], "effort": "low"}}
271```
272
273### control/read.py
274
275```python
276import os,pathlib
277for name in ['/workspace/inside.txt','/outside/sentinel.txt','/proc/1/comm']:
278 try: print(name+': '+pathlib.Path(name).read_text().strip())
279 except OSError as e: print(name+': '+str(e))
280print('sandbox_marker',os.getenv('SANDBOX_RUNTIME'))
281```
282
283### control/exec_proxy.py
284
285```python
286import subprocess,os,sys,time
287p=subprocess.Popen(['/usr/bin/socat','TCP-LISTEN:18080,bind=127.0.0.1,reuseaddr,fork','UNIX-CONNECT:/egress/proxy.sock'],stdin=subprocess.DEVNULL,stdout=subprocess.DEVNULL)
288time.sleep(.1)
289os.execv(sys.argv[1],sys.argv[1:])
290```
291
292### control/children.py
293
294```python
295import os,time,pathlib,json,subprocess
296print('init',os.getpid(),flush=True)
297subprocess.Popen(['/usr/bin/setsid','/usr/bin/sleep','600'],stdin=subprocess.DEVNULL,stdout=subprocess.DEVNULL,stderr=subprocess.DEVNULL)
298if os.fork()==0:
299 os.setsid()
300 if os.fork():os._exit(0)
301 pathlib.Path('/workspace/double.pid').write_text(str(os.getpid()))
302 time.sleep(600);os._exit(0)
303if os.fork()==0:
304 try:pathlib.Path('/sys/fs/cgroup/cgroup.procs').write_text(str(os.getpid()))
305 except OSError as e:pathlib.Path('/workspace/cgroup.txt').write_text(str(e))
306 pathlib.Path('/workspace/cgroup.pid').write_text(str(os.getpid()))
307 time.sleep(600);os._exit(0)
308for p in ['/run/user/1001/bus','/run/user/1001/systemd/private','/home/paulca','.ssh','/proc/1/root/home/paulca','/sys/fs/cgroup']:
309 print(p,os.path.exists(p),flush=True)
310print('homes',os.listdir('/home'),flush=True)
311while True:time.sleep(1)
312```
313
314### proxy.py
315
316```python
317import socket,socketserver,threading,select,pathlib,ipaddress
318class Handler(socketserver.BaseRequestHandler):
319 def handle(self):
320 r=self.request;r.settimeout(20);data=b''
321 while b'\r\n\r\n' not in data and len(data)<8192:
322 chunk=r.recv(1)
323 if not chunk:return
324 data+=chunk
325 try:
326 method,authority,version=data.split(b'\r\n',1)[0].decode().split(' ')
327 host,port=authority.rsplit(':',1)
328 allowed={'api.anthropic.com','claude.ai','platform.claude.com','chatgpt.com','api.openai.com','auth.openai.com'}
329 print('CONNECT',host,port,method=='CONNECT' and host in allowed and port=='443',flush=True)
330 if method!='CONNECT' or host not in allowed or port!='443':r.sendall(b'HTTP/1.1 403 Forbidden\r\n\r\n');return
331 addresses=socket.getaddrinfo(host,443,type=socket.SOCK_STREAM)
332 addresses=[a for a in addresses if ipaddress.ip_address(a[4][0]).is_global]
333 if not addresses:return
334 af,kind,proto,_,address=addresses[0]
335 with socket.socket(af,kind,proto) as upstream:
336 upstream.settimeout(20);upstream.connect(address)
337 r.sendall(b'HTTP/1.1 200 Connection established\r\n\r\n')
338 while True:
339 ready,_,_=select.select([r,upstream],[],[],30)
340 if not ready:return
341 for s in ready:
342 chunk=s.recv(65536)
343 if not chunk:return
344 (upstream if s is r else r).sendall(chunk)
345 except (OSError,ValueError):return
346class Server(socketserver.ThreadingUnixStreamServer):
347 daemon_threads=True
348
349def start(path):
350 srv=Server(str(path),Handler);t=threading.Thread(target=srv.serve_forever,daemon=True);t.start();return srv
351```
352
353## Source checks and limits
354
355The local `codex app-server generate-json-schema --experimental --out "$P/schema"` output defines `ThreadStartParams.permissions` as a named profile that cannot be combined with `sandbox`. Local CLI help confirms `--as-pid-1` suppresses bubblewrap's default init reaper; without it the harness would not itself be PID 1. The exact pinned runtime and actual events above take precedence over assumptions from newer documentation.
356
357Official references checked: [https://learn.chatgpt.com/docs/app-server](https://learn.chatgpt.com/docs/app-server) for stdio RPC lifecycle and approvals; [https://learn.chatgpt.com/docs/permissions](https://learn.chatgpt.com/docs/permissions) for permission profiles; [https://code.claude.com/docs/en/sandboxing](https://code.claude.com/docs/en/sandboxing) for the distinction between shell sandboxing and other tools. The observations above are local experimental results, not claims inferred from those pages.
358
359No complete crash/replay or per-run MCP/permission certification was attempted in this short check. Those remain explicit implementation tests. The nested sentinel was deliberately visible to the outer harness at `/outside`, so shell denial tests the inner policy rather than a missing outer bind. Production omits unrelated host trees entirely. Outer mounts by themselves cannot hide the selected login from the harness that needs it; removing the inner sandbox would require a different credential/tool boundary and would not be equivalent to the tested arrangement. No such fallback is needed here.
360
361## Cleanup and repository verification
362
363All prompted CLIs finished or had their exact owned outer wrapper killed and reaped. The containment fixture's PID descriptors all reported exit. Proxy listeners were shut down, namespace relay children died with init, and the owned loopback listener closed. Provider transcripts, generated schema, debug logs, marker files, private homes and helper scripts were confined to the scratch root and removed after this report was saved. The original credential files and shared provider configs were not edited. No provider session was created in the interactive homes, so no shared session index needed repair.
364
365Only this report and the implementation plan are new repository files. `git diff --check` and document structure/reference checks were run. Product tests and `make ci` were not run because no product code changed. This is feasibility evidence, not a claim that the future implementation's guard-mutation or release gates passed.
366