Skip to content

Resume a thread when the provider quota resets #462

Closed

Description

@currentbits

What Claude Code and T3 just hit

Claude Code 2.1.234: sessions continue automatically when a claude.ai usage limit resets. Toggle in /config ("Continue automatically at usage limit").

T3 Code #7314 (17 Aug): after a usage-limit recovery, subagent status stays red and never updates while running. They have the resume path; the UI lies about it.

Solenta today

#286 is our hard budget cap — we kill dispatch when Solenta's own meter is empty. Provider-side 429 / "usage limit reached, resets at 15:00" is different: the turn is not failed, it is waiting on a clock we can read. Today that surfaces as a failed or zombie Working thread. There is no "hold this turn until 15:00, then send the same prompt."

Why it matters

Afternoon Max-plan users live on this. Killing the thread and making them re-prompt after lunch is how they go back to the raw CLI, which now just waits. Auto-resume is also how unattended overnight runs survive a mid-run quota wall without losing the worktree.

Scope suggestion

Parse the provider's reset timestamp from the error (Claude already emits one; Codex and others have equivalents). Park the thread in an explicit quota-wait state with the wake time on the card. Wake once. Do not loop. Honor a per-thread / global opt-out, same as Claude's /config row. Distinct from #286 (our cap) and from #294 (model failover — that is a different provider, not a later clock).

Round 20.

Activity

  1. added
    enhancement
    plan:todo
    on Aug 18, 2026
  2. currentbits commented on Aug 18, 2026

    @currentbits
    OwnerAuthor

    Round 21: Kimi Code 0.30.0 — fail fast when account quota or balance is exhausted instead of silently retrying for ~3 minutes.

    Quota-wait (#462) is for a reset clock. Exhausted balance with no reset is a hard fail. Do not retry-storm either case. Parse the error: reset-at → park; no reset → fail the turn once and say why.

  3. added
    plan:doing
    and removed
    plan:todo
    on Aug 18, 2026
  4. currentbits commented on Aug 18, 2026

    @currentbits
    OwnerAuthor

    Round 25 demand validation: "Continue when the session limit reached" is a top Claude Code request (anthropics/claude-code#13354, 80 comments), and Codex users ask to make the temporary removal of the 5-hour limit permanent (openai/codex#34035). Quota walls are a top-of-mind daily frustration; a thread that parks itself and resumes at reset is a direct answer.

  5. currentbits commented on Aug 18, 2026

    @currentbits
    OwnerAuthor

    Status check: this was fully implemented in merge 688e5a9 (electron/quotaWait.js, src/quotaWait.ts, IPC, UI, tests) but a later same-day merge 8bf223b (Read-only Ask mode) deleted all of it during conflict resolution — .solenta/review-itinerary.json records 'quota-wait props/handlers dropped (removed upstream)'. Current tree has no working trace: quotaWaitUntil is only ever reset to null, fromQuotaWait is dead plumbing in runner.js, no reset-timestamp parsing exists. Keeping this open — the feature needs resurrecting from 688e5a9's diff, plus cleanup of the dangling references.

  6. currentbits commented on Aug 18, 2026

    @currentbits
    OwnerAuthor

    Ready for review on worktree branch coder/fork-we-have-a-lot-of-in-progress-on-the-475d59 (commit b3ac399, thread 475d59d2). The feature deleted by the Ask-mode merge is resurrected: electron/quotaWait.js + src/quotaWait.ts are back, re-merged around the Ask-mode code so both features coexist; dead fromQuotaWait plumbing cleaned up. Verified in the worktree: 55/55 electron tests pass across quota-wait AND ask suites (quota-wait, quota-wait-runner, ask, ask-mode, ask-runner, ask-ipc), 34/34 renderer tests pass (quotaWait, askCard, settingsModal).

  7. added a commit that references this issue on Aug 18, 2026
  8. added
    plan:done
    and removed
    plan:doing
    on Aug 18, 2026
  9. currentbits commented on Aug 18, 2026

    @currentbits
    OwnerAuthor

    Round 31 sentiment mining from the 705-comment Claude Code weekly-limits thread (HN). The quotes that should shape this feature:

    • "NOTHING breaks flow better than 'Woops! Times up!'; it's worse than credit quotas, at least then I can make a conscious decision to spend more money." The pain is the involuntary interruption, not the cost. A thread that visibly parks ("quota resets in 47m, will resume automatically") converts a flow-breaking wall into a scheduled continuation.
    • "Advanced usage patterns like running Claude 24/7 in the background" is what vendors blame for limits. Unattended fleets are exactly what break flat-rate pricing, so quota pressure will keep increasing, not decrease. This feature is durable, not temporary.
    • Multi-machine patterns are common (laptop + EC2 + containers), so quota state is per-account, not per-machine: the resume scheduler should live where the account is managed (Named provider instances: work/personal accounts, isolated config dirs, OpenRouter #453 named instances), and resetting any device should be able to wake parked threads.
    • One UX tell from Anthropic's own limit message ("resets at 8pm UTC") that users mocked: always show reset times in the user's local timezone.
  10. added a commit that references this issue on Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementplan:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions