[Bug] Claude Code: Limited Model Selection and Frequent Context Compaction/

Status Fixed / completed
Maintainer reply ✓ Yes — bcherny
Activity 6 comments · opened Oct 9, 2025 · closed Oct 17, 2025
💡 Likely answer: A maintainer (bcherny, collaborator) responded on this thread — see the highlighted reply below.

Bug Description
Why do i only see two models opus and sonnet 4.5 .. where is the sonnet 4.5 1m context and the 4.5 sonnet context is comptacting every few mins..

Environment Info

  • Platform: darwin
  • Terminal: WarpTerminal
  • Version: 2.0.11
  • Feedback ID: dd393b50-8281-43b5-83fb-e5028ac2d20b

Errors

[{"error":"Error: {\"stack\":\"Error: PeriodicExportingMetricReader: metrics export failed (error AggregateError)\\n    at eGB._doRun (file:///Users/asghar/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:484:145792)\\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\\n    at async eGB._runOnce (file:///Users/asghar/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:484:145029)\",\"message\":\"PeriodicExportingMetricReader: metrics export failed (error AggregateError)\",\"name\":\"Error\"}\n    at zL0.error (file:///Users/asghar/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2016:7697)\n    at jU0.error (file:///Users/asghar/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:484:6053)\n    at file:///Users/asghar/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:484:55072\n    at KE6 (file:///Users/asghar/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:484:55618)\n    at eGB._runOnce (file:///Users/asghar/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:484:145262)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-10-09T00:04:39.807Z"},{"error":"Error: {\"stack\":\"Error: PeriodicExportingMetricReader: metrics export failed (error AggregateError)\\n    at eGB._doRun (file:///Users/asghar/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:484:145792)\\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\\n    at async eGB._runOnce (file:///Users/asghar/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:484:145029)\",\"message\":\"PeriodicExportingMetricReader: metrics export failed (error AggregateError)\",\"name\":\"Error\"}\n    at zL0.error (file:///Users/asghar/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2016:7697)\n    at jU0.error (file:///Users/asghar/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:484:6053)\n    at file:///Users/asghar/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:484:55072\n    at KE6 (file:///Users/asghar/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:484:55618)\n    at eGB._runOnce (file:///Users/asghar/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:484:145262)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-10-09T00:06:39.809Z"},{"error":"Error: {\"stack\":\"Error: PeriodicExportingMetricReader: metrics export failed (error AggregateError)\\n    at eGB._doRun (file:///Users/asghar/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:484:145792)\\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\\n    at async eGB._runOnce (file:///Users/asghar/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:484:145029)\",\"message\":\"PeriodicExportingMetricReader: metrics export failed (error AggregateError)\",\"name\":\"Error\"}\n    at zL0.error (file:///Users/asghar/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2016:7697)\n    at jU0.error (file:///Users/asghar/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:484:6053)\n    at file:///Users/asghar/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:484:55072\n    at KE6 (file:///Users/asghar/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:484:55618)\n    at eGB._runOnce (file:///Users/asghar/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:484:145262)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-10-09T00:07:39.789Z"},{"error":"Error: {\"stack\":\"Error: PeriodicExportingMetricReader: metrics export failed (error AggregateError)\\n    at eGB._doRun (file:///Users/asghar/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:484:145792)\\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\\n    at async eGB._runOnce (file:///Users/asghar/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:484:145029)\",\"message\":\"PeriodicExportingMetricReader: metrics export failed (error AggregateError)\",\"name\":\"Error\"}\n    at zL0.error (file:///Users/asghar/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2016:7697)\n    at jU0.error (file:///Users/asghar/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:484:6053)\n    at file:///Users/asghar/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:484:55072\n    at KE6 (file:///Users/asghar/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:484:55618)\n    at eGB._runOnce (file:///Users/asghar/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:

Note: Error logs were truncated.

View original on GitHub ↗

6 Comments

github-actions[bot] · 10 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/9134
  2. https://github.com/anthropics/claude-code/issues/9089
  3. https://github.com/anthropics/claude-code/issues/7617

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

schuylr · 10 months ago

+1 to this. I restarted Claude this morning to get onto Sonnet 4.5 from Sonnet 4 and found that I'm hitting compaction every 5 minutes or so. This is markedly worse than Sonnet 4.

This issue is not a duplicate because it's specifically on the compaction frequency of Sonnet 4.5

Aeolun · 10 months ago

I don't think it's specifically 4.5 that is compacting. I had a perfectly fine experience with 4.5 before, but I guess I updated a few days ago and now it's compacting every 4 minutes... Or however long it takes, I don't keep track, but it's so much worse than before.

neifgmbh · 10 months ago

Same problem here. Version 2.0.14. Compaction occurs much more frequently than before, making it almost hard to work properly.

bcherny collaborator · 10 months ago

Fix landed, and is going out tomorrow morning. Thanks for the report!

github-actions[bot] · 10 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.