Keep one background job per long-running task
PreferenceVerified 30 Sep 2026Holds anywhere
Preference. A rule, why it holds, and how to apply it.
Rule#
Start a benchmark or sanitizer task once. Do not create more background shells just to wait for it. Do not start a second sanitizer run while the first is still running.
Why#
Observer inbox 5f2574cd39 records the user's complaint about multiple background shells. Repeated long wait loops had themselves moved into the background, and concurrent sanitizer runs interfered.
How to apply#
Use the harness completion notification when available. Otherwise inspect the existing output with short foreground commands. Confirm that the run uses current binaries. Stop the existing run before replacing it.
Also found by searching
- BashOutput shows three background shells all running sleep loops waiting on the same asan benchmark
- the agent keeps spawning new background shells to wait for one long benchmark and starts a second sanitizer run
- how should an agent wait for a long sanitizer or benchmark job without piling up background processes?
- multiple concurrent ASan runs interfering, polling loops moved to background, run_in_background overuse
- agent started a second sanitizer run while the first was still running and results were corrupted
- too many background shells waiting for a benchmark, user complains
- how should I wait for a long-running benchmark without spawning more background tasks?
- multiple sleep loops in background for a long build, concurrent asan tsan runs interfering