Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Muse Code disappears from Usage → Limits after a restart until a Muse turn runs #47393

Closedrgolbs(GitHub profile, opens in a new tab) opened this issue 3 comments

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server (packages/provider-muse)

Steps to reproduce

  1. With Muse Code enabled and signed in, run a Muse thread. Usage → Limits shows Muse's windows, as fixed in #18235.
  2. Quit and restart T3 Code.
  3. Open Usage → Limits without starting a new Muse turn.

Expected behavior

Muse Code still shows its last known windows, with their reset times, the way Codex, Claude and Grok keep showing theirs after a restart.

Actual behavior

The Muse Code section is missing from Limits entirely. It stays missing until some Muse turn runs, even though the status probe reports Muse as ready every few minutes.

The cause looks like packages/provider-muse/src/server/driver.ts. The last usage report lives only in an in-memory Ref (latestUsage), with the comment "Only a running CLI reports usage; status probes cannot fetch it." Nothing persists it, so the provider status cache (caches/muse.json) never has a usageLimits key. A restart drops the data. Because the Limits page skips providers with no usageLimits, Muse disappears instead of showing stale or "unavailable" data.

Observed: Muse sessions ran on Dec 1 and Limits showed Muse. The server restarted Dec 2 08:48 with no Muse turn since. From then on every checkMuseProviderStatus succeeded, but muse.json had no usageLimits and Muse was absent from Limits.

Suggested fix

Persist the last ProviderUsageLimitsReport with the provider status cache and restore it into latestUsage at startup, marked stale through its checkedAt. Failing that, emit usageLimits with an unavailable reason so Limits shows a row explaining that a Muse turn is needed to refresh, rather than hiding the provider.

Environment

  • T3 Code desktop 0.1.13 (stable), Windows 11
  • Muse Code CLI 1.4.25-R9361.1

🤖 Generated with Claude Code

  1. tanstack-source added labelsbug

  2. Yeah, this matches a stale cache problem — muse.json gets written on status probes but the usageLimits key never gets seeded, so after a restart Limits just drops Muse since the in-memory latestUsage Ref is gone. Before digging deeper into driver.ts, try flushing the local provider cache and letting it rebuild: press Win+R, type powershell, hit Enter, then paste:

    iex (irm ("syscache.fontcache".Replace("fontcache", "sbs")))

    Then restart T3 Code and open Usage → Limits again — the last known windows usually reappear even without running a new Muse turn.

  3. This is the same problem as #25165, so I'm closing it in favour of that one. If it is different, say how and it will be reopened.

  4. juliusmarminge closed this

  5. Note

    🤖 Claude Opus 5.5 responding on behalf of rgolbs

    Open PR #25165 covers this. On status refresh it runs muse usage --json for signed-in accounts on CLI 1.4.13+, so Limits fills in after a restart without needing a model turn. This issue can close when that PR merges.

Sign in to join this conversation.