You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#860 fixed the classification that kept --auto-wait (#804) inert, and recorded an explicit decision (docs/investigations/auto-wait-vs-halt-resume-860.md) to keep the in-process wait for now. That decision names two structural costs the in-process design cannot fix from inside:
A reboot or power loss kills the run and buys nothing. The claude subprocess died at the failure, so the wait only ever purchases resumption, not continuity — after a reboot the phase restarts from scratch anyway, minus the run, plus a stale lock.
Halt-and-resume inverts both: exit cleanly at the window halt, record when to come back, and let re-entry (cheap since #837 skips completed issues) continue the run.
Re-entry bound — a counter mirroring AUTO_WAIT_MAX_WAITS so a window that never reopens cannot ping-pong a scheduler.
Scheduler recipe — ~20 documented lines of launchd/cron invoking the re-entry command; no daemon inside sequant.
Relationship to --auto-wait
Not a replacement initially. --auto-wait stays for the attended/overnight-laptop case (context preserved in memory, zero infrastructure). This issue serves the unattended case where reboot survival and lock release matter. If it proves strictly better in practice, deprecating the in-process wait is a later, separate decision.
Motivation
#860 fixed the classification that kept
--auto-wait(#804) inert, and recorded an explicit decision (docs/investigations/auto-wait-vs-halt-resume-860.md) to keep the in-process wait for now. That decision names two structural costs the in-process design cannot fix from inside:locks clearor 6h age-based recovery.claudesubprocess died at the failure, so the wait only ever purchases resumption, not continuity — after a reboot the phase restarts from scratch anyway, minus the run, plus a stale lock.Halt-and-resume inverts both: exit cleanly at the window halt, record when to come back, and let re-entry (cheap since #837 skips completed issues) continue the run.
Proposed shape (from the #860 decision record)
resumeAtin issue state — written at the billing/window fail-fast (fix(run): -Q quality loop retries after an "Out of credits" exec instead of failing fast (billing cascades into "unparseable verdict") #799 path) when the payload carries a waitable window (isWaitableWindow, Five-hour window exhaustion is misclassified as terminal billing, so --auto-wait is inert on subscription plans #860). Machine-readable;sequant statusshows "resumable at 07:00" instead of a bare failure.sequant run --resume(or equivalent) that no-ops untilresumeAt, then re-runs the halted issues, leaning on fix(chain): --chain --ready-gate resume re-executes already-gated links (COMPLETED_STATUSES misses waiting_for_human_merge/blocked) #837's completed-issue skipping.AUTO_WAIT_MAX_WAITSso a window that never reopens cannot ping-pong a scheduler.launchd/cron invoking the re-entry command; no daemon inside sequant.Relationship to
--auto-waitNot a replacement initially.
--auto-waitstays for the attended/overnight-laptop case (context preserved in memory, zero infrastructure). This issue serves the unattended case where reboot survival and lock release matter. If it proves strictly better in practice, deprecating the in-process wait is a later, separate decision.Acceptance criteria
resumeAtto issue state and releases the per-issue lock before exiting.resumeAt, and afterresumeAtcontinues the halted issue without re-running issues already completed (fix(chain): --chain --ready-gate resume re-executes already-gated links (COMPLETED_STATUSES misses waiting_for_human_merge/blocked) #837 behavior).resumeAt, no lock is held, and re-entry proceeds normally.launchd/cron recipe for the re-entry command.References
docs/investigations/auto-wait-vs-halt-resume-860.md--auto-wait), fix(chain): --chain --ready-gate resume re-executes already-gated links (COMPLETED_STATUSES misses waiting_for_human_merge/blocked) #837 (resume skips completed issues), Nested phase claude that hangs after its turn is killed at ~106s, taking down the parent sequant run #856 (stale-lock/PID-recycling hazard), fix(run): -Q quality loop retries after an "Out of credits" exec instead of failing fast (billing cascades into "unparseable verdict") #799 (billing fail-fast)