fix(usage): keep cached usage-limits commands local - #10812
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a focused compatibility bug fix that preserves local You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (9)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughAdds local ownership metadata for the usage-limits command, preserves it through provider decoding, supports legacy providers, and updates mobile and web availability checks. ChangesUsage-limits command ownership
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change keeps locally handled usage-limits commands available across reconnects while retaining compatibility with older server catalogs. The ownership contract, fallback behavior, and affected client flows are covered, with no concrete merge-blocking risk identified. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
What changed
T3's
/usage-limitscommand can become an ordinary provider prompt when its catalog survives a reconnect but its external quota data does not.Mark T3's command with optional
source: "t3"metadata and use it in the web, desktop, and mobile composers. Existing threads keep the command local even when limits are unavailable. Mobile New Task keeps it out of the send queue.Why
The cache intentionally omits external quota snapshots while retaining the provider catalog. Command ownership must survive that gap without inventing quota data or claiming a provider's own command with the same name.
The existing data-based check remains as a fallback for older servers. Old caches without the marker need one connection to an updated server; this change cannot distinguish them from native commands while offline.
flowchart LR catalog["Cached command: source=t3"] --> web["Web and desktop"] catalog --> thread["Mobile thread"] catalog --> draft["Mobile New Task"] web --> local["Handle locally"] thread --> local draft --> guard["Do not queue a turn"]UI changes
Real web client in Chromium, with an isolated project and controlled quota responses. PNGs are 2560 × 1600. The before capture uses the original ownership check with the same fixture. Turn-start requests are recorded and stopped at the browser boundary, so no agent runs.
Verification
git diff --checkpass.Desktop shares the web composer. Mobile is covered by focused tests and typechecking, not a device run. No product defaults or diagnostic suppressions change.
Checklist
Model: GPT-5. Harness: Codex in T3 Code.
Summary by CodeRabbit
Bug Fixes
/usage-limitscommand now remains available while usage-limit information reconnects.Reliability