Original URL: https://getagenttools.com/blog/copilot-cli-context-window/

# Copilot CLI context window: /context, the 1M tier, and compaction near 80 percent

15 Nov 2026Marek.

- copilot
- coding-agents
- context-engineering

The Copilot CLI context window is set by the model you pick. Type `/context` to see how many tokens are in use out of that model's window. On 19 models the GitHub docs offer a 1M tier, picked in `/model` or with `--context long_context`. Copilot CLI compacts the history on its own near 80 percent. This post is for people who know the Claude Code side. I do not run Copilot CLI. Everything here comes from the GitHub docs and the CLI changelog up to 1.0.106, read on 6 November 2026.

 

```text
/context                          # tokens used out of the window, by category
/usage                            # token totals per model for the session
/compact focus on the auth module # manual summary with a focus
copilot --context long_context    # start on the 1M tier
```

  

- **Size.** Set by the model. The docs give no token count per model. The changelog calls the default tier about 200K.
- **Show.** `/context` for the breakdown, `/usage` for totals. A status line item exists and, per the 1.0.35 changelog, is off by default.
- **Change.** Switch the model, or switch its tier to 1M with Tab in `/model`.
- **Full.** Background compaction near 80 percent. A short pause near 95 percent.
- **How I know.** Docs and changelog only. No session of my own.

 

