Repository navigation
fix: let fake-claude sessions continue after a usage limit resets - #64
Merged
Merged
Conversation
fake-claude took "The usage limit has reset. Continue where you left off.", which fctl-agent sends when a pause ends, as a request to hit the limit, so a limit session in cargo xtask dev paused again every 50 seconds. A turn now asks for the limit only if it says limit but not reset. Refs #59
kalaspuff
deleted the
fctl/31-look-into-https-github-com-hyperstructur
branch
October 18, 2026 13:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fake-claude hits its usage limit whenever a turn says
limit. When a pause ends, fctl-agent continues the session with "The usage limit has reset. Continue where you left off." (on_tickincrates/fctl-agent/src/supervisor.rs), and that sentence sayslimittoo. So incargo xtask devalimitsession hit the limit again each time it resumed and paused for another 50 seconds, until someone stopped it. Since #58, each of those reports also flipped the credential's five-hour reading to "used up".Now a turn asks for the limit only when it says
limitbut notreset. The agent's message gets the usual answer, so alimitsession pauses once, resumes after the reset and answers. The rule is written in fake-claude's module docs and indocs/development.md. Nothing that ships to hosts or the control plane changes.I matched on
resetrather than on the agent's exact sentence so that rewording the sentence doesn't bring the loop back, as long as it still says the limit has reset. A message you type with bothlimitandresetin it now gets a normal answer too; the docs say so.Verification
cargo test -p fake-claude: a new test covers the rule (limithits it in any case; the agent's sentence and a turn withoutlimitdon't).cargo xtask checkpasses.cargo xtask dev, thenfctl run -p playground "limit". Fromfctl logs playground#1 --json:It didn't pause again in the two minutes that followed (before the fix it paused again within the same second it resumed, as the issue's transcript shows).
fctl claude statusshowed "5-hour limit 72% used", reported by the turn that resumed.fctl send playground#1 "limit again"then paused the session again, solimitstill works later in a session. "hello while paused", sent during that pause, got its answer after the reset.That last run also showed the session going idle before fake-claude answered the waiting message. fake-claude doesn't report
queued_turn_countin itsresult, and fctl-agent reads that field to keep a session running. I opened #63 for it; it's left out of this change.Fixes #59
Session: https://app.fctl.sh/s/ses_01M57HNYYJMEMYHPRKXVQPDN13