Skip to content

Check OAuth refresh, the usage-limit pause and long-lived tokens with real Claude #79

Closed

Description

@fctl-sh

#1 ran the first real-Claude sessions on the Mac host with the Apple container driver, and is closed. Three paths it lists have still run only against fake-claude. None of them shows up until a session runs long enough or on the right kind of credential.

How it works now

  • Long-lived tokens. A connection made with claude setup-token has only the inference scope, so its sessions run without Remote Control. Session 37 ran on a full login: Remote Control came on, and the session showed up in the Claude apps.
  • OAuth refresh. When the access token expires, Claude sends oauth_token_refresh. fctl-agent forwards it (crates/fctl-agent/src/supervisor.rs), and the control plane refreshes the token once per user and answers. fake-claude asks for a refresh in cargo xtask dev, but no real session has run past its token's expiry yet.
  • Usage-limit pause. A rate_limit_event saying the limit is reached pauses the session until resetsAt (crates/fctl-domain/src/events.rs), and the session resumes on its own. Session 37's subscription was at 0 % of its five-hour window. Its organization turns overage off (overageStatus: rejected), so the overage pause can't trigger on it.

What should happen

  • A session on a long-lived token runs on the Apple host.
  • A session that runs past its access token's expiry keeps working. The transcript shows the refresh, and Claude carries on.
  • A session that reaches its five-hour limit pauses, says when it will resume, and resumes on its own after the reset.
  • What each run showed is noted here. Anything broken gets an issue of its own.

Compatibility

These are checks only. Fixes they need get their own issues.

Split from #1

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

Activity

  1. added
    host
    agents
    on Oct 18, 2026
  2. fctl-sh commented on Oct 18, 2026

    @fctl-sh
    ContributorAuthor

    OAuth refresh: a session ran past its token's expiry, and it didn't keep working.

    Session https://app.fctl.sh/s/ses_01M585DBQGCCKMY571BGHGZ3C3 runs on a full login, on Claude Code 2.1.302. Its first run started at 18:47 UTC with a token that had about 23 minutes left. From 19:10 every turn failed with 401 OAuth access token has expired. Re-authenticate to continue., until a new run started at 19:22 with a fresh token.

    Claude Code never sent oauth_token_refresh. Version 2.1.302 asks its host only when CLAUDE_CODE_SDK_HAS_OAUTH_REFRESH is set and its entrypoint is claude-desktop, local-agent or claude-vscode; fctl's sessions run as sdk-cli. Details and the fix are in #90.

    The box for this check stays unticked until a session runs past its token's expiry with that fixed.

  3. fctl-sh commented on Oct 28, 2026

    @fctl-sh
    ContributorAuthor

    Every check here is ticked: a long-lived token, the OAuth refresh and the usage-limit pause have all been tested with real Claude. #295 ticks the matching roadmap item.

  4. fctl-sh commented on Oct 28, 2026

    @fctl-sh
    ContributorAuthor

    #295 merged in fc25b9b: the roadmap ticks this check. It is a docs-only change: CI pinned fctl.sh to the updated docs, and it isn't in a release yet (no release is needed for it).

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

    agentshost

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions