claude-code - 💡(How to fix) Fix [Bug] Token exhaustion causes CLI freeze without task completion [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#48061Fetched 2026-04-15 06:34:23
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×4commented ×1

Error Message

[{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server greptile invalid: Missing environment variables: GREPTILE_API_KEY\n at zDH (/$bunfs/root/src/entrypoints/cli.js:1698:33932)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T17:57:20.670Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server greptile invalid: Missing environment variables: GREPTILE_API_KEY\n at zDH (/$bunfs/root/src/entrypoints/cli.js:1698:33932)\n at async G (/$bunfs/root/src/entrypoints/cli.js:5976:10916)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T17:57:21.192Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server greptile invalid: Missing environment variables: GREPTILE_API_KEY\n at zDH (/$bunfs/root/src/entrypoints/cli.js:1698:33932)\n at async k (/$bunfs/root/src/entrypoints/cli.js:5976:11711)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T17:57:21.192Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server greptile invalid: Missing environment variables: GREPTILE_API_KEY\n at zDH (/$bunfs/root/src/entrypoints/cli.js:1698:33932)\n at async G (/$bunfs/root/src/entrypoints/cli.js:5976:10916)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T17:57:29.444Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server greptile invalid: Missing environment variables: GREPTILE_API_KEY\n at zDH (/$bunfs/root/src/entrypoints/cli.js:1698:33932)\n at async k (/$bunfs/root/src/entrypoints/cli.js:5976:11711)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T17:57:29.445Z"},{"error":"Error: Request was aborted.\n at qb_ (/$bunfs/root/src/entrypoints/cli.js:1287:12508)\n at next (native:1:11)\n at Yg7 (/$bunfs/root/src/entrypoints/cli.js:7894:9167)\n at next (native:1:11)\n at jg7 (/$bunfs/root/src/entrypoints/cli.js:7899:12433)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T18:41:57.165Z"},{"error":"Error: Request was aborted.\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:3448)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T18:41:57.333Z"}]

Code Example

[{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server greptile invalid: Missing environment variables: GREPTILE_API_KEY\n    at zDH (/$bunfs/root/src/entrypoints/cli.js:1698:33932)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T17:57:20.670Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server greptile invalid: Missing environment variables: GREPTILE_API_KEY\n    at zDH (/$bunfs/root/src/entrypoints/cli.js:1698:33932)\n    at async G (/$bunfs/root/src/entrypoints/cli.js:5976:10916)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T17:57:21.192Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server greptile invalid: Missing environment variables: GREPTILE_API_KEY\n    at zDH (/$bunfs/root/src/entrypoints/cli.js:1698:33932)\n    at async k (/$bunfs/root/src/entrypoints/cli.js:5976:11711)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T17:57:21.192Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server greptile invalid: Missing environment variables: GREPTILE_API_KEY\n    at zDH (/$bunfs/root/src/entrypoints/cli.js:1698:33932)\n    at async G (/$bunfs/root/src/entrypoints/cli.js:5976:10916)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T17:57:29.444Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server greptile invalid: Missing environment variables: GREPTILE_API_KEY\n    at zDH (/$bunfs/root/src/entrypoints/cli.js:1698:33932)\n    at async k (/$bunfs/root/src/entrypoints/cli.js:5976:11711)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T17:57:29.445Z"},{"error":"Error: Request was aborted.\n    at qb_ (/$bunfs/root/src/entrypoints/cli.js:1287:12508)\n    at next (native:1:11)\n    at Yg7 (/$bunfs/root/src/entrypoints/cli.js:7894:9167)\n    at next (native:1:11)\n    at jg7 (/$bunfs/root/src/entrypoints/cli.js:7899:12433)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T18:41:57.165Z"},{"error":"Error: Request was aborted.\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:3448)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T18:41:57.333Z"}]
RAW_BUFFERClick to expand / collapse

Bug Description Claude spent all my tokens, did not made a task, and now is totally freezed.. it did not complete the task 35min running

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.1.107
  • Feedback ID: 9ca3ce45-e105-4845-80d6-d7f6c0cb537b

Errors

[{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server greptile invalid: Missing environment variables: GREPTILE_API_KEY\n    at zDH (/$bunfs/root/src/entrypoints/cli.js:1698:33932)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T17:57:20.670Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server greptile invalid: Missing environment variables: GREPTILE_API_KEY\n    at zDH (/$bunfs/root/src/entrypoints/cli.js:1698:33932)\n    at async G (/$bunfs/root/src/entrypoints/cli.js:5976:10916)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T17:57:21.192Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server greptile invalid: Missing environment variables: GREPTILE_API_KEY\n    at zDH (/$bunfs/root/src/entrypoints/cli.js:1698:33932)\n    at async k (/$bunfs/root/src/entrypoints/cli.js:5976:11711)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T17:57:21.192Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server greptile invalid: Missing environment variables: GREPTILE_API_KEY\n    at zDH (/$bunfs/root/src/entrypoints/cli.js:1698:33932)\n    at async G (/$bunfs/root/src/entrypoints/cli.js:5976:10916)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T17:57:29.444Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server greptile invalid: Missing environment variables: GREPTILE_API_KEY\n    at zDH (/$bunfs/root/src/entrypoints/cli.js:1698:33932)\n    at async k (/$bunfs/root/src/entrypoints/cli.js:5976:11711)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T17:57:29.445Z"},{"error":"Error: Request was aborted.\n    at qb_ (/$bunfs/root/src/entrypoints/cli.js:1287:12508)\n    at next (native:1:11)\n    at Yg7 (/$bunfs/root/src/entrypoints/cli.js:7894:9167)\n    at next (native:1:11)\n    at jg7 (/$bunfs/root/src/entrypoints/cli.js:7899:12433)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T18:41:57.165Z"},{"error":"Error: Request was aborted.\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:3448)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T18:41:57.333Z"}]

extent analysis

TL;DR

Set the GREPTILE_API_KEY environment variable to resolve the mcp-config-invalid error.

Guidance

  • The error messages indicate a missing GREPTILE_API_KEY environment variable, which is required for the MCP server greptile to function correctly.
  • To mitigate the issue, set the GREPTILE_API_KEY environment variable before running the task.
  • Verify that the environment variable is set correctly by checking the variable's value in your terminal or environment settings.
  • If the issue persists, check the documentation for the MCP server greptile to ensure that the GREPTILE_API_KEY is set up correctly.

Example

export GREPTILE_API_KEY=your_api_key_here

Replace your_api_key_here with your actual API key.

Notes

The provided error messages suggest that the GREPTILE_API_KEY environment variable is not set, which is causing the MCP server greptile to fail. Setting this variable should resolve the issue. However, without more information about the MCP server greptile configuration, it's difficult to provide a more detailed solution.

Recommendation

Apply the workaround by setting the GREPTILE_API_KEY environment variable, as this is the most likely cause of the issue.

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