fix: hide unknown Claude context usage - #308
Merged
Merged
Conversation
Model: gpt-5.6-sol
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue
Internal same-repository fix; no issue is required for contribution intake.
Problem / pressure
Claude models whose runtime metadata omits a
1mmarker temporarily appear to have a 200K context window, even when the SDK later reports a 1M authoritative window. The placeholder is presented as fact and creates a misleading first-turn experience.Summary
nullinstead of 200K.result.modelUsage.Before / after
used / 200Kuntil its first result.Test plan
pnpm --filter acp-extension-claude buildpnpm --filter acp-extension-claude test:run— 813 passed, 20 skippedpnpm --filter acp-extension-claude checkContext handoff
Instructions for reviewing agents
usage_updateemission, and the model-switch clear path in the Claude adapter.result.modelUsage.contextWindowwill keep usage hidden; no live authenticated Claude API run was performed.Authoring context
getContextUsagecall.null, while model switches emit numeric0/0solely to clear the previously persisted display.