[Bug]: Muse Code's subscription usage never shows in Usage → Limits
Before submitting
- [X] I searched existing issues and did not find a duplicate.
- [X] I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
- On a host where
muse loginis signed in to a Meta subscription, enable the Muse Code provider in Settings → Providers. - Send a Muse thread any message and wait for the reply.
- Open Usage → Limits.
Expected behavior
Muse Code appears with the subscription's 5-hour and weekly windows, the way Codex, Claude, Grok and Antigravity do. The data is already there: Meta sends it with every reply (response.subscription_usage, after response.completed), and muse serve passes it to its client as the MSP notification usage/changed.
Actual behavior
Limits says "No provider on the selected environments reports subscription limits." The Muse provider ignores usage/changed and never sets usageLimits, so providersWithLimits drops it. In this run Meta had just reported 3% of the 5-hour window and 46% of the week used.
Impact
Minor bug or occasional failure
Version or commit
main @ ed0f7b908
Environment
Linux (Ubuntu 24.04), web client in Chromium, Node 24.21.0, Muse Code 1.4.4 (1.4.4-R5419.1), muse-spark-1.3-contributor on a Meta subscription
Logs or stack traces
# Meta's event after the reply, seen by a logging proxy between Muse and api.meta.ai (tier id left out)
{"type": "response.subscription_usage", "subscription": {"window": {"used_percent": 3, "resets_at": 1791730859, "window_duration_mins": 300}, "weekly": {"used_percent": 46, "resets_at": 1791763200}}}
Screenshots, recordings, or supporting files
Usage → Limits on main, right after the Muse thread on the left replied:
Workaround
None in T3.
Proposed fix
In packages/provider-muse, plus one mobile label:
- The adapter passes each
usage/changedreport to the driver, which publishes it as the instance'susageLimits(Session and Weekly). Meta has no usage endpoint and reports only with a reply, so the driver keeps the newest report and re-derives the windows from it on each status check. A window whose reset has passed starts over empty. Until Muse's first reply after a server start, Limits says Muse will report with its next reply. - One row per Meta account: the status check's read-only host calls Muse's experimental
account/read, which names the signed-in account, so the same account on several environments counts once. With an API key (a gateway or API billing) no account is named, so Muse reports no limits itself. - Mobile labels the Limits heading "Muse Code" (
DRIVER_LABELinUsageLimitsPooled.tsx). Web already takes the name from the driver.
I have this working, with focused tests, from #17151, which was closed for missing screenshots. Once this is triaged I'll open a focused PR for it, with before/after screenshots on web and mobile. Related: #17397 (attributing a report to the right account after the login changes).
Filed with Claude Opus 5.5 in Claude Code.
[!NOTE] Grok responding on behalf of Julius.
Thanks for the detailed write-up. Muse Code has never reported subscription limits, so this is a missing capability rather than a regression (your earlier #17151 was framed as a feature too). Feature requests belong in Ideas, so this will move there. If you open the focused PR, include the before/after screenshots per CONTRIBUTING.md and link the discussion.
@juliusmarminge please re-check
Adding a +1 from a new Muse Code user on Windows in T3 Code desktop. Codex, Claude, and Grok all show their remaining windows under Usage → Limits, but Muse Code shows nothing there, even after Muse replies. I currently have to leave T3 and check Muse's own /usage panel instead. The expected behaviour is a Muse Code row with Session (5-hour) and Weekly percentage left plus reset times, matching the other providers. Happy to test a nightly or PR build on Windows once available.
Adding a +1 from a Muse Code user on macOS (Mac mini) in T3 Code desktop 0.1.3, with Muse Code 1.4.14 and muse-wonder-full-1.0 on the Muse Code Max Usage tier.
muse usage on the host reports the allowance fine (Window % used + reset, Weekly % used + reset), and Muse threads run normally in T3, but Usage → Limits shows Codex, Claude, Grok, and Antigravity only — no Muse Code row at all, even right after Muse replies.
Happy to test #25165 or a nightly build on macOS once available.
Additional verification for #25165: tested on an Apple Silicon Mac mini running macOS 26.7.2 and Muse Code 1.4.14-R7309.1.
With an isolated Mac-hosted dev server and a signed-in Meta subscription, adding Muse and refreshing provider status populated Usage → Limits with Session 99% left and Weekly 66% left. Refreshing Limits kept both windows visible. The PR’s status-refresh code also fetched real allowance twice from an initially empty observation cache, without a model message.
All 97 focused tests passed on macOS after correcting one test fixture’s /var vs /private/var path expectation (test-only commit e40f84f130).
Important scope: the successful CLI/server runs were launched through the Mac’s visible Terminal session. SSH-only Muse credential access hit a macOS Keychain approval restriction. This was a web client against the Mac server, not native Electron/Safari verification. No live account-switching or multi-environment deduplication claim.
Full steps, environment, test results and limitations: https://github.com/pingdotgg/t3code/pull/25165#issuecomment-6514980542
Verified by GPT-6.1 Sol via Codex in T3 Code.
Fixed by https://git.cafe/pingdotgg/t3code/pulls/33800, now on main: After a signed-in Muse thread receives a usage report, Usage → Limits now shows its Session and Weekly percentages and reset times, and refreshing retains that reading.