Cap Copilot agent spend before long CLI and SDK runs

GitHub's changelog image for new Copilot releases.GitHub Changelog
GitHub's changelog image for new Copilot releases.GitHub Changelog
Tools & Apps

GitHub Copilot now lets CLI and SDK users set AI credit limits per session, giving agent automation a soft spending cap before background work, subagents, and compaction run too far.

GitHub Copilot now supports AI credit session limits in Copilot CLI and the GitHub Copilot SDK. Confidence level: confirmed, with the feature still in public preview. The useful change is simple: teams can put a soft cap on a single agent session before unattended automation, subagents, and background work consume more credits than expected.

GitHub Copilot release artwork
GitHub Copilot release artwork
Image: GitHub changelog release artwork.

What changed

GitHub announced AI credit session limits for Copilot CLI and the GitHub Copilot SDK on July 1, 2026. The limits cap spending for one session, including model calls, subagents, and background work such as compaction.

Interactive CLI users can manage the cap with /limits. Noninteractive runs can pass --max-ai-credits before starting a task. GitHub says the feature is available in public preview for Copilot for Individuals, Business, and Enterprise, with support in Copilot CLI 1.0.66 or later and Copilot SDK 1.0.5 or later.

RouteHow to set itBest fitStatusCaveat
Copilot CLI interactive/limits set max-ai-credits NUMBERExploratory terminal sessionsPublic previewUser can raise or adjust the limit when prompted
Copilot CLI noninteractive--max-ai-credits=NUMBERScripts, scheduled jobs, automationPublic previewRun ends when the limit is reached
Copilot SDKSDK session limit supportProductized agent flowsPublic previewImplementation depends on SDK integration
Overall Copilot budgetsPlan and spending controlsAccount-level guardrailsExisting controlsSession caps complement, not replace, broader budgets

Why this is early

This is early because GitHub labels AI credit session limits as public preview and subject to change. The mechanism is documented, but teams should expect CLI behavior, SDK interfaces, and billing display details to evolve as GitHub collects usage feedback.

The claim is still strong enough to act on. GitHub published the changelog entry and the setup documentation, and independent coverage from GIGAZINE also described the /limits and --max-ai-credits paths.

Key takeaways

  • Copilot CLI and SDK sessions can now use per-session AI credit caps.
  • The cap includes model calls, subagents, and background work like compaction.
  • Interactive CLI sessions use /limits; scripted runs can use --max-ai-credits.
  • The cap is soft, because a response already in progress can finish before the session stops.
  • The feature is a preview, so production automation should log usage and failure behavior during rollout.

Availability and access

AI credit session limits are available in public preview for Copilot for Individuals, Business, and Enterprise. Teams need Copilot CLI 1.0.66 or later, while SDK users need Copilot SDK 1.0.5 or later.

GitHub Docs notes that one AI credit equals $0.01 USD, and usage depends on the model and token consumption. The docs also advise that session limits work best above 30 AI credits because many model calls can cost more than 20 credits.

Practical LinkLoot angle

Use session limits as a safety rail for agent tasks that can expand while nobody is watching. A repo migration, issue triage run, browser-testing loop, or multi-agent coding job should have a clear credit ceiling before it starts.

For teams already testing agent workflows, add a session cap to your run template and log what happened when the cap was reached. Track whether the agent stopped cleanly, summarized progress, left changes reviewable, and allowed continuation without restarting the work. LinkLoot's /guides/ai-workflow-automation hub is a useful reference when deciding which automations need hard human checkpoints.

What to verify before you act

  • Confirm your Copilot CLI is at version 1.0.66 or later, or your SDK is at 1.0.5 or later.
  • Test /limits set max-ai-credits NUMBER in an interactive session before using it in team docs.
  • For scripts, run a small task with --max-ai-credits=NUMBER and inspect the exit behavior.
  • Set account-level budgets separately; a session cap is not a full billing policy.
  • Log actual spend because soft caps can slightly exceed the configured number.

Source check

Confirmed by: GitHub's changelog confirms the feature, supported surfaces, preview status, version requirements, and the interactive plus noninteractive command paths. GitHub Docs confirms the setup steps, soft-limit behavior, and AI credit definition.

Independent context: GIGAZINE covered the same GitHub Copilot update and repeated the /limits and --max-ai-credits availability. LinkLoot will treat a move from public preview to general availability, changed version requirements, or SDK API changes as update triggers.

FAQ

They are per-session caps that limit how many GitHub AI Credits Copilot CLI or SDK can spend during one agent session.