Repository navigation
Description
Summary
Two exec phases in one sequant run finished their work (PR opened, final assistant message posted) 18 and 24 minutes before run.timeout, then sat idle until the timeout ended them. The run table reported both as ✘ failed · Out of credits, although the subscription window was open and a follow-up run executed normally minutes later. State was left at exec: failed with open, green PRs and no exec marker on the issue, so --resume would re-run exec.
Two separate problems:
- Phase-complete detection waits on process exit. A worker that has pushed, opened the PR and posted its final message is done, but the phase stays open until the Claude Code process exits or
run.timeoutfires. - A timeout is labelled with a stale rate-limit event. The driver retains any
rate_limit_eventwith billing markers (overageDisabledReason: out_of_credits, five-hour window, liveresetsAt) regardless of status (isRateLimitFailureInfo→hasBillingMarkers), andbillingHaltReasonthen names it as the cause of a later, unrelated failure. The run log'serrorContextcarried{category: billing, errorType: BillingError, errorMetadata: {rateLimitType: five_hour, overageDisabledReason: out_of_credits, resetsAt: …}}on a phase whose real end wasdurationSeconds ≈ 1803. The event'sstatusis not retained, so the log cannot show whether it wasallowed_warningorrejected.
Environment
- sequant 2.20.0, Claude Code driver,
--no-tui -v,--resume --concurrency 2, phasesspec,exec,qa,run.timeout1800 - macOS, Claude Max subscription (overage disabled)
- Next.js/TypeScript repo, three small issues, exec on Sonnet
Timeline (UTC, from the run log and the worker transcripts)
| Issue | exec start | PR opened + final message | phase end | idle |
|---|---|---|---|---|
| A | 01:32:21 | 01:37:53 | 02:02:25 (1803.9 s, "Out of credits") | 24 min |
| B | 01:51:14 | 02:03:36 | 02:21:17 (1802.8 s, "Out of credits") | 18 min |
- The third issue in the same run passed exec → qa normally (exec 2 min, qa 16 min).
- A one-word
claude -pprobe answered at 02:20, andsequant run A B --phases qaran and passed at 02:25–02:27, an hour before the recordedresetsAt. - Worker B had a 120 s
tsccommand that Claude Code moved to the background; its output file ends in[killed]stamped at the phase end, so that background task was alive at the kill. Worker A's background command had finished three minutes before its final message, so a lingering background task does not explain both. - Earlier timeouts in the same repo (four judgment issues on Opus, Oct 13–15) were a different shape: the worker was still active 1–5 min before the timeout and had no PR. Those were genuine time-outs.
Expected
- A phase whose worker has opened the PR and posted a final message completes when the stream yields the final result, or after a short grace period, not at
run.timeout. - A phase that ends by timeout is reported as
Timeout after 1800s(as the Oct 13–15 runs were) unless the captured rate-limit event hasstatus: rejected. RetainingstatusinerrorMetadatawould make this checkable after the fact. - On a timeout where the branch has a commit and an open PR, state should not be left as
exec: failedwithout an exec marker; at minimum the summary should say the PR exists.
Repro (best effort)
Run an exec phase on a subscription account that is near its five-hour cap with overage disabled (so a rate_limit_event with overageDisabledReason: out_of_credits is emitted during the session), with a worker that starts a long tsc/jest command that Claude Code moves to the background, and let the worker finish and open the PR. Observe whether the phase ends at the final message or at run.timeout, and what reason the run table prints.
Happy to attach the two run logs (with repo-specific paths redacted) on request.
Activity
admarble commentedon Nov 3, 2026
What happens
In a 42-run replay (sequant 2.20.0 at
31c6f8bd, Claude Code driver, defaults, no.sequant/settings.json, sophaseTimeout1,800 s), four exec phases ended at the timeout and the run table saidOut of credits. In three of the four, the next run on the same account started within a minute and ran normally (F4 → F5; FP → the next pilot run; F5 → nothing, it was the last); after F3 our batch sat stopped for three hours for a reason of our own, so that gap says nothing. The Claude Code transcripts of the four hold norate_limit_eventline; those transcripts may not record SDK stream events, so what the driver's stream carried is not visible to us.Evidence
Run log
phases[].durationSecondsand the stdout line, per run:durationSecondserrormodelin the run logOut of credits[10:09:44] ✘ #23 exec Out of creditsnull(spec phase:claude-fable-5-1)Out of credits[05:40:10] ✘ #112 exec Out of creditsnull(spec: Fable)e8ac387)Out of creditsnull(spec: Fable)Out of creditsnull(spec: Fable)All four durations are
phaseTimeout(1,800 s) plus about two seconds. The run log's execmodelisnullin each, because the driver reported nomodelUsagefor the aborted phase, so the record of which model ran exec is the transcript, not the log.Each exec transcript is active up to the cut. The last tool call before the kill: pilot FP 16:09:41Z against a kill at 16:09:44Z (a
jestrun); F3 11:40:03Z against 11:40:10Z; F4 15:17:30Z against 15:17:56Z; F5 15:56:59Z against 15:57:24Z. The longest idle before a kill is 26 s, which is a tool call still running, not a stalled agent. After the pilot's cut, a nativeclaude -prun on the same account started ten minutes later and completed. In the batch, the ten F runs onclaude-opus-5-5(#1143, #1144) never hit the timeout; of the five on Fable (#1153), three did (F3, F4, F5, $4.18 to $4.63 each by the SDK estimate, cut short) and the two that did not ran the quality loop twice each and cost $45.44 and $46.93.The mechanism matches the second problem in #1626:
buildStructuredError(drivers/claude-code.ts) prefers a retainedrateLimitInfoorbilling_errorover the abort, andrunRetryFallbacks(phase-executor.ts) then surfaces "the accurate structured message (e.g. "Out of credits")" and skips the retry. A phase that the executor's ownsetTimeoutaborted is reported as a billing failure.Ask
Beside #1626's asks: when the phase ended because
abortController.abort()fired from the timeout, label it as a timeout (Phase timed out after 1800 s) whatever the stream carried earlier, and record the cause in the run log'serrorContext. A replay or benchmark that reads the run table cannot otherwise tell a 30-minute task from an empty wallet.Why it matters
Three of these runs had committed and went on to pass most of their acceptance criteria under independent verifiers; the label hid that the only thing wrong was the budget of time. In our write-up the finding had to be reconstructed from transcripts.
From a private replay study of sequant on our own repos; raw runs are not public. Filed by the owner.