| title | Timeout wrapper for runaway agent children | ||||
|---|---|---|---|---|---|
| domain | ops | ||||
| tags |
|
||||
| status | published | ||||
| lang | en | ||||
| source | uncledad96-glitch | ||||
| created | 2026-07-23 | ||||
| updated | 2026-07-23 | ||||
| confidence | 0.9 |
Child python jobs run forever and pile up CPU.
No wall-clock limit around subprocesses.
timeout 120s python3 job.py || echo fail:$?import subprocess
subprocess.run(["python3","job.py"], timeout=120, check=False)timeout 1s sleep 5; echo exit:$? # 124- Prefer cooperative cancellation inside long loops.