-
Notifications
You must be signed in to change notification settings - Fork 38.9k
When /compact fails for auth token refresh, the error says otherwise. #296038
Copy link
Copy link
Open
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugchat
Description
- Copilot Chat Extension Version:
- VS Code Version:
- Version: 1.110.0-insider (user setup)
Commit: 3755352
Date: 2026-02-18T13:08:43.179Z
Electron: 39.6.0
ElectronBuildId: 13330601
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.19045 - OS Version:
- Feature (e.g. agent/edit/ask mode):
- Selected model (e.g. GPT 4.1, Claude 3.7 Sonnet): auto
- Logs:
2026-02-18 10:41:39.991 [info] ccreq:191c6d13.copilotmd | success | gpt-4o-mini -> gpt-4o-mini-2024-07-18 | 372ms | [copilotLanguageModelWrapper]
2026-02-18 11:24:49.508 [info] Fetched model metadata in 107ms 650c80b8-c9f0-49d6-82e8-89c7d99f4e8d
2026-02-18 11:24:49.546 [info] ccreq:c8d404d2.copilotmd | markdown
2026-02-18 11:24:50.141 [info] [ConversationHistorySummarizer] [full] summarization prompt rendered in 587ms.
2026-02-18 11:24:50.238 [info] Request ID for failed request: f9ec9004-9212-48d1-99d5-a7802cec5f80
2026-02-18 11:24:50.264 [error] Server error: 401 Invalid auto-mode selector
2026-02-18 11:24:50.268 [info] ccreq:c4d09853.copilotmd | badRequest | claude-haiku-4.5 | 126ms | [summarizeConversationHistory-full]
2026-02-18 11:24:50.269 [info] [ConversationHistorySummarizer] [full] Summarization request failed. badRequest token expired or invalid: 401
2026-02-18 11:24:51.318 [info] [ConversationHistorySummarizer] [simple] summarization prompt rendered in 1049ms.
2026-02-18 11:24:51.370 [info] Logged in as ChrisNolan
2026-02-18 11:24:51.768 [info] Got Copilot token for ChrisNolan
2026-02-18 11:24:51.768 [info] Copilot Chat: 0.38.2026021801, VS Code: 1.110.0-insider
2026-02-18 11:24:51.788 [info] AuthenticationService: firing onDidAuthenticationChange from handleAuthChangeEvent. Has token: true
2026-02-18 11:24:51.788 [info] copilot token sku: monthly_subscriber_quota
2026-02-18 11:24:51.788 [info] ConversationFeature: onDidAuthenticationChange has token: true
2026-02-18 11:24:51.788 [info] [code-referencing] Public code references are enabled.
2026-02-18 11:24:51.957 [info] Request ID for failed request: 45d1915e-0f11-4fc1-8b45-edabe5ceb0c5
2026-02-18 11:24:51.969 [error] Server error: 401 Invalid auto-mode selector
2026-02-18 11:24:51.972 [error] AbortError: This operation was aborted
at node:internal/deps/undici/undici:14902:13
at processTicksAndRejections (node:internal/process/task_queues:105:5)
at async n._fetch (/home/cnolan/.vscode-server-insiders/extensions/github.copilot-chat-0.38.2026021801/dist/extension.js:4991:26167)
at async n.fetch (/home/cnolan/.vscode-server-insiders/extensions/github.copilot-chat-0.38.2026021801/dist/extension.js:4991:25815)
at async Evr (/home/cnolan/.vscode-server-insiders/extensions/github.copilot-chat-0.38.2026021801/dist/extension.js:4991:29309)
at async Wx.fetch (/home/cnolan/.vscode-server-insiders/extensions/github.copilot-chat-0.38.2026021801/dist/extension.js:4991:32475)
at async uce._fetchLatestModels (/home/cnolan/.vscode-server-insiders/extensions/github.copilot-chat-0.38.2026021801/dist/extension.js:6334:15100): Failed to fetch model list
2026-02-18 11:24:51.974 [info] ccreq:f6bf9b0f.copilotmd | badRequest | claude-haiku-4.5 | 655ms | [summarizeConversationHistory-simple]
2026-02-18 11:24:52.009 [info] Fetched model metadata in 224ms 9e4da515-bfda-4554-bbca-d4748c8eb3ec
2026-02-18 11:24:52.043 [info] ccreq:cd4f77df.copilotmd | markdown
2026-02-18 11:24:52.047 [info] Logged in as ChrisNolan
2026-02-18 11:24:52.082 [info] [ConversationHistorySummarizer] [simple] Summarization request failed. badRequest token expired or invalid: 401
2026-02-18 11:24:52.372 [info] Got Copilot token for ChrisNolan
2026-02-18 11:24:52.372 [info] Copilot Chat: 0.38.2026021801, VS Code: 1.110.0-insider
2026-02-18 11:24:52.387 [info] AuthenticationService: firing onDidAuthenticationChange from handleAuthChangeEvent. Has token: true
2026-02-18 11:24:52.387 [info] copilot token sku: monthly_subscriber_quota
2026-02-18 11:24:52.387 [info] ConversationFeature: onDidAuthenticationChange has token: true
2026-02-18 11:24:52.387 [info] [code-referencing] Public code references are enabled.
2026-02-18 11:24:52.387 [info] AuthenticationService: firing onDidAuthenticationChange from handleAuthChangeEvent. Has token: true
2026-02-18 11:24:52.387 [info] copilot token sku: monthly_subscriber_quota
2026-02-18 11:24:52.387 [info] ConversationFeature: onDidAuthenticationChange has token: true
2026-02-18 11:24:52.387 [info] [code-referencing] Public code references are enabled.
2026-02-18 11:24:52.652 [info] Fetched model metadata in 266ms 4961f698-f69d-45b1-8aeb-4cc91d2b5f3a
2026-02-18 11:24:52.686 [info] ccreq:c1b0d931.copilotmd | markdown
2026-02-18 11:24:52.784 [info] AuthenticationService: firing onDidAuthenticationChange from handleAuthChangeEvent. Has token: true
2026-02-18 11:24:52.784 [info] copilot token sku: monthly_subscriber_quota
2026-02-18 11:24:52.784 [info] ConversationFeature: onDidAuthenticationChange has token: true
2026-02-18 11:24:52.784 [info] [code-referencing] Public code references are enabled.
2026-02-18 11:24:52.844 [info] Fetched model metadata in 61ms c2b6f244-b01e-4da4-8ba6-404f94dac504
2026-02-18 11:24:52.878 [info] ccreq:78e68f85.copilotmd | markdown
2026-02-18 11:25:03.052 [info] [ConversationHistorySummarizer] [full] summarization prompt rendered in 10ms.
2026-02-18 11:25:26.400 [info] ccreq:08f61017.copilotmd | success | gpt-5.2-codex | 23347ms | [summarizeConversationHistory-full]
Steps to Reproduce:
- Go away from your machine for an hour, come back and notice you're at 96% 'Context Window' and hit the 'compact' button which triggers /compact
- Behind the scenes get an error 401 as the token needs a refresh and it iddn't automatically refresh it (different issue) but for some reason the usual error message that shows for other chat requests that have this 401 issue that includes the 'retry' button doesn't show -- and it also gives irrelevant information in the error message that doesn't tell you want you need to know, e.g.:
Summarization request failed (at tsx element fM)
I noticed as well that the 2nd one used a different model. I wonder if this is a different issue -- i fI had been on Opus 4.6 (which I was) and then switched to 'auto' -- the context windows are different sizes... so can it not compact the full thing because the model it auto selected has a too small context window to take it? Note #295150 which also has the concern that maybe we're 'paying more' for the compact that we thing? Even in the above it used Haiku for the first failure, then codex 5.2 for the 2nd one -- 0.3x to 0.9x 🤷
Thanks for all your hard work on these tools!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugchat