#14054: #13923 ----[Feature] -- Provider-rate-limit-/-quota-query-tool
agents
stale
Cluster:
TUI and Tool Execution Fixes
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR adds a new `provider_quota` tool that allows agents to query provider-level rate limits and quota usage data. The implementation follows existing patterns from `session-status-tool.ts` and correctly integrates with the existing `provider-usage` infrastructure.
**Key changes:**
- Added `createProviderQuotaTool()` in `src/agents/tools/provider-quota-tool.ts` with proper TypeBox schema validation
- Registered the tool in `openclaw-tools.ts` and added it to relevant tool groups in `tool-policy.ts`
- Tool returns structured JSON with usage percentages, remaining capacity, and reset times
**Issues found:**
- `.claude/settings.local.json` contains developer-specific local configuration with Windows paths and should not be committed
<h3>Confidence Score: 3/5</h3>
- Safe to merge after removing the local settings file
- The provider quota tool implementation is solid and follows established patterns, but the PR includes a local configuration file that should not be committed. This is a straightforward fix - simply remove `.claude/settings.local.json` from the commit.
- `.claude/settings.local.json` must be removed from the PR before merging
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#7806: feat: export quota info to ~/.openclaw/quota.json after each agent run
by leviyehonatan · 2026-02-03
81.7%
#21076: feat(quota): unify provider quota tracking and usage UI across prov...
by romeroej2 · 2026-02-19
79.2%
#11274: fix(tools): truncate overly long tool names for API compatibility
by avirweb · 2026-02-07
74.1%
#14734: test(agents): guard against stale allowAgents in existing sessions
by davidahmann · 2026-02-12
73.6%
#13686: Add opt-in rate limiting and token-based budgets for external API c...
by ShresthSamyak · 2026-02-10
72.9%
#13990: feat: add subagent_progress tool for sub-agent progress reporting
by caprihan · 2026-02-11
72.3%
#14368: fix: skip auth profile cooldown on format errors to prevent provide...
by koatora20 · 2026-02-12
72.2%
#19094: Fix empty tool_call_id and function names in provider transcript pa...
by yxshee · 2026-02-17
72.2%
#6014: Agents: improve quota exhaustion fallback detection
by erain · 2026-02-01
72.0%
#12608: fix: sanitize client tool call IDs per provider requirements
by piyushhhxyz · 2026-02-09
71.8%