How the window fills in Claude Code, with the 33 edits I wasted after compaction, is in my [Claude Code context window](https://getagenttools.com/blog/claude-code-context-window/) post. This one is Copilot CLI.

 

## How big is the Copilot CLI context window?

 

It depends on the model. The docs do not print a number per model. The [context management page](https://docs.github.com/en/copilot/concepts/prompting-and-context/context-management) says the window "has a fixed size, measured in tokens, that varies by model". The changelog for 1.0.52 names two tiers, "default \~200K vs 1M tokens". The model picker shows the size, per the 1.0.106 changelog.

 

A [context window](https://getagenttools.com/blog/what-is-an-ai-context-window/) is everything the model can see at once. In Copilot CLI that means instructions, tool schemas, messages, replies and tool results.

 

The [supported models page](https://docs.github.com/en/copilot/reference/ai-models/supported-models) marks 19 models with a "1 million token context window", Claude Opus 5.5 and GPT-6.1 Sol among them. Claude Opus 4.8 in fast mode is the one row without it. The 1M window is available "in Visual Studio Code and Copilot CLI only" and uses more AI credits.

 

## How do I show context usage in Copilot CLI?

 

Type `/context`. Per the docs, the first line shows the active model and the tokens in use out of the window. Below that, each part gets tokens and a percent. The parts are System Prompt, Custom Instructions, System Tools, MCP Tools, Messages, Free Space and Buffer. Buffer is space "reserved for the model's response and headroom".

 

`/usage` shows what the session spent. The [command reference](https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-command-reference) lists "per-model token totals". `/context` shows how full the window is now.

 

For a constant gauge there is the status line. `/statusline`, alias `/footer`, picks the items. The settings key is `footer.showContextWindow`. Per the 1.0.35 changelog the context item is "hidden by default". The same release gave custom `statusLine` scripts context window fields.

 

## How do I change the context window size in Copilot CLI?

 

Pick a different model or a different tier. In `/model`, press Tab on a model with a long-context variant. Per the reference, that toggles "its Context column between the default and long-context window". `/model --session` keeps the change to the current session.

 

At launch, `--context` takes `default` or `long_context`. The reference says it "overrides the persisted setting" for tiered-pricing models. A trusted repository can pin the tier with `contextTier` in `.github/copilot/settings.json`. Subagents get their own `contextTier`.

 

I found no key for an arbitrary token count on GitHub-hosted models. Only your own provider takes a number. In `providers.json`, `maxContextWindowTokens` is "the total context-window limit, including input and output tokens".

 

## When does Copilot CLI compact the context?

 

Automatically near 80 percent, or when you type `/compact`. The context management page says compaction starts in the background at about 80 percent. That leaves room for tool calls to keep running. If usage hits about 95 percent first, Copilot CLI "pauses briefly" until the summary is done.

 

The CLI overview page adds a rule. When system messages and tool definitions already take about 75 percent of the window, Copilot waits until usage is closer to 90 percent. I found no setting that moves either threshold.

 

`/compact` takes optional focus text. Esc cancels it. The summary keeps goals, work done, important files and next steps. Your original instructions and the current plan stay. `/session checkpoints` lists the saved summaries. Per the docs, "You can't reverse a completed compaction."

 

## What happens when the Copilot CLI context window is full?

 

Per the docs, it should not get there. The [best practices page](https://docs.github.com/en/copilot/how-tos/copilot-cli/cli-best-practices) calls this "infinite sessions" and says "You don't need to worry about running out of context." Compaction swaps old history for a summary before the limit. Fine detail goes, such as the exact output of every command.

 

Dropping still exists as a fallback. The context management page says that without compaction Copilot "would have to fall back to simply dropping old messages". The 1.0.106 changelog adds a warning "when older messages are dropped for context limits". I do not know how often that happens in practice.

 

Tool output over 20 KiB goes to a temporary file. The model gets the path and a preview. `COPILOT_LARGE_OUTPUT_THRESHOLD_BYTES` changes that limit. Subagents run in separate windows, covered in [Copilot CLI subagents](https://getagenttools.com/blog/copilot-cli-subagents/).

 

## How does the Copilot CLI context window compare with Claude Code and Codex?

 

By default Copilot CLI compacts earliest of the three, near 80 percent. Codex starts at 90 percent. Claude Code compacts at the model limit unless you set `autoCompactWindow`. Claude Code and Copilot CLI offer 1M on some models. Codex caps an override at 872K.

 

|  | Copilot CLI (docs, 6 Nov 2026) | Claude Code | Codex CLI 0.166.0 |
| --- | --- | --- | --- |
| Default window | Per model, no number in the docs | 200K, 1M on models that support it | 500K or 272K by model |
| Larger window | 1M tier on 19 models | 1M on supported models, `[1m]` suffix on some | Override capped at 872K |
| Live view | `/context`, `/usage`, status line item | `/context`, status line script | `/status`, footer |
| Auto compaction | Near 80%, near 90% with heavy static context | At the limit, or `autoCompactWindow` | 90% of the window |
| Manual | `/compact` with focus text | `/compact` with a focus | `/compact` |

 

The Codex numbers and my tests are in [Codex context window](https://getagenttools.com/blog/codex-context-window/).

 

## Frequently asked questions

 

### How do I see the context window in Copilot CLI?

 

Type `/context` in a session. It shows the model, tokens in use out of the window, and a breakdown by part. `/usage` gives token totals per model. For a constant readout, turn on the context item with `/statusline`.

 

### Does Copilot CLI have a 1M context window?

 

Yes, on 19 models per the supported models page, on Copilot CLI and VS Code only. Pick it with Tab in `/model` or with `--context long_context`. The docs say it uses more AI credits.

 

### Can I turn off auto compaction in Copilot CLI?

 

I found no setting for it. The docs describe the thresholds as near 80, 90 and 95 percent. They name no key to change them. `/compact` lets you run it earlier by hand.

 

### Did you test this?

 

No. Copilot CLI is not installed on my machine. I read the GitHub docs pages and the CLI changelog up to 1.0.106 on 6 November 2026. Every behavior here is from those pages, not from my own session.

 

## The verdict

 

In Copilot CLI the model sets the window. `/context` is the gauge. The 1M tier is a Tab in `/model` or a flag at launch. Compaction starts near 80 percent. I found no way to move that. If you resume sessions often, [Copilot CLI resume](https://getagenttools.com/blog/copilot-cli-resume/) covers what carries over.

 

Sources, read on 6 November 2026: GitHub's [context management](https://docs.github.com/en/copilot/concepts/prompting-and-context/context-management) page, the Copilot CLI [command reference](https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-command-reference), [configuration directory reference](https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-config-dir-reference), [CLI overview](https://docs.github.com/en/copilot/how-tos/copilot-cli/use-copilot-cli/overview) and [best practices](https://docs.github.com/en/copilot/how-tos/copilot-cli/cli-best-practices) pages, the [supported models](https://docs.github.com/en/copilot/reference/ai-models/supported-models) page, and the [changelog](https://github.com/github/copilot-cli/blob/main/changelog.md) of github/copilot-cli. The Claude Code and Codex columns come from my earlier posts on each.

Put this into practice

[See the tool list](https://getagenttools.com/tools/)[Train your team](https://getagenttools.com/#training)
