claude-code - 💡(How to fix) Fix [Bug] Auto-compact threshold change in 2.1.117 causes 5x token usage increase without notification [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52522Fetched 2026-04-24 06:04:57
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
1
Timeline (top)
labeled ×4commented ×1

Error Message

[{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n at oJH (/$bunfs/root/src/entrypoints/cli.js:2756:30506)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T18:19:24.925Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n at oJH (/$bunfs/root/src/entrypoints/cli.js:2756:30506)\n at async G (/$bunfs/root/src/entrypoints/cli.js:6144:11019)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T18:19:25.505Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n at oJH (/$bunfs/root/src/entrypoints/cli.js:2756:30506)\n at async L (/$bunfs/root/src/entrypoints/cli.js:6144:11825)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T18:19:25.505Z"},{"error":"Error: 429 {"type":"error","error":{"type":"rate_limit_error","message":"This request would exceed your account's rate limit. Please try again later."},"request_id":"req_011CaMB1jBmwfqpmmom5N9g2"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:55186)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T18:26:18.347Z"},{"error":"Error: 429 {"type":"error","error":{"type":"rate_limit_error","message":"This request would exceed your account's rate limit. Please try again later."},"request_id":"req_011CaMB8BsomGAKTsmAhVzci"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:55186)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T18:27:45.971Z"},{"error":"Error: 429 {"type":"error","error":{"type":"rate_limit_error","message":"This request would exceed your account's rate limit. Please try again later."},"request_id":"req_011CaMB9iu98L64gTNJCW1nW"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:55186)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T18:28:07.…

Root Cause

Bug Description 2.1.117 changed Opus 4.7 auto-compact threshold from ~200K to ~1M tokens. Because every turn re-sends context, this 5x'd tokens-per-turn on identical
workflows. Combined with Pro/Max default effort going medium → high in the
same release, I exhausted both my Max 20x plan AND my Team plan in a single
day with no workflow change. Prior daily usage used a small fraction of the
same limits.

This was listed as a "Fixed" bullet but is effectively a ~5x reduction in
how many turns a subscription sustains per 5-hour window. That's a pricing- impact change, not a bug fix, and subscribers weren't notified.

Requests:

  1. Flag subscriber-impacting defaults changes in release notes with an explicit "Impact on subscribers" callout.
  2. Consider gating the compact threshold by subscription tier rather than
    just model context window — a Max subscriber on Opus 4.7 likely wants
    aggressive compacting even though the model supports 1M.
  3. Add a one-line notification in Claude Code when a release changes a
    default that affects token consumption.

Support ticket + public issue filed separately. Reference:
github.com/anthropics/claude-code/issues/52519

Code Example

[{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at oJH (/$bunfs/root/src/entrypoints/cli.js:2756:30506)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T18:19:24.925Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at oJH (/$bunfs/root/src/entrypoints/cli.js:2756:30506)\n    at async G (/$bunfs/root/src/entrypoints/cli.js:6144:11019)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T18:19:25.505Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at oJH (/$bunfs/root/src/entrypoints/cli.js:2756:30506)\n    at async L (/$bunfs/root/src/entrypoints/cli.js:6144:11825)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T18:19:25.505Z"},{"error":"Error: 429 {\"type\":\"error\",\"error\":{\"type\":\"rate_limit_error\",\"message\":\"This request would exceed your account's rate limit. Please try again later.\"},\"request_id\":\"req_011CaMB1jBmwfqpmmom5N9g2\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:55186)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T18:26:18.347Z"},{"error":"Error: 429 {\"type\":\"error\",\"error\":{\"type\":\"rate_limit_error\",\"message\":\"This request would exceed your account's rate limit. Please try again later.\"},\"request_id\":\"req_011CaMB8BsomGAKTsmAhVzci\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:55186)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T18:27:45.971Z"},{"error":"Error: 429 {\"type\":\"error\",\"error\":{\"type\":\"rate_limit_error\",\"message\":\"This request would exceed your account's rate limit. Please try again later.\"},\"request_id\":\"req_011CaMB9iu98L64gTNJCW1nW\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:55186)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T18:28:07.
RAW_BUFFERClick to expand / collapse

Bug Description 2.1.117 changed Opus 4.7 auto-compact threshold from ~200K to ~1M tokens. Because every turn re-sends context, this 5x'd tokens-per-turn on identical
workflows. Combined with Pro/Max default effort going medium → high in the
same release, I exhausted both my Max 20x plan AND my Team plan in a single
day with no workflow change. Prior daily usage used a small fraction of the
same limits.

This was listed as a "Fixed" bullet but is effectively a ~5x reduction in
how many turns a subscription sustains per 5-hour window. That's a pricing- impact change, not a bug fix, and subscribers weren't notified.

Requests:

  1. Flag subscriber-impacting defaults changes in release notes with an explicit "Impact on subscribers" callout.
  2. Consider gating the compact threshold by subscription tier rather than
    just model context window — a Max subscriber on Opus 4.7 likely wants
    aggressive compacting even though the model supports 1M.
  3. Add a one-line notification in Claude Code when a release changes a
    default that affects token consumption.

Support ticket + public issue filed separately. Reference:
github.com/anthropics/claude-code/issues/52519

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.1.118
  • Feedback ID: c1186d90-476d-4596-ac2a-69fd618d9bda

Errors

[{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at oJH (/$bunfs/root/src/entrypoints/cli.js:2756:30506)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T18:19:24.925Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at oJH (/$bunfs/root/src/entrypoints/cli.js:2756:30506)\n    at async G (/$bunfs/root/src/entrypoints/cli.js:6144:11019)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T18:19:25.505Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at oJH (/$bunfs/root/src/entrypoints/cli.js:2756:30506)\n    at async L (/$bunfs/root/src/entrypoints/cli.js:6144:11825)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T18:19:25.505Z"},{"error":"Error: 429 {\"type\":\"error\",\"error\":{\"type\":\"rate_limit_error\",\"message\":\"This request would exceed your account's rate limit. Please try again later.\"},\"request_id\":\"req_011CaMB1jBmwfqpmmom5N9g2\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:55186)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T18:26:18.347Z"},{"error":"Error: 429 {\"type\":\"error\",\"error\":{\"type\":\"rate_limit_error\",\"message\":\"This request would exceed your account's rate limit. Please try again later.\"},\"request_id\":\"req_011CaMB8BsomGAKTsmAhVzci\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:55186)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T18:27:45.971Z"},{"error":"Error: 429 {\"type\":\"error\",\"error\":{\"type\":\"rate_limit_error\",\"message\":\"This request would exceed your account's rate limit. Please try again later.\"},\"request_id\":\"req_011CaMB9iu98L64gTNJCW1nW\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:55186)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T18:28:07.…

Note: Content was truncated.

extent analysis

TL;DR

The issue is likely due to exceeded rate limits caused by increased token consumption after a recent update, and setting environment variables such as GITHUB_PERSONAL_ACCESS_TOKEN might be necessary for plugin configuration.

Guidance

  • Review recent updates and their impact on token consumption to understand the cause of the rate limit errors.
  • Check the documentation for the GITHUB_PERSONAL_ACCESS_TOKEN environment variable to ensure it is properly set for the plugin configuration.
  • Consider adjusting the compact threshold based on the subscription tier to mitigate the increased token consumption.
  • Monitor the rate limit errors and adjust the workflow accordingly to prevent future occurrences.

Example

No code example is provided due to the lack of specific code-related information in the issue.

Notes

The issue seems to be related to a recent update that increased token consumption, leading to rate limit errors. Setting the GITHUB_PERSONAL_ACCESS_TOKEN environment variable might resolve the plugin configuration issue, but the root cause of the rate limit errors needs to be addressed.

Recommendation

Apply a workaround by adjusting the compact threshold based on the subscription tier to reduce token consumption, as the issue is likely caused by the recent update.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [Bug] Auto-compact threshold change in 2.1.117 causes 5x token usage increase without notification [1 comments, 2 participants]