Repository navigation
Description
What happened
PR #92 gives every codex app-server session a private CODEX_HOME at $TMPDIR/hide-ai-codex-home-<owner pid>-<nanos> (hide-ai/src/codex.rs, CodexHome), and removes it in Drop.
The 2026-09-20 live verification of that PR showed two things the design did not account for:
- The directory is not "a symlink and nothing else" for long: within a second the app-server writes
installation_id,.sandbox_migration,models_cache.json(228 KB), five sqlite databases with WAL/shm files (state_5.sqlite-walalone 1.9 MB),shell_snapshots/,skills/andtmp/beside theauth.jsonsymlink. Measured 2.5 to 5 MB per session on codex-cli 0.155.1. Nosessions/rollout appears, so no transcript is left; the size is the point here, not privacy. - An owner that dies without running
Dropleaves all of it behind, and nothing sweeps it. On the verification machine two such directories from one dead pid (hide-ai-codex-home-71225-*, 3.0 MB and 2.9 MB) were already on disk before the run. The CI testkill_dash_nine_on_the_owner_leaves_no_survivorsperforms exactly that kill, so every run of the Rust test lane leaves one more.
docs/AI_PROVIDERS.md states the gap since #92 ("An owner that dies without running Drop ... leaves its directory behind, and nothing sweeps them yet").
What you expected
A resident process owns what it starts and releases it on every exit path, including the one where the owner itself is killed (engineering principle 14; oh-my-principle process practice).
The kill -9 path cannot run Drop, so the release has to happen from the next owner: when CodexAppServerBackend creates a new private home, it should remove sibling hide-ai-codex-home-<pid>-* directories whose <pid> is no longer alive (or is alive but is not a hide-ai process, since pids are reused).
A sweep bounded to that prefix under $TMPDIR keeps the blast radius to directories this crate named.
Log one structured line per removed directory (ai.codex_home.swept, with the dead pid and the byte count) so a leak that the sweep is cleaning every start is visible rather than silent.
Steps to reproduce
bash scripts/verify-cargo.sh test(runskill_dash_nine_on_the_owner_leaves_no_survivors).ls -d "$TMPDIR"/hide-ai-codex-home-*anddu -shthem: one 0700 directory per killed owner, with no live process of that pid.- Run
CODEX_HOME=$HOME/.codex HOME=$(mktemp -d) target/release/hide-agent-context-labels verify-provider --provider codex: a new home is created and removed, the stale ones stay.
Versions
- hide: main at a3d9bd2 (PR hide-ai owns the codex app-server and the label watcher exits with its host (issue #82 Part A) #92 merged 2026-09-20)
- codex-cli: 0.155.1
- macOS: 15.1 (Darwin 24.1.0)
Diagnostics
Tree and directory listings from the live run are in the local run directory agents/runs/ai-process-ownership/live-codex-verification/ (process-tree.txt, rerun.process-tree.txt); run artifacts are not committed.
Related: #82 (Part A landed in #92; this is a Part A follow-up, independent of the Part B broker work).
Activity
test: keep the terminal address whole on Linux and record why the Win…