Answer: Set maxAiCredits to the AI Credits soft cap for the session's current accounting window, passing it in sessionLimits when creating or resuming a session. For example, in TypeScript: sessionLimits: { maxAiCredits: 30 }. Status: Confirmed Entry: tool/github-copilot/pricing-and-limits/configure-session-limit Revision: 3 Digest: sha256:08569bdb94d706ef (changes whenever the content changes) Timeline: Created: 2026-11-13T03:28:13Z Last changed: 2026-11-19T13:02:11Z (Rust field: — → max_ai_credits) Last verified: 2026-11-20T13:08:35Z Next check: 2026-11-21T13:08:35Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Unit | Source | As of setting | maxAiCredits | | [1] | 2026-11-20 TypeScript example value | 30 | AI Credits | [1] | 2026-11-20 Python parameter | max_ai_credits | | [1] | 2026-11-20 Go field | MaxAiCredits | | [1] | 2026-11-20 .NET field | MaxAiCredits | | [1] | 2026-11-20 Java value | 30.0 | | [1] | 2026-11-20 Rust field | max_ai_credits | | [1] | 2026-11-20 Sources: [1] GitHub. "Session limits - GitHub Docs". https://docs.github.com/en/copilot/how-tos/copilot-sdk/features/session-limits Role: primary. Accessed: 2026-11-20T13:08:35Z Quote: "Set maxAiCredits to the AI Credits soft cap for the session's current accounting window." (Supports: setting) Quote: "sessionLimits : { maxAiCredits : 30 , }" (Supports: TypeScript example value) Quote: ""max_ai_credits" : 30" (Supports: Python parameter) Quote: "MaxAiCredits: copilot.Float64( 30 )" (Supports: Go field) Quote: "MaxAiCredits = 30 ," (Supports: .NET field) Quote: "new SessionLimitsConfig ( 30.0 )" (Supports: Java value) Quote: "max_ai_credits: Some ( 30.0 )" (Supports: Rust field) Snapshot SHA-256: 0b8f36acd4a302f3bfd50d4888498d26856ef92088a5318a39ea280908a871e3 (captured 2026-11-18T13:03:42Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-18T13:03:42Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:08:35Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:08:35Z Last attempt: 2026-11-20T13:08:35Z Notes and limitations: Extracted automatically from a single official source (section "Configure a session limit"). Related: https://latestn.com/tool/github-copilot/pricing-and-limits/control-app-spending How do I control how much GitHub Apps can spend on my organization's Copilot? https://latestn.com/tool/github-copilot/pricing-and-limits/control-cloud-sandbox-spending How do I control spending on GitHub Copilot cloud sandboxes for my organization or enterprise? https://latestn.com/tool/github-copilot/pricing-and-limits/control-usage-with-budgets How do I control GitHub Copilot AI credits usage with budgets? https://latestn.com/tool/github-copilot/pricing-and-limits/code-review-model-multiplier What is the model multiplier for GitHub Copilot code review? https://latestn.com/tool/github-copilot/pricing-and-limits/code-review-usage-and-billing How is GitHub Copilot code review usage billed and what happens when a budget is reached? https://latestn.com/tool/github-copilot/pricing-and-limits/combine-billing-models Can I combine the GitHub Enterprise and Copilot billing models? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-19T13:02:11Z | changed | Rust field: — → max_ai_credits | [1] 2026-11-19T13:02:11Z | changed | Java value: — → 30.0 | [1] 2026-11-19T13:02:11Z | changed | .NET field: — → MaxAiCredits | [1] 2026-11-19T13:02:11Z | changed | Go field: — → MaxAiCredits | [1] 2026-11-19T13:02:11Z | changed | Python parameter: — → max_ai_credits | [1] 2026-11-19T13:02:11Z | changed | TypeScript example value: — → 30 | [1] 2026-11-19T13:02:11Z | changed | setting: — → maxAiCredits | [1] 2026-11-19T13:02:11Z | changed | Forwarding behavior: The SDK forwards this value to the Copilot CLI when it creates or resumes the session. → — | [1] 2026-11-19T13:02:11Z | changed | Usage check timing: Usage is checked after model calls return → — | [1] 2026-11-19T13:02:11Z | changed | Python parameter name: max_ai_credits → — | [1] 2026-11-19T13:02:11Z | changed | Example value: 30 → — | [1] 2026-11-19T13:02:11Z | changed | Configuration parameter: maxAiCredits → — | [1] 2026-11-17T13:26:35Z | changed | Forwarding behavior: — → The SDK forwards this value to the Copilot CLI when it creates or resumes the session. | [1] 2026-11-17T13:26:35Z | changed | Usage check timing: — → Usage is checked after model calls return | [1] 2026-11-17T13:26:35Z | changed | Python parameter name: — → max_ai_credits | [1] 2026-11-17T13:26:35Z | changed | Configuration parameter: — → maxAiCredits | [1] 2026-11-17T13:26:35Z | changed | Setting: maxAiCredits → — | [1] 2026-11-13T03:28:13Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/github-copilot/pricing-and-limits/configure-session-limit/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/github-copilot/pricing-and-limits/configure-session-limit POST: https://latestn.com/dispute/tool/github-copilot/pricing-and-limits/configure-session-limit with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/github-copilot/pricing-and-limits/configure-session-limit?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I configure a session limit in the GitHub Copilot SDK? Revision 3, last verified 2026-11-20T13:08:35Z. https://latestn.com/tool/github-copilot/pricing-and-limits/configure-session-limit (accessed 2026-11-21T09:59:55Z). @misc{LatestN_tool_github_copilot_pricing_and_limits_configure_session_limit_r3, title = {How do I configure a session limit in the GitHub Copilot SDK?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/github-copilot/pricing-and-limits/configure-session-limit}}, note = {Revision 3; digest sha256:08569bdb94d706ef; last verified 2026-11-20T13:08:35Z; accessed 2026-11-21T09:59:55Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/github-copilot/pricing-and-limits/configure-session-limit