CLAUDE.md: wait for jobs by PID, nohup note

This commit is contained in:
Kral
2026-10-02 21:55:02 +02:00
parent 1c6c85492e
commit 15eb9f1bb2

View File

@@ -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 <PID> 2>/dev/null; do sleep 60; done`.
Do NOT use `pgrep -f <pattern>` 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.<module>` (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