Skip to content

fix(core): preserve Claude context windows - #61136

Draft
Aurantium-47 wants to merge 1 commit into
anomalyco:devfrom
Aurantium-47:claude-context-windows
Draft

Aurantium-47 wants to merge 1 commit into
anomalyco:devfrom
Aurantium-47:claude-context-windows

Conversation

@Aurantium-47

Copy link
Copy Markdown

Issue for this PR

Closes #61020

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Recheck connected Claude Agent catalogs when a model lacks its context window. A chat's startup report now reuses the latest stored windows instead of its location's startup snapshot. Fresh probe values still take precedence.

How did you verify your code works?

  • Both regressions fail before the fix.
  • On current dev, Claude provider tests passed 10 times: 840 passed.
  • Core typecheck:tsc and root bun run check passed (35 tasks).
  • Tests use recorded Claude protocol exchanges and SQLite, not a live account.
  • The full Core run on the preceding base had 17 unrelated failures; all 17 reproduced with unchanged production code.

Visual

<svg xmlns="http://www.w3.org/2000/svg" width="240" height="72" viewBox="0 0 240 72">
  <style>@media(prefers-reduced-motion:no-preference){.window{animation:pulse 2s infinite}}@keyframes pulse{50%{opacity:.45}}</style>
  <g fill="none" stroke="currentColor">
    <rect x="8" y="16" width="88" height="40" rx="6" opacity=".4"/>
    <path d="M105 36h27m-6-5 6 5-6 5" opacity=".6"/>
    <rect class="window" x="144" y="16" width="88" height="40" rx="6"/>
  </g>
  <g fill="currentColor" font-family="monospace" font-size="11" text-anchor="middle">
    <text x="52" y="40" opacity=".6">missing</text>
    <text x="188" y="40">restored</text>
  </g>
</svg>

Screenshots / recordings

Not a UI change; provider catalog and storage logic only.

Checklist

  • Local tests run (AI-assisted; results above)
  • No unrelated changes

AI assistance was used for implementation, tests and review.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

claude-agent: saved model catalog loses context windows, models fall back to 200K and compaction triggers early

1 participant