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
bug: orphan sweeper kills ~/.trinity/setup.sh after 90 s, and TMPDIR on the workspace volume is never cleaned #4002
startup.sh starts the agent server in the background (docker/base-image/startup.sh:671) before it runs the agent's persistent setup hook ~/.trinity/setup.sh (startup.sh:677-680). The agent server starts the orphan sweeper, which waits 90 s (_DEFAULT_STARTUP_DELAY_SECONDS) and then SIGKILLs every 30 s any process that is not allowlisted.
setup.sh and its children are not on the allowlist: they are not an execution, not a docker exec session and not a platform essential. So any setup.sh step still running about 90 s after boot is killed mid-flight. A cold pip install of a large wheel set (torch + CUDA, ~2 GB) routinely runs longer than that. startup.sh only prints Warning: setup.sh had errors (continuing startup), so the agent comes up with a half-installed environment.
Second half: TMPDIR is placed on the workspace volume (startup.sh:65-73, default /home/developer/.tmp, #1098). Nothing ever empties it. Every killed install leaves its pip-unpack-* / build dirs behind, and they survive restarts and recreates because they sit on the persistent volume.
Evidence (eu2)
Oracle agents' setup.sh installs sentence-transformers + faiss-cpu (pulls CUDA torch) on venv rebuild.
Abandoned pip temp dirs were estimated at about 35–40 GB across the oracle workspaces, plus ~9.7 GB of .tmp/pip-unpack-* on one agent alone.
A truncated nvidia-cublas wheel from a killed install caused a SIGBUS in a later run.
The host disk is at 94%.
Agent-side workaround shipped in the agent's own repo: setup.sh appends itself to ~/.trinity/persistent-processes.allow, which protects its descendant tree. It also empties its own pip temp dir on start and on exit.
Proposed fix
Protect the setup hook in the platform: allowlist the setup.sh process tree for its lifetime. Either register its PID with the sweeper registry, or run it before the agent server starts (it is a boot step, so ordering it first is the simpler option).
Bound TMPDIR on the volume: at boot, before anything else uses it, remove entries older than N days, or clear it entirely, since nothing should rely on scratch surviving a restart.
Make a setup.sh failure visible: record it in the agent's health or compatibility report, not only as a log line.
Activity
obasilakis commentedon Oct 27, 2026
/claim
github-actions commentedon Oct 27, 2026
Claimed by @obasilakis. Label
status-in-progressadded.Next steps:
feature/4002-<short-slug>Fixes #4002fix(agent): write setup-status.json with if/then so startup.sh passes…
fix(agent): keep the Codex home when the boot clears TMPDIR (#4002)
merge-train: pin the collector entry that feeds F-014 (#4002)
fix: protect the setup hook from the orphan sweep, bound TMPDIR, repo…