SIGNAL
Tracking the global AI frontier — labs · research · agents · policy
Frontier Signal
Create

Set AI credit session limits in Copilot CLI and SDK

You can now set AI credit session limits in Copilot CLI and the GitHub Copilot SDK to cap the amount an agent spends in a session. This is especially useful… The post Set AI credit session limits in Copilot CLI and SDK appeared first on The GitHub Blog.

Set AI credit session limits in Copilot CLI and SDK
Primary source github.blog ↗

Published July 1, 2026 · Category: AI Create

Overview

You can now set AI credit session limits in Copilot CLI and the GitHub Copilot SDK to cap the amount an agent spends in a session. This is especially useful for automation, where no one is actively monitoring the agent’s work.

Set a limit before you start work or kick off jobs, and Copilot tracks AI credit usage across the entire session, including model calls, subagents, and background work like compaction. When the limit is reached, the agent wraps up and lets you know instead of running until the task is finished or until you manually stop it.

  • In an interactive session, use /limits to view, set, or remove your limit. When it’s reached, Copilot prompts you to raise or adjust it and then continues from where it stopped. There’s no need to restart the task.
  • For noninteractive runs, pass --max-ai-credits to bound a single run. The run ends when the limit is reached, so it’s easy to use in scripts.

Session limits are a soft cap. Since usage is only known after a response returns, a response that’s already underway finishes before Copilot stops, so actual usage may slightly exceed the number you set. A session limit controls spend for one session—it complements, but doesn’t replace, your overall budgets and spending limits.

Session limits are available in public preview for Copilot for Individuals, Business, and Enterprise, and are subject to change. They’re supported in Copilot CLI 1.0.66 and later, and in Copilot SDK 1.0.5 and later.

Details

To get started, update GitHub Copilot CLI by running copilot update in your terminal. To learn more, see Setting a session limit in Copilot CLI and Optimize AI usage.

Share feedback with the /feedback command in a CLI session or open an issue in our public repository.

The post Set AI credit session limits in Copilot CLI and SDK appeared first on The GitHub Blog.

Source

Originally published at github.blog.

Related Articles

F
Frontier Signal Desk

Frontier Signal tracks the global AI frontier — labs, research, agents, creation tools and real-world practice — straight from primary sources. Tip the desk: editorial@news.tunx.ai

Email the desk →
From our network: explore the AI assistant platform behind this site. Visit tunx.ai →
Note: This story is aggregated and summarized from the primary source linked above; the original publisher retains all rights. Details may evolve after publication — always confirm against the source. Nothing here is professional, legal or investment advice.

Related Stories

More from Create →