gemini-cli - 💡(How to fix) Fix Error in Terminal [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
google-gemini/gemini-cli#25751Fetched 2026-04-22 08:03:33
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
labeled ×1

Error Message

│ This is an unexpected error. Please file a bug report using the /bug tool. │ │ ✖ [ERROR] [IDEConnectionUtils] IDE fetch failed for http://127.0.0.1:61489/mcp TypeError: fetch failed │ │ [cause]: HeadersTimeoutError: Headers Timeout Error █│

RAW_BUFFERClick to expand / collapse

What happened?

[ACTION REQUIRED] 📎 PLEASE ATTACH THE EXPORTED CHAT HISTORY JSON FILE TO THIS ISSUE IF YOU FEEL COMFORTABLE SHARING IT.

What did you expect to happen?

│ ✖ ========================================= │ │ This is an unexpected error. Please file a bug report using the /bug tool. │ │ CRITICAL: Unhandled Promise Rejection! │ │ ========================================= │ │ Reason: TypeError: fetch failed │ │ Stack trace: │ │ TypeError: fetch failed │ │ at Object.processResponse (file:///opt/homebrew/Cellar/gemini-cli/0.38.2/libexec/lib/node_modules/@google/gemini-cli/bundle/chunk-IWSCP2GY.js:194045:20) │ │ at file:///opt/homebrew/Cellar/gemini-cli/0.38.2/libexec/lib/node_modules/@google/gemini-cli/bundle/chunk-IWSCP2GY.js:194426:23 │ │ at node:internal/process/task_queues:150:7 │ │ at AsyncResource.runInAsyncScope (node:async_hooks:226:14) │ │ at AsyncResource.runMicrotask (node:internal/process/task_queues:147:8) │ │ ✖ [ERROR] [IDEConnectionUtils] IDE fetch failed for http://127.0.0.1:61489/mcp TypeError: fetch failed │ │ at Object.processResponse (file:///opt/homebrew/Cellar/gemini-cli/0.38.2/libexec/lib/node_modules/@google/gemini-cli/bundle/chunk-IWSCP2GY.js:194045:20) │ │ at file:///opt/homebrew/Cellar/gemini-cli/0.38.2/libexec/lib/node_modules/@google/gemini-cli/bundle/chunk-IWSCP2GY.js:194426:23 { █│ │ [cause]: HeadersTimeoutError: Headers Timeout Error █│ │ at FastTimer.onParserTimeout [as _onTimeout] (file:///opt/homebrew/Cellar/gemini-cli/0.38.2/libexec/lib/node_modules/@google/gemini-cli/bundle/chunk-IWSCP2GY.js:181361:33) █│ │ at Timeout.onTick [as _onTimeout] (file:///opt/homebrew/Cellar/gemini-cli/0.38.2/libexec/lib/node_modules/@google/gemini-cli/bundle/chunk-IWSCP2GY.js:174425:18) █│ │ at listOnTimeout (node:internal/timers:605:17) █│ │ at process.processTimers (node:internal/timers:541:7) { █│ │ code: 'UND_ERR_HEADERS_TIMEOUT' █│ │ } █│ │ } █│ ╰───────────

Client information

  • CLI Version: 0.38.2
  • Git Commit: b0ed611a0
  • Session ID: af46aeb6-5a7c-4576-9203-2f27388a29b1
  • Operating System: darwin v25.9.0
  • Sandbox Environment: no sandbox
  • Model Version: gemini-3.1-pro-preview-customtools
  • Auth Type: gemini-api-key
  • Memory Usage: 579.0 MB
  • Terminal Name: xterm.js(6.1.0-beta.197)
  • Terminal Background: #1f1f1f
  • Kitty Keyboard Protocol: Supported
  • IDE Client: VS Code

Login information

No response

Anything else we need to know?

No response

extent analysis

TL;DR

The issue is likely caused by a timeout error when fetching data from http://127.0.0.1:61489/mcp, and a potential workaround is to increase the timeout value or check the server's response time.

Guidance

  • The error message HeadersTimeoutError: Headers Timeout Error suggests that the request to http://127.0.0.1:61489/mcp is timing out, which could be due to a slow server response or a network issue.
  • To verify, check the server's response time and adjust the timeout value accordingly.
  • Consider checking the server logs to see if there are any issues with the server's response.
  • If the issue persists, try increasing the timeout value to a higher number to see if it resolves the issue.

Notes

The provided information does not include details about the server or the network configuration, which could be relevant to resolving the issue. Additionally, the CLI Version is 0.38.2, but it is unclear if this is the latest version or if there are any known issues with this version.

Recommendation

Apply workaround: Increase the timeout value to a higher number to see if it resolves the issue, as the root cause of the problem is likely related to the timeout 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