Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix: address usage limits and merge settlement regressions #9784

Mergedmaria-rcksmerged 3 commits intomain fromrefs/pull/9784/headmerged by maria-rcks View on GitHub

maria-rckscommented

fixes four regressions from #9507 and #9332: claude capability loss when usage requests stall, duplicate config streams, limits refresh skipping remote environments, and queued prs settling threads before merging. usage has a separate deadline, client subscription options match and authoritative source events replay to late subscribers, refresh reaches connected environments without waiting for an HTTP session lookup, and settlement requires host-confirmed merged state.

verified with 128 focused tests (including populated source replay, removal, capability downgrade, and buffer-gap recovery), server/web/client-runtime typechecks, targeted lint, and runtime probes. real hosted-browser refresh succeeded with no primary environment at desktop and phone widths; the first click also succeeded with the session endpoint forced to fail. the sandbox has no quota-reporting provider, so screenshots show the inspected controls, while matching RPC success responses verify refresh execution.

hosted limits refresh at desktop width

hosted limits refresh at phone width

model: gpt-5.6-sol; harness: codex.


Note

Medium Risk Merge event timing changes PR/thread settlement behavior, and client-server config subscription opt-ins affect what usage-limit data is delivered; changes are targeted regression fixes with new tests.

Overview Fixes regressions around usage limits, Claude capability probing, and PR merge settlement.

Clients now opt into usageLimitSources on the RPC config subscription (web and mobile connection runtimes), matching how environmentThemes is handled so subscriptions dedupe correctly and server config includes limit-source data.

probeClaudeCapabilities returns account and slash commands after initialization even when the optional usage call stalls or times out; usage gets its own shorter deadline and is omitted on failure instead of failing the whole probe.

PullRequestService publishes merge events only after an uncached host summary confirms state === "merged", so queued merges or confirmation errors no longer settle threads early; failures are logged and skipped.

On the Usage page, Limits refresh re-probes providers on every connected environment with a loaded server config, not only the primary environment.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit a38cd0de3cb98adddfbfcb0250ce224f533bc833. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Fix usage-limit source updates and merge settlement confirmation regressions

  • Adds an optional usage-limit-source subscription flag to RpcSessionOptions in session.ts; the session records the latest source update for replay and discards it when a snapshot drops the capability. Mobile and web client connection layers opt in.
  • Updates the refresh handler in UsagePage.tsx to refresh providers for every connected, configured environment instead of only the primary environment.
  • Changes PullRequestService.runActionAndInvalidate in PullRequestService.ts to request an uncached change-request summary after a merge action and publish the merge event only when the host confirms a merged state.
  • Separates initialization from the optional usage request in probeClaudeCapabilities in ClaudeProvider.ts so account data and slash commands survive a usage timeout; the usage request is aborted on timeout or rejection.
  • Behavioral Change: merge subscribers no longer receive a merge event for queued, auto-merge, or unconfirmed actions; confirmation errors are logged and suppressed. The UsagePage refresh now fans out to all connected environments rather than one.
Macroscope summarized 6908eb0.
    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    2. Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

      Fix All in Cursor ❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the [Cursor dashboard](https://www.cursor.com/dashboard/bugbot). Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 9589d3b683e5e83b9c62f6ba751a1e92c65cacb1. Configure [here](https://www.cursor.com/dashboard/bugbot).
    3. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Not approved

      Macroscope's review found this PR not approvable — This PR combines merge-settlement and provider-probe behavior changes with production wiring that enables usage-limit source streaming by default for web and mobile connections. Because the change affects live quota data flow across connected environments and alters observable settlement behavior, its runtime scope merits human review.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. maria-rcks merged this98a29cb

    5. maria-rcks closed this

Sign in to join this conversation.