Skip to content

fake-claude hits its usage limit again every time the session resumes #59

Closed

Description

@fctl-sh

What is wrong. In cargo xtask dev, a session that hits fake-claude's usage limit (a message with limit) never gets past it. Each time the limit resets, the session resumes, reports the limit again and pauses for another 50 seconds, until someone stops it. docs/development.md says limit pauses a session; it is meant to continue after the reset, as a real session does.

How it works now. When a pause ends, fctl-agent sends Claude "The usage limit has reset. Continue where you left off." (on_tick in crates/fctl-agent/src/supervisor.rs). fake-claude hits the limit whenever a turn's text contains limit (turn in crates/fake-claude/src/main.rs), and that sentence does. A transcript from fctl logs playground#1 --json, one cycle every 50 seconds:

04:08:21 user_message "limit"
04:08:21 rate_limit_event {"rateLimitType": "five_hour", "status": "rejected", "resetsAt": …}
04:08:21 status paused "Waiting for the usage limit to reset"
04:09:11 status running "Resuming after the usage limit reset"
04:09:11 rate_limit_event {"rateLimitType": "five_hour", "status": "rejected", "resetsAt": …}
04:09:11 status paused "Waiting for the usage limit to reset"
04:10:01 status running "Resuming after the usage limit reset"
…

Since #58, every one of those reports also replaces the credential's five-hour reading, so Settings and the floor flip between "used up" and the real share.

What should happen

  • fake-claude doesn't take the agent's resume message as a request to hit the limit (for example, limit counts only in a message that isn't the reset notice), so a limit session pauses once, resumes after the reset and answers normally.

Compatibility. Development tooling only: nothing ships to hosts or the control plane.

Found while verifying #58 (#6) with cargo xtask dev.

Session: https://app.fctl.sh/s/ses_01M56GBDBASVNSG4VJ7A671F4K

Activity

  1. added
    bug
    on Oct 18, 2026
  2. added a commit that references this issue on Oct 18, 2026
    1d81e66
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions