Repository navigation
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
4728651 to
cba71c8
Compare
DRU-1065: the fix and the tests
The fixA build whose agent call hit a usage limit slept until the window reset. A switch to another provider or account during that sleep changed nothing. Now a switch wakes the wait, and the call retries at once.
What the rebase changedDRU-1013 (#1140) posts two chat notices from this wait: one when the wait starts and one when the run continues. The rebase keeps both inside the new wait. The second notice said the run continues "now that the provider's usage limit reset". After a switch, the limit has not reset, so The rebase also names the holder Automated checks
Live testsEvery build ran on a local install against A real usage limit and an account switch. This ran on this commit's image. The image also held a separate change, not part of this PR, that reads a new subscription's usage when it connects.
Earlier runs, with a simulated limit. These ran before the rebase. A file flag made the harness return a limit error, while the usage scrapes, the waits, the switches, and the restarts were real.
Two things to know
|
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.
Workflow.waiton theagents.quotatopic, 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_waitswakes 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.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.
DRU-1013's chat notice that the run continues said the usage limit reset. After a switch it has not, so
QUOTA_RESUMED_MESSAGEnow says the run continues after its usage-limit wait.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.