Repository navigation
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Kimi quota exhaustion now uses existing usage-limit handling so affected turns appear as Limited rather than generic failures. The change is narrowly scoped to Kimi error classification and preserves retryability. You can add or adjust custom eligibility rules. Learn more. |
|
Thanks for this. T3 Code's ACP Registry support follows the ACP spec: the code every agent shares takes no changes that are specific to one agent, and the special cases already there are not a precedent for more (how providers are integrated). This expands Kimi-only handling in the generic ACP Registry adapter: it interprets additional fields from Kimi’s private session log and recognizes quota refusal text only for Kimi. That conflicts with the ACP integration policy, even though the existing adapter already contains Kimi exceptions. The reported Failed-versus-Limited problem is useful evidence. Please bring the quota-error reporting requirement to ACP upstream so agents can expose it through a shared protocol capability; T3 can then classify those errors for every compliant agent. ACP has no shared way to do this yet. The place to propose one is ACP upstream, the Agent Client Protocol project itself, so that every agent can offer it and T3 Code can support it once for all of them. Closing. |
When Kimi Code hits its 5-hour usage limit, it closes the turn in
wire.jsonlwithcode: "provider.api_error",name: "APIProviderQuotaExhaustedError", anddetails.statusCode: 429instead ofcode: "provider.rate_limit". BecausekimiAcp.tsonly checkedcode === "provider.rate_limit", T3 classified these turns asprovider_errorand showed them as Failed instead of Limited (blocking usage-limit recovery UX).Fix
error.nameanderror.details.statusCodeinKimiTurnEnded(packages/provider-acp-registry/src/server/kimiAcp.ts) and classifyprovider.rate_limit/provider.quota_exhausted, HTTP429,QuotaExhausted/RateLimiterror names, and usage-limit refusal text asusage_limit(while explicitly keeping HTTP402billing/balance errors asprovider_error).acpRegistryPromptFailure(packages/provider-acp-registry/src/server/adapter.ts) for direct ACP RPC rejections, including localkimiinstalls.How I found and verified it
Hit Kimi Code's 5-hour quota across four active
kimi-code/k3.1-prothreads; all four showed Failed (Provider error) in the sidebar and timeline. Inspecting each session's~/.kimi-code/sessions/.../agents/main/wire.jsonlshowed the exactturn.endedrecord:{ "type": "turn.ended", "agentId": "main", "reason": "failed", "error": { "code": "provider.api_error", "message": "You've reached your 5-hour usage limit. Your quota will reset when the current 5-hour window ends. To continue now, purchase extra usage or upgrade your plan: https://www.kimi.com/settings/subscription?tab=quota", "name": "APIProviderQuotaExhaustedError", "details": { "requestId": null, "statusCode": 429, "traceId": "..." }, "retryable": false }, "continuation": "none" }Replayed this exact record (along with generic HTTP 429, message-only fallback, HTTP 402 billing exclusion, and ACP RPC rejection) through
makeKimiPromptOutcomeWatchandacpRegistryPromptFailure, and ranvp run check:changedonupstream/main:vp format,vp lint,vp knip,vp graphql (apps/server),vp typecheck(10 packages): all passvp test: 58 passed acrosspackages/provider-acp-registry/src/server/kimiAcp.test.ts,apps/server/src/orchestration-v2/Adapters/AcpRegistryAdapterV2.test.ts, andapps/server/src/provider/AgentContextBudget.test.tsWritten with Gemini 4 Neon in the Antigravity harness via T3 Code.