oliver-zehentleitner / maity
[runner-stability] Codex in a runner placement on oliver-pc01-l cannot run any command (sandbox denies the codex binary)
tsk-hv7jbgy75zjt Done An agent
Codex smoke test on 2026-11-18 ~12:23Z (ops 3yc2, seq 160979), maity 0.1.0a15, runner oliver-pc01-l, placement plc-5w6065pkg7ad (maity-review-codex-001). The session runs and the runner reports running, but Codex cannot run a single command. Its pane says the sandbox denied execution of the Codex binary before the shell launched (also with /bin/sh). Codex log: recorded sandbox violation: resource=filesystem backend=linux_sandbox reason=permission_denied path=unknown, once per attempt. As a result maity resume never runs, and no instance joins. Not instance_quota, not login, not yesterday's bwrap error (#1933 fix is in).
Suspicion (not reproduced): Codex runs every command through its codex-linux-sandbox helper under CODEX_HOME/tmp/arg0-linux/…. CODEX_HOME lies under ~/.local/state/maity-runner/agents/<plc>/, and the runner's profile hides ~/.local/state/maity-runner (= "none"). codex sandbox -- /bin/true with a hidden throwaway CODEX_HOME passes, so the interactive exec path may differ.
To do: compare with Codex on vm-aigents01, test CODEX_HOME outside the hidden state dir, reproduce the cause (a red test or a reproducible run), then the fix with a test and a changelog fragment. maity runner check should catch this case before a placement starts.
Notes
Lotse · Nov 18, 2026, 12:31 UTC
Additional finding (Oliver, 12:30Z): the dashboard shows the placement as
Reported running · since 7 min · generation 1, although the agent in it has never runmaity resumeand so has not arrived in the project. "Process alive" ≠ "agent working". Proposal for this card or a follow-up: a placement whose agent has not resumed/joined within N minutes of start is reported asdegraded("started, agent not reporting"), visible in the dashboard and inmaity runners, with a pointer to the pane. For 24/7 operation, monitoring needs exactly this difference.Mr. Robot · Nov 18, 2026, 15:23 UTC
Cause confirmed with one call (ops 3yc2, oliver-pc01-l, 2026-11-18 ~15:20Z, lotse's go 162847): the placement's `CODEX_HOME` lies inside a path its own sandbox profile hides.
- The test:
- Codex 0.170.0
codex exec, with a copy of plc-vsyxrcc68bqa'sconfig.toml: the samedefault_permissions = "maity"profile, approvalnever, including"/home/maity-runner/.local/state/maity-runner" = "none". auth.jsonwas linked as the runner does it. The only change was CODEX_HOME = a throwaway dir outside ~/.local/state/maity-runner (under ~/ops-workspace/tmp), with cwd a scratch dir.- Prompt: run
/bin/echo sandbox-ok . - Result: rc 0,
exec /bin/sh -c '/bin/echo sandbox-ok .' … succeeded, outputsandbox-ok ., 3,759 tokens. - The throwaway CODEX_HOME is deleted. The scratch cwd (
~/ops-workspace/tmp/codex-wd, only the run's stdout) is left, because a safety check refused its removal. - In the placement: CODEX_HOME =
~/.local/state/maity-runner/agents/<plc>/codex-home(set by the runner, adapters.pyhome = ctx.agent_dir / "codex-home"). Codex writes its exec helper there (codex-home/tmp/arg0-linux/codex-arg0*/codex-linux-sandbox, seen for both placements). It then runs every command through that helper, which sits under the hidden~/.local/state/maity-runner. Result: "the sandbox denied execution of the Codex binary", withrecorded sandbox violation: resource=filesystem … permission_denied path=unknown. Same on 0.169 and 0.170. - Hidden path:
"/home/maity-runner/.local/state/maity-runner" = "none", i.e. the runner'sstate_dirfromprivate_paths()(supervisor.py), which contains every placement's codex-home. - Fix candidates for the runner (ur6p):
- Place CODEX_HOME outside every hidden path. For example, per placement beside its scratch, or a dedicated agents-side dir that
private_paths()does not list. It must then not be readable by other placements; today's hiding of the state dir does that job. - Or keep it where it is and add a more specific rule for the placement's own codex-home (read and execute for
tmp/arg0-linux, write where Codex needs it). Not tested.
Candidate 1 is the one this test proves. Keep
auth.jsonout of the sandbox's reach as today.- Not established: why the earlier
codex sandbox -- /bin/truerepro with a hidden CODEX_HOME passed. Most likelycodex sandboxdoes not go through the arg0 helper.
Lotse · Nov 18, 2026, 15:27 UTC
Second case for "running, but the agent never arrives / is gone" (lotse, 15:27Z, reported by Oliver): maity-review-agy-001 (funj, vm-aigents01, plc-7g7wx5a38hry) offline since 07:38Z and maity-review-agy-004 (e4ek, PC, plc-6ee0m3w2nc1q) offline since 00:08Z, both with placement state
running. So the dashboard's "where they run" page shows green while the team page says offline. Restarted both at 15:27Z. Wanted: the runner/hub sees a placement whose session sends nothing for X minutes as degraded/stalled (and restarts it as for silence), instead of reportingrunning. agy-002/003 showawaybetween supervised runs. That's expected, but the dashboard could explain it ("between runs").Lotse · Nov 18, 2026, 15:30 UTC
Correction to nte-encbtqn6cavx (lotse): agy-001 (plc-7g7wx5a38hry) and agy-004 (plc-6ee0m3w2nc1q) are both in supervised mode. There a session runs only per event, so "offline since …" probably means only "no event/order since then", not a dead session. My restarts were harmless (generation 9 and 2). The real gap is the display: the team page shows supervised agents as offline/away, while "where they run" shows green. Wanted: show supervised placements as "idle between runs" (with the last run), and mark one as degraded only when an event arrived and no run followed.
Mr. Robot · Nov 19, 2026, 23:35 UTC
Lab, oliver-pc01-l, runner 0.1.0a16 (includes #1979, CODEX_HOME in the placement scratch), Codex 0.170.0: Codex commands run now. Seen on the sessions' screens (read-only
tmux capture-pane), 2026-11-19 ~23:35Z:- maity-review-codex-002 (plc-vsyxrcc68bqa, instance 69tu, started 23:16Z): ran
git ls-remote,maity wait,cp/python -cin the clone, and sent a realreview_result(APPROVE, PR #2013) to the lead, seq 172970. So exec,maityand sending all work. - maity-review-codex-001 (plc-n005mz3enyq4, instance 553b, started 23:24Z):
maity resumedone, now looping onmaity wait --timeout 55(exit 3 = timeout), as expected. - The older placement plc-5w6065pkg7ad (gen 2/3, never joined) was stopped by the hub at ~23:24Z and its scratch removed; the new placement replaced it, so the "never joined" of gen 2 is not reproduced on a16.
Still seen: codex's own network sandbox blocks
api.github.comand PyPI fetches (expected,network = []);maityrefuses a--body-fileunder the placement scratch path (the agent copied it into the clone first), worth a separate look.- maity-review-codex-002 (plc-vsyxrcc68bqa, instance 69tu, started 23:16Z): ran