claude-code - 💡(How to fix) Fix [Bug] Large assistant messages duplicate in terminal output [2 comments, 3 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#53718Fetched 2026-04-28 06:48:53
View on GitHub
Comments
2
Participants
3
Timeline
8
Reactions
0
Timeline (top)
labeled ×4commented ×2cross-referenced ×2

Error Message

[{"error":"McpError: MCP error -32603: MCP error -32603: Failed to get teams: GraphQL operation failed: It looks like you're trying to use an API key as a Bearer token. Remove the Bearer prefix from the Authorization header.\n at fromError (/$bunfs/root/src/entrypoints/cli.js:93:45042)\n at _onresponse (/$bunfs/root/src/entrypoints/cli.js:97:22808)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:97:18446)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:4829:14236)\n at processReadBuffer (/$bunfs/root/src/entrypoints/cli.js:842:29664)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:842:29269)\n at emit (node:events:95:22)\n at addChunk (internal:streams/readable:264:47)\n at readableAddChunkPushByteMode (internal:streams/readable:242:18)\n at handleNumberResult (internal:streams/native-readable:69:18)","timestamp":"2026-04-27T02:22:18.677Z"}]

Code Example

[{"error":"McpError: MCP error -32603: MCP error -32603: Failed to get teams: GraphQL operation failed: It looks like you're trying to use an API key as a Bearer token. Remove the Bearer prefix from the Authorization header.\n    at fromError (/$bunfs/root/src/entrypoints/cli.js:93:45042)\n    at _onresponse (/$bunfs/root/src/entrypoints/cli.js:97:22808)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:97:18446)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:4829:14236)\n    at processReadBuffer (/$bunfs/root/src/entrypoints/cli.js:842:29664)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:842:29269)\n    at emit (node:events:95:22)\n    at addChunk (internal:streams/readable:264:47)\n    at readableAddChunkPushByteMode (internal:streams/readable:242:18)\n    at handleNumberResult (internal:streams/native-readable:69:18)","timestamp":"2026-04-27T02:22:18.677Z"}]
RAW_BUFFERClick to expand / collapse

Bug Description

  • OS: macOS Darwin 25.4.0
  • Shell: zsh
  • 症状: 大きな(数百行)アシスタントメッセージが terminal scrollback に複数回重複描画される
  • 再現: 直前の Issue 草案の出力時
  • 影響: 内容自体は正しいが視認性が悪化

Environment Info

  • Platform: darwin
  • Terminal: vscode
  • Version: 2.1.119
  • Feedback ID: 4baab337-dac3-4678-8c30-7438fc4ce87b

Errors

[{"error":"McpError: MCP error -32603: MCP error -32603: Failed to get teams: GraphQL operation failed: It looks like you're trying to use an API key as a Bearer token. Remove the Bearer prefix from the Authorization header.\n    at fromError (/$bunfs/root/src/entrypoints/cli.js:93:45042)\n    at _onresponse (/$bunfs/root/src/entrypoints/cli.js:97:22808)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:97:18446)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:4829:14236)\n    at processReadBuffer (/$bunfs/root/src/entrypoints/cli.js:842:29664)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:842:29269)\n    at emit (node:events:95:22)\n    at addChunk (internal:streams/readable:264:47)\n    at readableAddChunkPushByteMode (internal:streams/readable:242:18)\n    at handleNumberResult (internal:streams/native-readable:69:18)","timestamp":"2026-04-27T02:22:18.677Z"}]

extent analysis

TL;DR

Remove the Bearer prefix from the Authorization header to resolve the GraphQL operation failure.

Guidance

  • Verify the Authorization header format in the API request to ensure it does not include the Bearer prefix.
  • Check the API documentation to confirm the correct format for the Authorization header.
  • Review the error message to identify any other potential issues with the API request.
  • Consider updating the code to handle API errors and exceptions more robustly.

Example

No code snippet is provided as the issue does not include sufficient code context.

Notes

The provided error message suggests a specific issue with the Authorization header, but the root cause of the duplicated terminal output is unclear and may require further investigation.

Recommendation

Apply workaround: Remove the Bearer prefix from the Authorization header, as this is the most direct solution to the identified error.

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] Large assistant messages duplicate in terminal output [2 comments, 3 participants]