oliver-zehentleitner / maity
runner: interactive Codex stops on its folder-trust prompt (Codex 0.169)
tsk-57nsjjddzk3s Done An agent
The runner gives a Codex placement its own CODEX_HOME and writes trust_level = "untrusted" for the clone on purpose, so the clone's .codex config cannot override the profile (cli/src/maity/runner/adapters.py around 546–548). Codex 0.169.0 in interactive mode now stops at start on a "Folder access / Open restricted" prompt for an untrusted folder. Nobody answers it, so the placement reports running while the agent never starts. Seen on OLIVER-PC01-L on 2026-11-17 (maity-ops-team#3yc2, seq 152553 and 152679).
Wanted:
- The interactive start answers or suppresses this prompt without trusting the clone's own config, for example through a config key or flag the runner sets, if Codex offers one.
- If nothing safe exists: refuse interactive Codex for such versions with a clear reason, and offer supervised.
checkand the start report a harness waiting on a first-run prompt, instead of running.- A test against the prompt's text or a version gate.
Notes
Lotse · Nov 17, 2026, 16:02 UTC
Second cause, supervised mode (maity-ops-team#3yc2, seq 152844): every
codex execrun fails on its first command. Codex 0.169's bwrap aborts with "Can't create file at …/.config/maity-runner/runner.toml: Read-only file system". The runner masks its own config file in the Codex profile ("…/runner.toml" = "none", fromprivate_paths(extra=…)in runner/supervisor.py), and bwrap cannot mask a single file under a read-only bind; directory entries work. It shows up in layoutsingle, where the runner's config lies in the agents' home. Fix: mask the directory, or mask files in a form bwrap can bind; add a test with a file entry under a read-only parent.Lotse · Nov 17, 2026, 23:47 UTC
#1933 description of record for head 1e171e4bf9f872601d3e13279975d7ca2b6c549f (GitHub body plus q445's replacement lines, 156779), part 1 of 2:
Card: tsk-57nsjjddzk3s
Two Codex start fixes for the same CLI release as #1928 and #1929.
Interactive Codex: the folder prompt. The runner marks the clone untrusted, so the clone's own
.codexconfiguration is not loaded. Codex 0.169 then asks about the folder at every interactive start ("Folder access"). Nobody answered, so the agent never started.- For
FOLDER_PROMPT_WITHIN(three minutes) after an interactive Codex start the runner made, the runner checks whether the pane shows "Folder access" and "Open restricted". If it does and nobody is attached, the runner presses Enter once and logs it. - "Open restricted" is the highlighted first choice. It keeps the folder untrusted and saves nothing (Codex 0.169.0, tui/src/onboarding).
- A folder prompt that offers "Trust and continue" is never answered. The log says the session waits on a first-run prompt. No idle line or key is sent while a folder prompt shows, also one that shows later.
- The pane's text is only matched (
Tmux.pane_has), never kept, logged or sent.
Supervised Codex: nested hidden paths. The Codex profile no longer lists a hidden path that another hidden path already covers (
adapters.outermost). Every hidden path stays hidden, and the home secrets are compared under the home resolved. Codex's bwrap cannot mount over such a path, so every command of a supervised run failed. Seen with:- the runner's configuration under
.config/maity-runnerin the layoutsingle; - another clone's credential under the workspaces root.
Single hidden files work and are unchanged (checked on an operator's PC with Codex 0.169.0 in round 1; not repeated on later heads).
Docs: cli/README.md (Codex) and docs/runners.md ("When an agent goes quiet"). Keep the Why: new decision
fea3c3a3, plus the index line. Changelog fragment added.Tests:
- test_supervisor:
- the prompt is answered once;
- a trusting prompt is never answered and logged once;
- nothing is pressed with a person attached or unknown, for another harness, or in supervised mode;
- nothing is pressed after the window.
Tmux.pane_hasrunscapture-pane.- Removing the call, or answering any folder prompt, turns the tests red.
- test_adapters: nested paths, including the workspaces pair. Red against main.
- For
Lotse · Nov 17, 2026, 23:47 UTC
#1933 description of record for head 1e171e4bf9f872601d3e13279975d7ca2b6c549f (GitHub body plus q445's replacement lines, 156779), part 2 of 2:
Fixes from review (rounds 1–7):
- Folder prompt: no idle line or key is sent while a folder prompt shows, also one that shows only later; once a person has answered it, the idle check runs as before. The log line and the docs say what the code does.
- Other clones' credentials: every deny on another clone's credential is kept on every target, the runner's own machine, the agents' user through sudo and an ssh host alike. On every target the other clones are listed as the runner's own side lists them, as the agents' user, and named in the form the clone's own path and the workspaces root's deny have, so the clone's own credential is never listed as another's.
- A start whose other clones cannot be checked completely is refused, on every target. The check uses only the tools every supported system has (GNU, BSD, macOS); it no longer needs an option some systems lack.
- Tests (cli/tests/test_antigravity.py, test_agent_user.py, test_ssh.py): the listing on all three kinds of target against the runner's own side, refusal where a place cannot be checked, names with a line break, a host whose standard tools take no extra options, and the clone's own credential. Each new test fails on the head before its fix.
Merges of main: b1b9fc38 (main 2911bee4) and 12af97db (main 87f67da6), both without conflicts;
git show --remerge-diffis empty for both.Ran at 1e171e4b: the affected CLI suites (test_antigravity, test_agent_user, test_ssh, test_supervisor, test_adapters) 628 passed, 13 failed, 2 skipped; full CLI suite at 12af97db 3022 passed, 13 failed, 15 skipped. The 13 failures (test_agent_user 5, test_ssh 1, test_supervisor::test_run_join_reads_the_real_clis_error_line 7) fail the same way in the author's environment on every tree; they were not checked on main, and both reviewers' runs of the affected suites at the final head pass. black, ruff, mypy clean; ktw-lint --strict (. and cli) 0/0; changelog check valid.
Overlap: cli/src/maity/runner/supervisor.py and cli/context/index.md with #1917; whichever merges later resolves it.
Lotse · Nov 17, 2026, 23:47 UTC
Correction to nte-kds7tbtpmpjd (q445 156780): the header reads only "Fixes from review:", without a round count.