diff --git a/CLAUDE.md b/CLAUDE.md index 33d5b08..d1c9384 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -38,6 +38,12 @@ Ask before an action that uses much cloud budget. (`harness/task.py`). Teardown after each run with the ADT deletion API (`adt_client.py`, credentials in `.env`). Delete only objects with a run prefix. Clean up probe objects. - The model never sees delete/teardown. The proxy (`proxy.py`) has a tool whitelist and hides other runs' objects. +- To wait for a background job, use its PID: `while kill -0 2>/dev/null; do sleep 60; done`. + Do NOT use `pgrep -f ` in the loop: it also finds the loop's own command line, so the loop never ends. + The process name of a module run is `Python -m harness.` (not `python3`); `pgrep -f "harness.pilot"` + without a loop gives the PID. +- Start long jobs with `nohup ... &` from a separate line after `cd` (a `cd ... && nohup ... &` chain runs + in a subshell; the commands after it do not see the new directory). ## 4. Layout