Skip to content

DRU-1065 -- A provider or account switch wakes a call waiting out a usage limit - #1121

Draft
dserbano wants to merge 1 commit into
mainfrom
issues/1065
Draft

dserbano wants to merge 1 commit into
mainfrom
issues/1065

Conversation

@dserbano

@dserbano dserbano commented Nov 7, 2026

Copy link
Copy Markdown
Collaborator

An agent call that hit a usage limit slept until the window reset. Switching the provider or the account during that sleep changed nothing: the build kept waiting, and it retried only once the old window turned. Now a switch wakes the wait, and the call retries at once on the new provider or account.

  • The quota wait is a Workflow.wait on the agents.quota topic, with the reset as its timeout. The reset is read off the latest usage scrape, as before. The step that reads the reset also records which credential hit the limit: the agent's model, its billing, and the email of the subscription it runs on.
  • Agent.wake_quota_waits wakes every run that waits on that topic. A change to the execution defaults, an agent's harness, model, or billing override, a connected subscription, or a pasted token calls it after the change commits, so the woken run reads the new settings.
  • A woken call reads its credential again. If the credential is the same, the call keeps waiting until the original reset. If it differs, the call retries now.
  • A call waits once per credential instead of once in all. If the new account is limited too, its own quota error starts one wait for that account's reset. A second limit on a credential that already waited fails the call, as before.

The retry on another credential does not consult that credential's scrape first. The scrape is keyed by the Druks account, so after a Claude account switch on the same Druks account it still describes the old Claude account. The provider's own rejection is the limit that applies.

A pasted setup token names no email, so swapping one pasted token for another reads as the same account, and the call waits out the reset.

The quota wait records different steps, so a run waiting out a quota when this deploys fails on replay and needs a new start.

@mintlify

mintlify Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
druks 🟢 Ready View Preview Nov 7, 2026, 1:10 AM

💡 Tip: Enable Automations to automatically generate PRs for you.

This branch was successfully deployed

1 active deployment
staging - docs — 47286517 Deployed Nov 7, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant