When a detached run compacts its own context, that is a reliable signal it has grown into the expensive long context shape. A hook counts compactions per background session in a small local database and stops the run after the second one. It reads the dispatch marker out of the durable transcript rather than trusting the working directory or the title, because compacted context is not a reliable place to keep a session’s own classification, and an interactive thread must never inherit the background cap. This does not make the work finish. It stops a run from grinding for days after it has lost the thread, which is the failure I actually kept paying for.