Skip to content

[Feature]: Support Kimi (ACP Registry / Kimi Code CLI) in Usage -> Limits, 5-hour quota banners, and local usage scanning #28941

Closed

Description

@jamesdchen

Before submitting

Area

apps/server, apps/web, apps/mobile (Usage & Subscription Limits / ACP Registry Kimi provider)

Problem

When using Kimi (acpRegistry_kimi_cli / Kimi Code CLI 2.4.1 or ACP Registry kimi 1.52.0), T3 Code 0.1.6 has no Usage Limit UI and no Kimi usage integration across three surfaces:

  1. Usage -> Limits (mod+u -> l) completely omits Kimi:
    Even when acpRegistry_kimi_cli is enabled, installed, and status: "ready", Kimi does not appear in Subscription Limits at all — neither live rolling quota bars (5-hour window, 7-day window, monthly code/total quota, and Booster extra-usage wallet) nor even an external Manage usage fallback link (https://www.kimi.com/membership/subscription?tab=quota, compare fix(usage): show Devin in subscription Limits #26381 for Devin).
  2. 5-hour quota exhaustion (HTTP 429) has no usage-limit banner / reset timer / snooze integration:
    When a Kimi Coding subscription hits its 5-hour rolling window, kimi returns:
    provider.api_error: 429 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/membership/subscription?tab=quota
    
    T3 Code lacks Kimi quota-window awareness for snoozeLimitedThreads / autoResumeLimitedThreads and model-picker out-of-quota indicators.
  3. Usage -> Tokens / Cost omits Kimi local session transcripts:
    usage-scan-cache-v10.json scans ~/.claude, ~/.codex, ~/.grok, and ~/.pi, but does not scan Kimi Code's ~/.kimi-code/sessions (agents/*/wire.jsonl usage.record events) or legacy ~/.kimi/sessions. (Previous PRs feat(usage): include Kimi Code activity #7936 and feat(server): show Kimi Code plan limits on Claude relay instances #13587 were closed unmerged, and feat(server): show Kimi Code plan limits on Claude relay instances #13587 only targeted claudeAgent relay instances rather than acpRegistry Kimi instances.)

Expected behavior

  1. Usage -> Limits shows Kimi subscription quotas for enabled acpRegistry Kimi instances (supporting both ~/.kimi-code/ for Kimi Code CLI 2.x and ~/.kimi/ for legacy kimi-cli 1.x, plus KIMI_CODE_HOME and both api.kimi.com / api.kimi.ai regions):
    • Kimi Code CLI (packages/oauth/src/managed-usage.ts) queries GET <base_url>/usages (default https://api.kimi.com/coding/v1/usages or https://api.kimi.ai/coding/v1/usages per config.toml [providers."managed:kimi-code"].base_url) with Authorization: Bearer <access_token> (refreshing via refresh_token in credentials/kimi-code.json when expires_at has passed).
    • That endpoint returns structured quota ratios and ISO/string reset timestamps:
      • usages.limit_5h: { used_ratio, reset_time } (5-hour rolling quota)
      • usages.limit_7d: { used_ratio, reset_time } (7-day rolling quota)
      • usages.limit_month_code & usages.limit_month_total: { used_ratio, reset_time }
      • boosterWallet: { balance: { type: "BOOSTER", amount, amountLeft }, monthlyChargeLimit, monthlyUsed, monthlyChargeLimitEnabled }
    • If the OAuth token cannot be read or refreshed, fall back to a Manage usage link pointing to https://www.kimi.com/membership/subscription?tab=quota (or kimi.ai equivalent).
  2. In-thread usage-limit state & auto-resume: Recognize Kimi 429 quota-exhaustion responses and pair them with the limit_5h.reset_time / limit_7d.reset_time window so snoozeLimitedThreads and autoResumeLimitedThreads work cleanly as they do for Claude and Codex.
  3. Token/cost usage scanning: Include ~/.kimi-code/sessions (and ~/.kimi/sessions) in usage transcript scanning.

Version or commit

T3 Code server/desktop 0.1.6

Environment

  • Server: Debian 13 Linux x64 (0.1.6), acpRegistry_kimi_cli pointing to Kimi Code CLI 2.4.1 (~/.kimi-code/bin/kimi)
  • Client: Windows 11 x64 T3 Code Desktop (0.1.6) & mobile

Activity

  1. locked and limited conversation to collaborators on Nov 1, 2026
  2. converted this issue into a discussion #28946 on Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions