claude-code - 💡(How to fix) Fix [Bug] Session limit reached prematurely at 47% usage despite 53% remaining quota [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#52629Fetched 2026-04-24 06:02:01
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Participants
Timeline (top)
labeled ×5commented ×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 LWH (/$bunfs/root/src/entrypoints/cli.js:2736:30625)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-24T00:07:32.241Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n at LWH (/$bunfs/root/src/entrypoints/cli.js:2736:30625)\n at async Z (/$bunfs/root/src/entrypoints/cli.js:6300:11825)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-24T00:09:22.308Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n at LWH (/$bunfs/root/src/entrypoints/cli.js:2736:30625)\n at async G (/$bunfs/root/src/entrypoints/cli.js:6300:11019)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-24T00:09:22.309Z"},{"error":"Error: 1: Command failed with ERR_STREAM_PREMATURE_CLOSE: code --force --install-extension anthropic.claude-code\nPremature close \n at kpL (/$bunfs/root/src/entrypoints/cli.js:1687:4046)\n at async IpL (/$bunfs/root/src/entrypoints/cli.js:1687:1435)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-24T00:09:22.990Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n at LWH (/$bunfs/root/src/entrypoints/cli.js:2736:30625)\n at async Z (unknown)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-24T00:09:30.240Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n at LWH (/$bunfs/root/src/entrypoints/cli.js:2736:30625)\n at async G (unknown)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-24T00:09:30.241Z"}]

Code Example

[{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at LWH (/$bunfs/root/src/entrypoints/cli.js:2736:30625)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-24T00:07:32.241Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at LWH (/$bunfs/root/src/entrypoints/cli.js:2736:30625)\n    at async Z (/$bunfs/root/src/entrypoints/cli.js:6300:11825)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-24T00:09:22.308Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at LWH (/$bunfs/root/src/entrypoints/cli.js:2736:30625)\n    at async G (/$bunfs/root/src/entrypoints/cli.js:6300:11019)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-24T00:09:22.309Z"},{"error":"Error: 1: Command failed with ERR_STREAM_PREMATURE_CLOSE: code --force --install-extension anthropic.claude-code\nPremature close \n    at kpL (/$bunfs/root/src/entrypoints/cli.js:1687:4046)\n    at async IpL (/$bunfs/root/src/entrypoints/cli.js:1687:1435)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-24T00:09:22.990Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at LWH (/$bunfs/root/src/entrypoints/cli.js:2736:30625)\n    at async Z (unknown)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-24T00:09:30.240Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at LWH (/$bunfs/root/src/entrypoints/cli.js:2736:30625)\n    at async G (unknown)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-24T00:09:30.241Z"}]
RAW_BUFFERClick to expand / collapse

Bug Description in this session i had just used 47% limit still claude stopped respnsinding saying session limit reached restarts at 11:40 pm i had 53% limit left when i go to /account usage it shows 47% used

<img width="893" height="407" alt="Image" src="https://github.com/user-attachments/assets/7f2b5c4d-c88b-4494-b9c7-6d84e8ce20d0" />

Environment Info

  • Platform: darwin
  • Terminal: vscode
  • Version: 2.1.119
  • Feedback ID: 4baeef78-c802-4b57-94d1-2870c6492688

Errors

[{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at LWH (/$bunfs/root/src/entrypoints/cli.js:2736:30625)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-24T00:07:32.241Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at LWH (/$bunfs/root/src/entrypoints/cli.js:2736:30625)\n    at async Z (/$bunfs/root/src/entrypoints/cli.js:6300:11825)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-24T00:09:22.308Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at LWH (/$bunfs/root/src/entrypoints/cli.js:2736:30625)\n    at async G (/$bunfs/root/src/entrypoints/cli.js:6300:11019)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-24T00:09:22.309Z"},{"error":"Error: 1: Command failed with ERR_STREAM_PREMATURE_CLOSE: code --force --install-extension anthropic.claude-code\nPremature close \n    at kpL (/$bunfs/root/src/entrypoints/cli.js:1687:4046)\n    at async IpL (/$bunfs/root/src/entrypoints/cli.js:1687:1435)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-24T00:09:22.990Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at LWH (/$bunfs/root/src/entrypoints/cli.js:2736:30625)\n    at async Z (unknown)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-24T00:09:30.240Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at LWH (/$bunfs/root/src/entrypoints/cli.js:2736:30625)\n    at async G (unknown)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-24T00:09:30.241Z"}]

extent analysis

TL;DR

The issue is likely due to a configuration error, specifically a missing GITHUB_PERSONAL_ACCESS_TOKEN environment variable, which is causing the MCP server to fail.

Guidance

  • Check the environment variables set in the system or terminal to ensure that GITHUB_PERSONAL_ACCESS_TOKEN is properly configured.
  • Verify that the token is valid and has the necessary permissions to access the GitHub repository.
  • Review the error logs to confirm that the issue is indeed related to the missing environment variable.
  • Consider setting the GITHUB_PERSONAL_ACCESS_TOKEN environment variable manually or through a configuration file to resolve the issue.

Notes

The provided error logs suggest that the issue is related to a missing environment variable, but it's unclear why the variable is not being set or recognized. Further investigation into the system configuration and environment settings may be necessary to resolve the issue.

Recommendation

Apply workaround: Set the GITHUB_PERSONAL_ACCESS_TOKEN environment variable manually or through a configuration file to resolve the issue. This should allow the MCP server to function properly and access the GitHub repository.

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] Session limit reached prematurely at 47% usage despite 53% remaining quota [1 comments, 2 participants]