claude-code - 💡(How to fix) Fix [Bug] Response streaming duplicates and drops content [1 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#51724Fetched 2026-04-22 07:54:32
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×4cross-referenced ×1

Error Message

[{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server terraform invalid: Missing environment variables: TFE_TOKEN\n at RMH (/$bunfs/root/src/entrypoints/cli.js:2752:30332)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T16:48:32.317Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n at RMH (/$bunfs/root/src/entrypoints/cli.js:2752:30332)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T16:48:32.317Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n at RMH (/$bunfs/root/src/entrypoints/cli.js:2752:30332)\n at async G (/$bunfs/root/src/entrypoints/cli.js:6147:11019)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T16:48:32.770Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server terraform invalid: Missing environment variables: TFE_TOKEN\n at RMH (/$bunfs/root/src/entrypoints/cli.js:2752:30332)\n at async G (/$bunfs/root/src/entrypoints/cli.js:6147:11019)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T16:48:32.770Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server terraform invalid: Missing environment variables: TFE_TOKEN\n at RMH (/$bunfs/root/src/entrypoints/cli.js:2752:30332)\n at async k (/$bunfs/root/src/entrypoints/cli.js:6147:11826)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T16:48:32.770Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n at RMH (/$bunfs/root/src/entrypoints/cli.js:2752:30332)\n at async k (/$bunfs/root/src/entrypoints/cli.js:6147:11826)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T16:48:32.770Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n at RMH (/$bunfs/root/src/entrypoints/cli.js:2752:30332)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T18:00:53.065Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server terraform invalid: Missing environment variables: TFE_TOKEN\n at RMH (/$bunfs/root/src/entrypoints/cli.js:2752:30332)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T18:00:53.065Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n at RMH (/$bunfs/root/src/entrypoints/cli.js:2752:30332)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T18:00:53.065Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server terraform invalid: Missing environment variables: TFE_TOKEN\n at RMH (/$bunfs/root/src/entrypoints/cli.js:2752:30332)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T18:00:53.065Z"},{"error":"McpError: MCP error -32001: user-cancel\n at f (/$bunfs/root/src/entrypoints/cli.js:93:55308)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:93:55566)\n at abort (unknown)\n at A51 (/$bunfs/root/src/entrypoints/cli.js:814:3782)\n at abort (unknown)\n at A51 (/$bunfs/root/src/entrypoints/cli.js:814:3782)\n at abort (unknown)\n at Yr (/$bunfs/root/src/entrypoints/cli.js:8417:7787)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8379:4675)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:621:9219)","timestamp":"2026-04-21T18:39:29.677Z"},{"error":"McpToolCallError: request failed: internal query returned 400: {"errors":[{"title":"Bad Request","detail":"unrecognized function 'regexp_extract' at 1:7"}]}\n at KR7 (/$bunfs/root/src/entrypoints/cli.js:4768:63)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T18:40:57.435Z"},{"error":"Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 201385 tokens > 200000 maximum"},"request_id":"req_011CaHWYVBDsKRxh5CiLoV7q"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:54074)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T20:00:03.235Z"},{"error":"Error: 400 {"…

Code Example

[{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server terraform invalid: Missing environment variables: TFE_TOKEN\n    at RMH (/$bunfs/root/src/entrypoints/cli.js:2752:30332)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T16:48:32.317Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at RMH (/$bunfs/root/src/entrypoints/cli.js:2752:30332)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T16:48:32.317Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at RMH (/$bunfs/root/src/entrypoints/cli.js:2752:30332)\n    at async G (/$bunfs/root/src/entrypoints/cli.js:6147:11019)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T16:48:32.770Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server terraform invalid: Missing environment variables: TFE_TOKEN\n    at RMH (/$bunfs/root/src/entrypoints/cli.js:2752:30332)\n    at async G (/$bunfs/root/src/entrypoints/cli.js:6147:11019)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T16:48:32.770Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server terraform invalid: Missing environment variables: TFE_TOKEN\n    at RMH (/$bunfs/root/src/entrypoints/cli.js:2752:30332)\n    at async k (/$bunfs/root/src/entrypoints/cli.js:6147:11826)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T16:48:32.770Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at RMH (/$bunfs/root/src/entrypoints/cli.js:2752:30332)\n    at async k (/$bunfs/root/src/entrypoints/cli.js:6147:11826)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T16:48:32.770Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at RMH (/$bunfs/root/src/entrypoints/cli.js:2752:30332)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T18:00:53.065Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server terraform invalid: Missing environment variables: TFE_TOKEN\n    at RMH (/$bunfs/root/src/entrypoints/cli.js:2752:30332)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T18:00:53.065Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at RMH (/$bunfs/root/src/entrypoints/cli.js:2752:30332)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T18:00:53.065Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server terraform invalid: Missing environment variables: TFE_TOKEN\n    at RMH (/$bunfs/root/src/entrypoints/cli.js:2752:30332)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T18:00:53.065Z"},{"error":"McpError: MCP error -32001: user-cancel\n    at f (/$bunfs/root/src/entrypoints/cli.js:93:55308)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:93:55566)\n    at abort (unknown)\n    at A51 (/$bunfs/root/src/entrypoints/cli.js:814:3782)\n    at abort (unknown)\n    at A51 (/$bunfs/root/src/entrypoints/cli.js:814:3782)\n    at abort (unknown)\n    at Yr (/$bunfs/root/src/entrypoints/cli.js:8417:7787)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8379:4675)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:621:9219)","timestamp":"2026-04-21T18:39:29.677Z"},{"error":"McpToolCallError: request failed: internal query returned 400: {\"errors\":[{\"title\":\"Bad Request\",\"detail\":\"unrecognized function 'regexp_extract' at 1:7\"}]}\n    at KR7 (/$bunfs/root/src/entrypoints/cli.js:4768:63)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T18:40:57.435Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 201385 tokens > 200000 maximum\"},\"request_id\":\"req_011CaHWYVBDsKRxh5CiLoV7q\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:54074)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T20:00:03.235Z"},{"error":"Error: 400 {\"…
RAW_BUFFERClick to expand / collapse

Bug Description The streaming of the response is broken. There is some dupplication and some part missing. look at the last 10mn conversation

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.1.116
  • Feedback ID: 751dccf1-80f1-4ff0-b3f3-94cf7dcee993

Errors

[{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server terraform invalid: Missing environment variables: TFE_TOKEN\n    at RMH (/$bunfs/root/src/entrypoints/cli.js:2752:30332)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T16:48:32.317Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at RMH (/$bunfs/root/src/entrypoints/cli.js:2752:30332)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T16:48:32.317Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at RMH (/$bunfs/root/src/entrypoints/cli.js:2752:30332)\n    at async G (/$bunfs/root/src/entrypoints/cli.js:6147:11019)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T16:48:32.770Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server terraform invalid: Missing environment variables: TFE_TOKEN\n    at RMH (/$bunfs/root/src/entrypoints/cli.js:2752:30332)\n    at async G (/$bunfs/root/src/entrypoints/cli.js:6147:11019)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T16:48:32.770Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server terraform invalid: Missing environment variables: TFE_TOKEN\n    at RMH (/$bunfs/root/src/entrypoints/cli.js:2752:30332)\n    at async k (/$bunfs/root/src/entrypoints/cli.js:6147:11826)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T16:48:32.770Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at RMH (/$bunfs/root/src/entrypoints/cli.js:2752:30332)\n    at async k (/$bunfs/root/src/entrypoints/cli.js:6147:11826)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T16:48:32.770Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at RMH (/$bunfs/root/src/entrypoints/cli.js:2752:30332)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T18:00:53.065Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server terraform invalid: Missing environment variables: TFE_TOKEN\n    at RMH (/$bunfs/root/src/entrypoints/cli.js:2752:30332)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T18:00:53.065Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at RMH (/$bunfs/root/src/entrypoints/cli.js:2752:30332)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T18:00:53.065Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server terraform invalid: Missing environment variables: TFE_TOKEN\n    at RMH (/$bunfs/root/src/entrypoints/cli.js:2752:30332)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T18:00:53.065Z"},{"error":"McpError: MCP error -32001: user-cancel\n    at f (/$bunfs/root/src/entrypoints/cli.js:93:55308)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:93:55566)\n    at abort (unknown)\n    at A51 (/$bunfs/root/src/entrypoints/cli.js:814:3782)\n    at abort (unknown)\n    at A51 (/$bunfs/root/src/entrypoints/cli.js:814:3782)\n    at abort (unknown)\n    at Yr (/$bunfs/root/src/entrypoints/cli.js:8417:7787)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8379:4675)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:621:9219)","timestamp":"2026-04-21T18:39:29.677Z"},{"error":"McpToolCallError: request failed: internal query returned 400: {\"errors\":[{\"title\":\"Bad Request\",\"detail\":\"unrecognized function 'regexp_extract' at 1:7\"}]}\n    at KR7 (/$bunfs/root/src/entrypoints/cli.js:4768:63)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T18:40:57.435Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 201385 tokens > 200000 maximum\"},\"request_id\":\"req_011CaHWYVBDsKRxh5CiLoV7q\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:54074)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T20:00:03.235Z"},{"error":"Error: 400 {\"…

Note: Content was truncated.

extent analysis

TL;DR

Set the required environment variables TFE_TOKEN and GITHUB_PERSONAL_ACCESS_TOKEN to resolve the mcp-config-invalid errors.

Guidance

  • The errors indicate missing environment variables TFE_TOKEN and GITHUB_PERSONAL_ACCESS_TOKEN, which are required for MCP server configuration.
  • Verify that these variables are set in your environment before running the application.
  • Check the documentation for the correct format and scope of these tokens.
  • Additionally, review the error messages for any other potential issues, such as the "prompt is too long" error, which may require adjusting the input or request parameters.

Example

No code snippet is provided as the issue is related to environment variable configuration.

Notes

The content was truncated, so there may be additional errors or issues not visible in the provided text. Ensure to review the full error log for a comprehensive understanding of the problem.

Recommendation

Apply workaround: Set the required environment variables TFE_TOKEN and GITHUB_PERSONAL_ACCESS_TOKEN to resolve the immediate errors, and then investigate any additional issues that may be present in the full error log.

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