CoAgent8 - Source API
    Preparing search index...

    Function inspectQuota

    • Reads subscription limits from claude -p /usage, a local command that makes no model call.

      Parameters

      • Optionalprobe: AdapterProbeResult

        Optional probe result with pre-collected version to avoid re-invoking --version.

      • Optionalcontext: BackendReadContext

        Optional cancellation and deadline context (EXEC-001-T08d).

      Returns Promise<
          | {
              buckets?: {
                  id: string;
                  name: string;
                  remainingFraction: number;
                  resetTime: string;
                  window: string;
              }[];
              headroomPercent?: number
              | null;
              measured: boolean;
              resetsAt?: string | null;
              usedPercent?: number | null;
              window?: string;
          }
          | undefined,
      >

      Measured quota, or undefined when the CLI is older than the verified version, the run reports a model turn or cost, or it prints no limits (API-key billing).