Answer: Call session.metadata.contextInfo, passing 0 for promptTokenLimit to use the runtime default and 0 for outputTokenLimit if the value is unknown. The result's contextInfo is null until the session has been initialized. Status: Confirmed Entry: tool/github-copilot/memory-and-context/context-info-breakdown Revision: 2 Digest: sha256:d45def88dcd742e3 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:28:25Z Last changed: 2026-11-16T12:52:47Z (outputTokenLimit unknown: — → 0) Last verified: 2026-11-20T13:08:49Z Next check: 2026-11-21T13:08:49Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of method | session.metadata.contextInfo | [1] | 2026-11-20 promptTokenLimit default | 0 | [1] | 2026-11-20 outputTokenLimit unknown | 0 | [1] | 2026-11-20 null condition | null | [1] | 2026-11-20 breakdown fields | systemTokens | [1] | 2026-11-20 Sources: [1] GitHub. "Usage and billing metrics - GitHub Docs". https://docs.github.com/en/copilot/how-tos/copilot-sdk/features/usage-and-billing Role: primary. Accessed: 2026-11-20T13:08:49Z Quote: "call session.metadata.contextInfo" (Supports: method) Quote: "Pass 0 for promptTokenLimit to use the runtime default" (Supports: promptTokenLimit default) Quote: "pass 0 for outputTokenLimit if the value is unknown" (Supports: outputTokenLimit unknown) Quote: "The result's contextInfo is null until the session has been initialized" (Supports: null condition) Quote: "It breaks the total down into systemTokens , conversationTokens , and toolDefinitionsTokens" (Supports: breakdown fields) Snapshot SHA-256: cb0242d1279dd59e34e0fb4befc4aebfcebcc228ef72f5e1fcaa30c9c94a9fc6 (captured 2026-11-18T13:03:59Z) 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:04:00Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:08:49Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:08:49Z Last attempt: 2026-11-20T13:08:49Z Notes and limitations: Extracted automatically from a single official source (section "On-demand breakdown with session.metadata.contextInfo"). Related: https://latestn.com/tool/github-copilot/memory-and-context/continue-vs-new-conversation When should I continue a GitHub Copilot Chat conversation versus start a new one? https://latestn.com/tool/github-copilot/memory-and-context/copilot-spaces-test-suggestions How can I use GitHub Copilot Spaces to improve test suggestions? https://latestn.com/tool/github-copilot/memory-and-context/create-first-custom-instructions How do I create my first custom instructions for GitHub Copilot? https://latestn.com/tool/github-copilot/memory-and-context/choose-repos-files-as-context How do I choose repositories or files as context in GitHub Copilot Spaces? https://latestn.com/tool/github-copilot/memory-and-context/compact-long-cli-sessions How do I compact long GitHub Copilot CLI sessions that I want to continue? https://latestn.com/tool/github-copilot/memory-and-context/compaction-behavior What does compaction do in GitHub Copilot and when does it happen? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-16T12:52:47Z | changed | outputTokenLimit unknown: — → 0 | [1] 2026-11-16T12:52:47Z | changed | outputTokenLimit unknown value: 0 → — | [1] 2026-11-13T03:28:25Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/github-copilot/memory-and-context/context-info-breakdown/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/memory-and-context/context-info-breakdown POST: https://latestn.com/dispute/tool/github-copilot/memory-and-context/context-info-breakdown with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/github-copilot/memory-and-context/context-info-breakdown?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I get an on-demand context breakdown with session.metadata.contextInfo in the GitHub Copilot SDK? Revision 2, last verified 2026-11-20T13:08:49Z. https://latestn.com/tool/github-copilot/memory-and-context/context-info-breakdown (accessed 2026-11-21T09:54:12Z). @misc{LatestN_tool_github_copilot_memory_and_context_context_info_breakdown_r2, title = {How do I get an on-demand context breakdown with session.metadata.contextInfo in the GitHub Copilot SDK?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/github-copilot/memory-and-context/context-info-breakdown}}, note = {Revision 2; digest sha256:d45def88dcd742e3; last verified 2026-11-20T13:08:49Z; accessed 2026-11-21T09:54:12Z} } 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/memory-and-context/context-info-breakdown