GitHub Copilot CLI and SDK: AI Credit Session Limits

GitHub Copilot

GitHub Copilot CLI and SDK now let developers cap AI credit spending within a session, addressing a real pain point after Copilot's shift to usage-based billing. An interactive /limits command lets users view, set, or remove a cap mid-session, while the --max-ai-credits flag bounds automated, noninteractive runs so unattended agents cannot burn through a budget unchecked. The feature is in public preview for Individual, Business, and Enterprise plans.

Key Takeaways

  • Copilot CLI and SDK now support session-level AI credit caps, tracked across model calls, subagents, and background compaction work.
  • The /limits command lets developers view, set, or remove a spending cap mid-session without losing task progress.
  • The --max-ai-credits flag bounds noninteractive, scripted, or CI-driven agent runs to a fixed credit budget.
  • The cap is a soft limit: an in-flight response finishes even if it pushes usage slightly past the configured threshold.
  • The feature is in public preview for Individual, Business, and Enterprise plans, requiring Copilot CLI 1.0.66+ or SDK 1.0.5+.
  • The release directly addresses developer backlash over unpredictable credit consumption following Copilot's June 2026 usage-based billing transition.

Putting a Ceiling on Agent Spending

GitHub Copilot CLI and the Copilot SDK now support session-level AI credit limits, giving developers a way to cap how much an agent can spend before it has to check in. The feature tracks usage across the entire session, including model calls, subagents, and background work like context compaction, rather than just the visible chat responses.

Interactive and Automated Controls

In an interactive terminal session, developers can use the /limits command to view, set, or remove a spending cap at any time. When the limit is hit, Copilot pauses and asks permission to raise the threshold before continuing, rather than forcing the developer to restart the task from scratch. For noninteractive, automated runs, the kind used in CI pipelines or unattended background jobs, the new --max-ai-credits flag bounds a single run's spend, ending the job automatically once the cap is reached.

A Soft Cap, Not a Hard Stop

GitHub notes the limit functions as a soft cap: because usage only becomes visible once a response returns, a response already in progress will finish even if it pushes spend slightly past the configured limit.

Availability

The feature is in public preview for Copilot for Individuals, Business, and Enterprise, and requires Copilot CLI version 1.0.66 or later, or Copilot SDK version 1.0.5 or later. Developers can pick it up with the standard copilot update command.

Why It Matters

This ships directly into the aftermath of GitHub Copilot's June 2026 move to usage-based billing, which drew significant developer frustration over unpredictable credit consumption during long agentic sessions. Session limits give developers, especially those running unattended or scripted agent workflows, a concrete guardrail against runaway spend, rather than discovering after the fact that a single session consumed a large share of a monthly allotment.

Copilot CLI Adds AI Credit Session Limits | Yet Another Changelog