Follow Discord
Sweep 20 Nov 2026 · 19:55Z Build v2.1.330 547 read Stable v2.1.323 Latest v2.1.330 Next v2.1.330 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One capture · claude-docs

One read of Claude Documentationclaude-docs-20261119T180705Z

5 pages moved out of 296 read.

Pages moved 5 significant first
Pages read 296 in this capture
Captured 18:07 UTC
Corpus hash 6d8680448701 corpus-hash

What this read moved

1-5 of 5

office-agents/data-storage Changed · +45 / -7 lines

### Outlook data deleted when a sign-in ends

from line 62
6262 
6363| Store | Contents | Scoped to |
6464| - | - | - |
65| `claude-chat-history` | Conversation transcripts with their titles and timestamps, and some files in full. A transcript includes the document, email, and calendar content that Claude read. The add-in keeps images, PDFs, `.pptx` files, and `.potx` files that a user attaches, and every file that a user attaches to the chat in Outlook or in a third-party platform deployment. It also keeps any other file that Claude downloads to the device to work with, the files of skills a conversation used, and files returned by connectors, as well as data that Claude saves while it works. These files and data can include document content and, in Outlook, email and calendar data from Microsoft Graph. Each saved conversation also keeps the name, type, and size of every attached file and, in Excel, Word, and PowerPoint, the document's file path or URL | One user, one organization, one Office app |
65| `claude-chat-history` | Conversation transcripts with their titles and timestamps, and some files in full. A transcript includes the document, email, and calendar content that Claude read. The add-in keeps images, PDFs, `.pptx` files, and `.potx` files that a user attaches, and every file that a user attaches to the chat in Outlook, in a third-party platform deployment, or while code execution is off. It also keeps any other file that Claude downloads to the device to work with, the files of skills a conversation used, and files returned by connectors, as well as data that Claude saves while it works. These files and data can include document content and, in Outlook, email and calendar data from Microsoft Graph. Each saved conversation also keeps the name, type, and size of every attached file and, in Excel, Word, and PowerPoint, the document's file path or URL | One user, one organization, one Office app |
6666| `claude-local-skills` | Skills the user uploaded, including any templates bundled with them | The device profile, not the individual user |
6767| `claude-mcp-gateways` | Client registrations, and access and refresh tokens, for connectors the user has authorized | The connector's address, not the individual user |
6868| `claude-mail-style` | Claude for Outlook only: learned writing style, draft preferences, and scratchpad | One user |
from line 230
230230 
231231| Situation | Result |
232232| - | - |
233| A user signs out of Claude and signs back in | The same conversations. Signing out does not change the identity |
233| A user signs out of Claude and signs back in | In Excel, PowerPoint, and Word, the same conversations. Signing out does not change the identity. Outlook conversations in the same storage are deleted. See [Outlook data deleted when a sign-in ends](#outlook-data-deleted-when-a-sign-in-ends) |
234234| A different person signs in to Office on that device | They see their own conversations, not the previous user's. On Office builds that fall back to a per-installation identifier, both people resolve to the same identity and share one list |
235235| The same person opens the add-in on a second device | No conversations. Storage is per device and does not sync |
236236| A user's organization changes, such as joining or leaving a team plan | Earlier conversations stop appearing. They remain on disk under the previous organization |
237237| A deployment moves between a Claude account sign-in and a third-party platform, in either direction | Earlier conversations stop appearing. They remain on disk under the previous identity, and the add-in has no path to reach them |
238238 
239Changing connection mode is not a data loss event, because nothing is deleted,
240but it is an identity change and the history list follows the identity.
239Changing connection mode is an identity change, and the history list follows
240the identity. It deletes nothing in Excel, PowerPoint, or Word. Outlook
241conversations can be deleted, as described in
242[Outlook data deleted when a sign-in ends](#outlook-data-deleted-when-a-sign-in-ends).
241243 
242244One store derives identity differently from chat history. The Outlook writing
243245style guide has no per-installation fallback. Where there is neither a Claude
from line 262
260262| `claude-memory` | A note is kept until it is deleted or the browser profile is wiped. Claude can delete a note, for example when the user asks it to forget something. When Claude saves a note, the chat shows a notice with an Undo button, which removes the note or restores its earlier text. There is no setting to view or delete notes, and deleting saved conversations does not delete notes |
261263| `claude-office-inflight` | Each record is deleted when its tool call ends, or when the user stops Claude, starts a new chat, or opens a saved conversation. It is also deleted while Claude waits for the user to answer a question or approve an action, and written again afterwards. If Office or the add-in closes or reloads during the call, the record is deleted the next time a Claude for M365 add-in that uses the same store opens, once more than 10 minutes have passed since the call began |
262264| `claude-office-snipped-results` | Emptied when the user starts a new chat or deletes all chats. Replaced with a saved conversation's parts when a saved conversation is opened. Content left when the add-in closes stays until Claude next moves content out of its working context or asks for moved content back, a saved conversation is opened, or a new chat starts |
265| Claude for Outlook data | Also deleted at a sign-out or an account switch. See [Outlook data deleted when a sign-in ends](#outlook-data-deleted-when-a-sign-in-ends) |
263266| Everything else | Kept until the user deletes it or the browser profile is wiped |
264267 
265268Users clear their own conversations from the add-in's settings. Under "Chat
266269history", "Delete all" removes every saved conversation for that user in that
267Office app and starts a new chat.
270Office app and starts a new chat. In Claude for Outlook, "Delete all" also
271deletes what Claude has learned about the user's writing, as described next.
268272 
269273In Claude for Outlook, users can also delete what Claude has learned about their
270274writing. Under "Writing style" in the add-in's settings, "Delete what Claude has
from line 308
304308the practical control is the device profile lifecycle, such as roaming-profile
305309cleanup or reimaging, rather than a setting in the add-in.
306310 
311### Outlook data deleted when a sign-in ends
312 
313At a sign-out or an account switch, the add-in deletes Claude for Outlook data
314from the storage that it is using. Deleted data cannot be recovered, because
315no server keeps a copy to restore it from. The add-in deletes the following:
316 
317* Saved Outlook conversations and their attachments.
318* The writing style guide, scratchpad, saved edits to drafts, and draft
319 preferences in `claude-mail-style`.
320* The text in the Writing style field, and the text that Claude added to the
321 Outlook Instructions field.
322* Everything in `claude-office-snipped-results`.
323 
324Conversations in Excel, PowerPoint, and Word are kept, and so are memory notes.
325The table below shows when the deletion happens.
326 
327| Event | When the data is deleted | Whose data is deleted |
328| - | - | - |
329| The user signs out in Outlook, or in an Office app that shares its storage | Immediately, after the user confirms | Every user's |
330| A different Claude account opens Claude for Outlook, and the previous account left conversations or writing style data | When the user selects "Delete and continue". Selecting "Use another account" signs out and deletes nothing | The previous account's |
331 
332The Writing style and Instructions fields and `claude-office-snipped-results`
333are shared by all users of the storage, so a deletion can change them for the
334signed-in user too.
335 
336A deletion that is interrupted is tried again when a task pane next opens, up
337to five times. An account switch is noticed only if the previous account was
338signed in on a version of the add-in that has this behavior.
339 
340If a Claude account sign-in is revoked, expires, or ends on a network failure,
341nothing is deleted until one of the two events in the table happens. On a third-party platform connection, only signing out deletes this data.
342 
343In Claude for Government, only signing out deletes this data.
344 
307345## What leaves the device
308346 
309347The table below covers each category and its destination, so you can scope a
from line 350
312350| Data | Where it goes |
313351| - | - |
314352| Conversation text, attachments, and the document content Claude is asked to work with | The model endpoint your deployment is configured for. In third-party platform deployments that is your own Vertex AI, Bedrock, Azure, or gateway endpoint |
315| Files that a user attaches, with a Claude account sign-in | Uploaded to Anthropic with the user's Claude sign-in when the user attaches them, before the message is sent. Each file expires 28 days after the add-in uploads it. If Anthropic does not accept an expiry for the user's organization, the add-in uploads the file with no expiry. The add-in does not delete files itself. Earlier versions of the add-in set no expiry on the files they uploaded. The add-in started setting an expiry on September 15, 2026 |
353| Files that a user attaches, with a Claude account sign-in | Uploaded to Anthropic with the user's Claude sign-in when the user attaches them, before the message is sent. Each file expires 28 days after the add-in uploads it. If Anthropic does not accept an expiry for the user's organization, the add-in uploads the file with no expiry. The add-in does not delete files itself. Earlier versions of the add-in set no expiry on the files they uploaded. The add-in started setting an expiry on September 15, 2026. If the organization's Claude settings turn off "Code execution and file creation", or the add-in can't read those settings, the add-in does not upload files and Claude does not run code on Anthropic's servers. The add-in reads the files on the device and sends what Claude reads from them, and attached images, to the model endpoint |
316354| Dictated audio, with a Claude account sign-in | Streamed through Anthropic's server at `pivot.claude.ai` to Anthropic's transcription service while the user dictates. The transcribed text returns the same way. See [Use dictation in Claude for M365](https://claude.com/docs/office-agents/dictation.md) |
317| Chat history, uploaded skills, and connector registrations | Not synced between devices and not backed up on any server. The add-in still sends their contents to the model endpoint when Claude uses them, as the rows above describe. Every chat request includes the name and description of each skill that is turned on. With a Claude account sign-in, it also includes the name and description of each plugin the user has turned on, with the names of its skills and connectors, and the organization's Claude settings can turn skills off, which stops both. When Claude uses a skill, the add-in also sends the skill's instructions and Markdown files. With a Claude account sign-in, files attached in a chat are also uploaded to Anthropic |
355| Chat history, uploaded skills, and connector registrations | Not synced between devices and not backed up on any server. The add-in still sends their contents to the model endpoint when Claude uses them, as the rows above describe. Every chat request includes the name and description of each skill that is turned on. With a Claude account sign-in, it also includes the name and description of each plugin the user has turned on, with the names of its skills and connectors, and the organization's Claude settings can turn skills off, which stops both. When Claude uses a skill, the add-in also sends the skill's instructions and Markdown files. With a Claude account sign-in, files attached in a chat are also uploaded to Anthropic, unless code execution is off |
318356| Claude for Outlook writing style guide, draft preferences, and scratchpad | Not synced between devices and not backed up on any server. The add-in reads sent mail to build the style guide only when the user has just agreed to it, once for each agreement, and stores no standing agreement. It asks during setup if Claude can already reach the mailbox. Wherever the add-in has a per-user key to mark the guide with, as described in "What chat history is keyed to", Settings has a "Learn my writing style" button under Writing style. The button first says what Claude will read, and the read runs after the user confirms. Learning the style again takes the same button and the same confirmation. Nothing else starts this read: not loading the add-in, a new chat, a change of user, a timer, or an earlier attempt that failed. To build the guide, the add-in sends recent sent mail, with the first recipient's address of each message, to the model endpoint. Earlier versions built the guide without asking. When the chat pane finds such a guide and can tell that it is this user's, it asks whether to use it or delete it, and reads nothing either way. A guide that it cannot tell is this user's, such as one whose Voice pattern or Notes lines the user has edited, stays in the field and is not sent, and Settings says so. If the user has removed enough of a guide's labelled lines, the add-in treats what is left as the user's own text and sends it with chat requests. Learning draft preferences from the user's edits to drafts is off unless Anthropic turns it on. While it is on, the add-in saves the user's edits to drafts on the device, sends them to the model endpoint to build the draft preferences, and adds a summary of the draft preferences to the Instructions field in Settings. Turning it off does not delete edits to drafts or draft preferences already saved on the device, and does not remove a summary already added to the Instructions field. The user can delete that summary in Settings. When the user says in chat how drafts should sound, Claude can propose a change to one line of the Writing style field, or to one sentence of a long line. A card shows the new text and the text it replaces, and the change is saved only if the user allows it. Proposing or saving a change does not start a read of sent mail. Claude does not propose changes if the user has turned off "Let Claude suggest improvements" under Instructions in Settings. Every Outlook chat request includes the Instructions field and any text the user wrote or allowed in the Writing style field. It includes a guide built from sent mail only for the user who agreed to build it or to use it. Versions of the add-in from April 13 to 17, 2026 wrote a short writing-style note into the Instructions field between two marker lines, and chat requests leave that note out. The add-in puts the draft preferences summary on one line between two marker lines. While learning draft preferences is off, chat requests leave out a summary that is still in that form. If those lines have been edited, the add-in may not recognize the summary, and then sends it with the rest of the Instructions field. Every message the user sends in Outlook includes the scratchpad. The user can delete this data from the device, with the exceptions described in [Data retention](#data-retention) |
319357| Sign-in credentials | To the services the sign-in is for, with two exceptions described last. A Bedrock sign-in sends the Entra ID token to AWS, which exchanges it for short-lived credentials. A Claude account token also goes to `claude.ai` with feature-flag requests. While the user dictates, it also goes to Anthropic's server at `pivot.claude.ai`, which uses it to open the connection to Anthropic's transcription service. The exceptions: a credential that you put in the query string of the manifest URL also reaches Anthropic's server at `pivot.claude.ai` each time the add-in loads, and the server's request logs record it. A Vertex AI sign-in also returns Google's one-time authorization code to `pivot.claude.ai` in the query string, where request logs can record it. The code cannot be exchanged for a token without your OAuth client secret, so keep the client secret out of the manifest URL query string too. See [Keep credentials out of the manifest URL query string](https://claude.com/docs/office-agents/third-party-platforms.md#keep-credentials-out-of-the-manifest-url-query-string) |
320358| Identifiers on model requests | Each request for a model response carries the name of the add-in, a random identifier for the device, and a session ID. For a chat message, the session ID is the conversation's ID. The add-in also sends helper requests to the same endpoint. In every Office app, they summarize a long conversation, write the status line shown while Claude thinks, and, when memory is on, check an entry before Claude saves it. In Word and PowerPoint, they check how the document or a slide looks after Claude edits it, and in Word they also check Claude's reasoning before it edits legal language. In Outlook, they rewrite a passage the user selects in a draft, learn the user's writing style from recent sent mail each time the user agrees to it, and, while learning draft preferences is on, learn draft preferences from the user's edits to drafts. Each helper request carries a session ID made from the kind of helper request, the device identifier, and the date in UTC, so helper requests of one kind from one device on one day share a session ID. With a Claude account sign-in, requests also carry the user's account ID. In third-party platform deployments, requests carry no account ID and no email address. The short test requests that the add-in sends to check which models and features your endpoint supports, such as web search and code execution, carry none of these values |

office-agents/outlook Changed · +3 / -2 lines

from line 658
658658 
659659Chat history is stored locally in your browser using IndexedDB. It is
660660not synced across devices or browsers. You can clear all chat history
661from Settings at any time. The local store is also cleared when you
662clear your browser data. Chat history is specific to the combination of
661from Settings at any time, which also deletes what Claude has learned
662about your writing. Signing out of Claude in Outlook deletes both. The
663local store is also cleared when you clear your browser data. Chat history is specific to the combination of
663664the add-in surface, your user ID, and your organization ID, so your
664665Excel and Outlook histories are separate. Reinstalling the add-in or
665666switching between Claude add-ins does not remove it. See

office-agents/third-party-platforms Changed · +4 / -2 lines

from line 321
321321| `addin.access` | Kill switch: the add-in refuses to run. |
322322| `file.upload` | Blocks attaching files to the conversation. |
323323| `web_search` | Removes the built-in web search and web fetch tools, whose queries are served by Anthropic's search provider, along with the user-facing web search toggle. Code execution is unaffected. |
324| `code_execution` | Removes server-side code execution, where Claude runs Python in a sandbox outside the user's device. Attached files stay in the add-in, which reads them there. Web search, and the code Claude runs in the add-in to read and edit the open document, are unaffected. |
324325| `permission_mode.accept_all_edits` | Keeps users in "Ask before edits": "Accept all edits" and "Skip all permissions" can't be turned on, and users already in either mode go back to "Ask before edits". Connector "Always allow" choices and Outlook's "Always allow mailbox search" are unaffected. |
325326| `permission_mode.dangerously_always_allow` | Removes the "Dangerously always allow" button from approval cards. It switches users to the mode shown as "Skip all permissions"; users already in that mode are moved to "Accept all edits". |
326327 
from line 721
720721If your gateway API token expires or your IT team provides a new URL,
721722select Logout from the account menu and sign in again with your new
722723credentials. This applies to LLM gateway, Bedrock, Vertex AI, and
723Foundry direct connections alike.
724Foundry direct connections alike. Logging out deletes saved Claude for
725Outlook conversations, as described in
726[Data storage and retention](https://claude.com/docs/office-agents/data-storage.md#outlook-data-deleted-when-a-sign-in-ends).
724727 
725728## Gateway requirements for IT teams
726729 
from line 1082
10791082| `https://pivot.claude.ai/auth/callback` | Web | admin consent confirmation page, receives only `admin_consent` and `tenant` from Microsoft. Google sign-in for Vertex AI reuses this URI for its [OAuth authorization-code redirect](#oauth-authorization-code-redirects) |
10801083| `https://pivot.claude.ai/msal-redirect.html` | Single-page application | MSAL response bridge for Office on the web, where the host cannot broker tokens natively |
10811084| `brk-multihub://pivot.claude.ai` | Single-page application | Nested App Authentication broker on Office desktop and Mac |
1082| `https://pivot.claude.ai/auth/3p` | Web | legacy entry from earlier builds, not used by current builds, scheduled for removal |
10831085 
10841086### Verify this in your own environment
10851087 

third-party/claude-desktop/gateway Changed · +23 / -5 lines

#### Context window for unrecognized model IDs

from line 505
505505 
506506If your gateway doesn't implement `GET /v1/models`, give every `inferenceModels` entry the full model ID your gateway accepts. When every entry is a full model ID, the app skips the `/v1/models` call automatically. A bare tier alias such as `sonnet` can't be resolved without discovery, so a list that contains one keeps discovery on. If discovery stays on, a gateway that answers the call with an error makes the app fall back to the `inferenceModels` list immediately. A gateway that accepts the call and hangs delays the model list by up to 10 seconds at launch.
507507 
508A session assumes 200K tokens for a model ID it doesn't recognize as having a native 1M context window (see [Context window and compaction](#context-window-and-compaction)). If your deployment supports the 1M-token context window for that model, set `supports1m: true` on its entry, as described under [Model list and default model](https://claude.com/docs/third-party/claude-desktop/models.md#model-list-and-default-model).
508A session assumes 200K tokens for a model ID it doesn't recognize as having a native 1M context window (see [Context window and compaction](#context-window-and-compaction)). If your deployment supports the 1M-token context window for that model, [set a larger context window for it](https://claude.com/docs/third-party/claude-desktop/models.md#set-a-larger-context-window-for-a-model).
509509 
510510### Context window and compaction
511511 
512Cowork and Code sessions keep a long conversation within the model's context window by compacting it. To compact, the session sends one request that asks the model to summarize the conversation so far, then continues from the summary. Through a gateway, a session can't read the model's real context window from the provider, so it assumes one from the model ID and the picker entry:
512Chat, Cowork, and Code sessions keep a long conversation within the model's context window by compacting it. To compact, the session sends one request that asks the model to summarize the conversation so far, then continues from the summary. Through a gateway, a session can't read the model's real context window from the provider, so it assumes one from the model ID and the picker entry:
513513 
514514* **Standard entry**: 1M tokens for a model the session recognizes as having a native 1M context window, as listed under [the context window behind a gateway](https://code.claude.com/docs/en/model-config#context-window-behind-a-gateway) in the Claude Code documentation, and 200K tokens for every other model ID, including an ID the session doesn't recognize whose `inferenceModels` entry doesn't set [`behavesAs`](https://claude.com/docs/third-party/claude-desktop/models#map-an-unrecognized-model-id-to-a-claude-model). On Claude Desktop versions earlier than 2.19675.0, a session assumes 200K tokens on this entry for every model.
515515* **1M context window entry**, or the single entry from `prefer1m` or `modelPrefer1mContext`: 1M tokens, regardless of the model ID.
516516 
517If the gateway or the provider accepts less than the window a session assumes, requests past that limit fail. The session then compacts and retries only when the provider's too-long error reaches it unchanged. To make sessions compact earlier than the window they assume, for example when your provider serves a natively 1M model with only a 200K window, see [Set the auto-compact window](https://code.claude.com/docs/en/model-config#set-the-auto-compact-window) in the Claude Code documentation. For a model ID the session doesn't recognize, see [Correct the window for a gateway or custom model ID](https://code.claude.com/docs/en/model-config#correct-the-window-for-a-gateway-or-custom-model-id).
517If the gateway or the provider accepts less than the window a session assumes, requests past that limit fail. The session then compacts and retries only when the provider's too-long error reaches it unchanged. To make sessions compact earlier than the window they assume, for example when your provider serves a natively 1M model with only a 200K window, see [Set the auto-compact window](https://code.claude.com/docs/en/model-config#set-the-auto-compact-window) in the Claude Code documentation. For a model ID the session doesn't recognize, see [Context window for unrecognized model IDs](#context-window-for-unrecognized-model-ids).
518518 
519519The following table lists what the model configuration and the gateway need to provide so that sessions use the full context window and compact when they reach it, and how to check each requirement.
520520 
521521| Requirement | What fails without it | How to check |
522522| - | - | - |
523| Set `supports1m`, or mark the model in discovery (see [Models](#models)), for each model your provider serves with a 1M-token context window but a session assumes 200K tokens for. Also accept the `context-1m-2025-08-07` value in the `anthropic-beta` request header. | Sessions on such a model's standard picker entry assume a 200K-token window, even when the provider accepts 1M. A gateway that rejects the header value fails every request made from the **1M context window** entry. | From a session on the **1M context window** entry, confirm in the gateway's logs that requests carry the header value and that requests above 200K input tokens succeed. |
523| [Set a larger context window](https://claude.com/docs/third-party/claude-desktop/models.md#set-a-larger-context-window-for-a-model) for each model your provider serves with a 1M-token context window but a session assumes 200K tokens for. With discovery, mark the model (see [Models](#models)) and set `modelPrefer1mContext`. Where you use `supports1m` or mark the model, also accept the `context-1m-2025-08-07` value in the `anthropic-beta` request header. | Sessions on the model assume a 200K-token window, even when the provider accepts 1M. If the gateway rejects the header value with a `400` whose message contains `context-1m-2025-08-07`, the session sends the request again without the value and assumes a 200K-token window. After a `400` with only your gateway's own text, such as `upstream rejected the request`, the session doesn't send the request again, and the user's first message fails. | From a new session that uses the 1M window, confirm in the gateway's logs that requests above 200K input tokens succeed and, where you use `supports1m` or mark the model, that requests carry the header value. |
524524| [Stream responses](https://code.claude.com/docs/en/llm-gateway-protocol#streaming) through without buffering, including the provider's SSE `ping` events, and set the response timeout on every proxy and load balancer on the route longer than your slowest complete response. | The summary request carries the whole conversation, and while the provider works on it, pings can be the only bytes on the connection. If a proxy buffers them, the session sees no bytes and gives up after about five minutes, and if a proxy's response timeout is shorter than the response takes, it ends the request with its own error, such as `504`. | Run a streaming request with `curl -N` against the hostname clients use and confirm that events print as they are generated, not in one burst at the end. |
525525| Return the provider's `usage` object unchanged on every response, including `cache_creation_input_tokens` and `cache_read_input_tokens`. | The session counts the conversation's tokens from the `usage` of the latest response. With the cache fields missing it undercounts, and requests reach the provider's limit before the session compacts. | Compare the `usage` object in the gateway's upstream response log with the one the client receives for the same request. They should be identical, and where the provider supports prompt caching, `cache_read_input_tokens` is above zero after the first turn. |
526526| [Forward the provider's status code and error body unchanged](https://code.claude.com/docs/en/llm-gateway-protocol#automatic-retry-and-error-forwarding) when it rejects a request. | Where the provider's too-long error is the compaction trigger, the session compacts and retries only if that error reaches it unchanged. With a rewritten error, the session shows the error and doesn't compact. | Send an oversized request through the gateway and confirm that the client receives the provider's status code and error body. |
from line 527
527527 
528528On a response that delivers only keep-alive pings, a session accepts about five minutes of pings and then waits [`inferenceStreamIdleTimeoutSec`](https://claude.com/docs/third-party/claude-desktop/configuration#inferencestreamidletimeoutsec) seconds more for model output (300 by default, so about ten minutes in all). Raise that key if your provider needs longer than that before its first output on a large request.
529529 
530#### Context window for unrecognized model IDs
531 
532A session assumes a 200K-token window for a model ID that it doesn't recognize, such as a routing alias whose `inferenceModels` entry doesn't set `behavesAs`, even when your provider accepts more. It compacts a long conversation near 200K tokens. If the summary request fails, the turn stops with `Prompt is too long`. The session doesn't send the request for Claude's reply to your gateway, even when your provider would accept it. For what users see and can do, see [`Your context window is full`](#troubleshoot) under Troubleshoot.
533 
534If the model behind the ID accepts more than 200K tokens, declare its window:
535 
536* **In your configuration**, for a model that accepts 1M-token requests: [set a larger context window for the model](https://claude.com/docs/third-party/claude-desktop/models.md#set-a-larger-context-window-for-a-model).
537* **On each device**, for a window other than 1M tokens: set [`CLAUDE_CODE_MAX_CONTEXT_TOKENS`](https://code.claude.com/docs/en/model-config#which-ids-claude_code_max_context_tokens-applies-to) to the window in tokens, such as `500000`, in the `env` block of [Claude Code managed settings](https://code.claude.com/docs/en/settings#settings-files). It changes the window only where a session would assume 200K tokens for an ID that it doesn't recognize. It does that for every such ID on the device, so use the smallest window among the models behind them. If the device already has Claude Code managed settings, add the variable to those settings and leave [`parentSettingsBehavior`](https://claude.com/docs/third-party/claude-desktop/code#interaction-with-claude-code%E2%80%99s-own-managed-settings) as it is, set or unset. If the device has none yet, also set `parentSettingsBehavior` to `"merge"` in the settings that you create.
538 
539A [Claude apps gateway](https://code.claude.com/docs/en/claude-apps-gateway) doesn't accept `inferenceModels` in its policy's `desktop` block, so you can't set `behavesAs` or `prefer1m` on a model there. For the gateway's own ways to offer the 1M context window, see [Extended context in Claude Desktop](https://code.claude.com/docs/en/claude-apps-gateway-config#extended-context-in-claude-desktop) in the Claude Code documentation.
540 
530541### Gateway requirements for preserved thinking
531542 
532543On models with [preserved thinking](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking), the provider ties each thinking block that Claude produces to the `system`, `tools`, and `messages` content that came before it. A session sends the thinking blocks from earlier turns back in later requests. That content can change after Claude produces a block, for example in your gateway or after a Claude Desktop update. If it has changed, the provider can reject the request with a `400` whose message says that the block is `bound to a different conversation`.
from line 751
740751 
741752**The 1M context window entry does not appear in the picker.** `supports1m` takes effect only when the entry's `name` matches the model ID the picker uses. Setting it on a bare alias (for example `sonnet`) while discovery returns full model IDs produces no match. Set `supports1m` on an entry whose `name` is the exact ID your gateway's `/v1/models` endpoint returns. With `prefer1m` or `modelPrefer1mContext` set, a model whose `name` matches has one entry and no **1M context window** label.
742753 
743**`Your context window is full` in a Code session, or `Couldn’t compact this conversation to free up space. Try again, or start a new session.` in a Cowork session.** The app shows these when Claude Code reports `Prompt is too long · automatic compaction failed: …`, meaning a session tried to compact the conversation and the summary request failed. On Claude Desktop versions earlier than 2.37337, a Cowork session shows `This conversation is too long to continue. Start a new session, or remove some tools to free up space.` for the same failure. The conversation isn't lost. After you fix the cause, the user's next message in the same session retries compaction. The error the summary request returned is in the gateway's logs as the response to the session's last `POST /v1/messages` request before the failure. Match it to a cause as follows.
754**`Your context window is full`.** The app shows this card when Claude Code reports `Prompt is too long · automatic compaction failed: …`. A session tried to shorten the conversation by summarizing it (compacting), and the summary request failed. In Chat and Cowork, the card also reads `Couldn’t compact this conversation to free up space. Try again, or start a new session.` On Claude Desktop versions earlier than 2.37337, a Cowork session shows `This conversation is too long to continue. Start a new session, or remove some tools to free up space.` for the same failure. The conversation isn't lost:
744755 
756* **Code**: before the card appears, the session runs `/compact` itself, up to two times. If one run succeeds, Claude continues with no action from the user.
757* **Chat and Cowork**: after you fix the cause, **Try again** compacts the conversation and finishes the stopped turn. While summary requests still fail, **Go back** removes the user's last message and puts its text back in the message box, so the user can go on with a smaller request.
758 
759After you fix the cause, the user's next message in the same session also retries compaction. The error the summary request returned is in the gateway's logs as the response to the session's last `POST /v1/messages` request before the failure. Match it to a cause as follows.
760 
745761* **A timeout, `504`, or `524`**: a proxy or load balancer on the route closed the summary response before it finished. See the streaming requirement in [Context window and compaction](#context-window-and-compaction).
746762* **`401`, `402`, or `403`**: the gateway credential expired, or the gateway's quota for the user is spent. Have the user sign in again or issue a new key, or raise the quota.
747763* **`API returned an empty or malformed response`**: after certain streaming failures, such as a stream that stops partway, Claude Code sends the summary request again with the `stream` field set to `false`. This message means that the non-streaming request got a success status but a body that wasn't a Messages API response, for example an empty body, an HTML page, a stream of server-sent events, or JSON in another format. Find that request in the gateway's logs and check what the gateway returned for it. If the request isn't in the logs, something in front of the gateway, such as a proxy, firewall, or sign-in page, answered it.
748764* **`400` with your gateway's own error text**: the gateway rejected the summary request itself, for example on a request-size or token limit of its own. Raise or remove that limit for these requests.
765 
766On a routing alias or another model ID that sessions don't recognize, a session compacts near 200K tokens, even when your provider accepts more. To declare a larger window, see [Context window for unrecognized model IDs](#context-window-for-unrecognized-model-ids). Then have the user relaunch Claude Desktop and start a new session. If you already set `supports1m` or marked the model, check that your gateway accepts the header value, as described in [Context window and compaction](#context-window-and-compaction).
749767 
750768For `Prompt is too long` without `automatic compaction failed`, or your gateway's own request-too-large error shown in the session, check the `usage` and error-forwarding requirements in [Context window and compaction](#context-window-and-compaction) first. [Prompt is too long](https://code.claude.com/docs/en/errors#prompt-is-too-long) in the Claude Code error reference covers the other causes.
751769 

third-party/claude-desktop/models Changed · +30 / -1 lines

### Set a larger context window for a model

from line 20
2020On any provider, a Chat conversation, Cowork session, or Code session on an entry without `supports1m` assumes a context window from the model ID:
2121 
2222* **An ID recognized as a model with a native 1M context window**, such as `us.anthropic.claude-opus-5`: you don't need `supports1m` or `prefer1m`. Setting them doesn't change the assumed window. For earlier Claude Desktop versions, see [Context window and compaction](https://claude.com/docs/third-party/claude-desktop/gateway.md#context-window-and-compaction) on the LLM gateway page. To check a model, see [Extended context](https://code.claude.com/docs/en/model-config#extended-context) in the Claude Code documentation, which lists the models that run with the 1M window by default.
23* **An ID for a model without a native 1M context window, or an unrecognized ID whose entry doesn't set `behavesAs`**, such as `us.anthropic.claude-opus-4-6-v1` or a gateway routing alias: the assumed window is 200K tokens. If your deployment accepts 1M-token requests for the model, set `supports1m` on its entry.
23* **An ID for a model without a native 1M context window, or an unrecognized ID whose entry doesn't set `behavesAs`**, such as `us.anthropic.claude-opus-4-6-v1` or a gateway routing alias: the assumed window is 200K tokens. If your deployment accepts 1M-token requests for the model, [set a larger context window for it](#set-a-larger-context-window-for-a-model).
2424* **An unrecognized ID whose entry sets [`behavesAs`](#map-an-unrecognized-model-id-to-a-claude-model)**, through an LLM gateway: the assumed window is the window of the model that `behavesAs` names.
25 
26### Set a larger context window for a model
27 
28A session compacts a long conversation to fit the context window that it assumes for the model, even when your provider accepts more. If your deployment accepts 1M-token requests for a model that sessions assume 200K tokens for, declare that on the model's `inferenceModels` entry:
29 
30* **A gateway routing alias for a Claude model with a native 1M context window**, such as Claude Sonnet 5: set [`behavesAs`](#map-an-unrecognized-model-id-to-a-claude-model) to that model's ID. New sessions on the alias assume that model's window.
31* **Any other model that your deployment serves with a 1M context window**: set `supports1m` and `prefer1m`. New Chat conversations, Cowork sessions, and Code sessions on the model request the 1M context window from your provider. With `supports1m` alone, only sessions that a user starts on the **1M context window** entry get the larger window.
32 
33The following configuration declares a larger window for two gateway routing aliases:
34 
35```json theme={null}
36{
37 "inferenceModels": [
38 {
39 "name": "acme-claude-sonnet",
40 "behavesAs": "claude-sonnet-5"
41 },
42 {
43 "name": "acme-claude-large",
44 "supports1m": true,
45 "prefer1m": true
46 }
47 ]
48}
49```
50 
51After users [relaunch Claude Desktop](https://claude.com/docs/third-party/claude-desktop/configuration-format.md#when-a-configuration-change-on-a-device-takes-effect) and start a new session on either alias, the session goes past 200K tokens without compacting. To confirm it in your gateway's logs, see the first requirement under [Context window and compaction](https://claude.com/docs/third-party/claude-desktop/gateway.md#context-window-and-compaction) on the LLM gateway page.
52 
53Declare a larger window only for a model that accepts the larger requests. If the model accepts less, requests past its real limit fail at your provider. Through a gateway, the session then compacts only if the gateway forwards the provider's too-long error unchanged.
2554 
2655## Effort levels
2756 
Feedback