gemini-cli - 💡(How to fix) Fix gemini cli bug [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#25737Fetched 2026-04-22 08:03:50
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. │

RAW_BUFFERClick to expand / collapse

What happened?

│ ℹ Loaded cached credentials. │ │ │ │ ℹ Detected terminal background color: #0c0c0c │ │ │ │ ⚠ [STARTUP] Phase 'load_builtin_commands' was started but never ended. Skipping metrics. │ │ ℹ Authenticated via "oauth-personal". │ │ ✖ ========================================= │ │ This is an unexpected error. Please file a bug report using the /bug tool. │ │ CRITICAL: Unhandled Promise Rejection! │ │ ========================================= │ │ Reason: RangeError: Invalid count value: -1 │ │ Stack trace: │ │ RangeError: Invalid count value: -1 │ │ at String.repeat (<anonymous>) │ │ at renderBorder (file:///C:/Users/samphao/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-AQRXALHQ.js:37307:89) │ │ at handleContainerNode (file:///C:/Users/samphao/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-AQRXALHQ.js:37360:5) │ │ at renderNodeToOutput (file:///C:/Users/samphao/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-AQRXALHQ.js:37784:5) │ │ at handleContainerNode (file:///C:/Users/samphao/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-AQRXALHQ.js:37469:9) │ │ at renderNodeToOutput (file:///C:/Users/samphao/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-AQRXALHQ.js:37784:5) │ │ at handleContainerNode (file:///C:/Users/samphao/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-AQRXALHQ.js:37469:9) │ │ at renderNodeToOutput (file:///C:/Users/samphao/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-AQRXALHQ.js:37784:5) │ │ at handleContainerNode (file:///C:/Users/samphao/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-AQRXALHQ.js:37469:9) │ │ at renderNodeToOutput (file:///C:/Users/samphao/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-AQRXALHQ.js:37784:5) (x65)

What did you expect to happen?

i dont know anything just want to create minecraft texture pack and this bug happend

Client information

  • CLI Version: 0.38.2
  • Git Commit: b0ed611a0
  • Session ID: 47ed5cbb-7cae-43db-bd48-f2ba2dfe14cb
  • Operating System: win32 v24.15.0
  • Sandbox Environment: no sandbox
  • Model Version: gemini-3-flash-preview
  • Auth Type: oauth-personal
  • Memory Usage: 470.1 MB
  • Terminal Name: Unknown
  • Terminal Background: #0c0c0c
  • Kitty Keyboard Protocol: Unsupported

Login information

No response

Anything else we need to know?

No response

extent analysis

TL;DR

The issue is likely caused by an invalid count value in the String.repeat function, which may be related to a bug in the @google/gemini-cli package.

Guidance

  • The error message indicates a RangeError: Invalid count value: -1 at String.repeat, suggesting that the issue is related to an invalid input to this function.
  • The stack trace points to the renderBorder function in the @google/gemini-cli package, which may be the source of the problem.
  • To mitigate the issue, you can try updating the @google/gemini-cli package to a newer version, if available.
  • If updating is not possible, you can try to identify the specific input that is causing the error and modify it to avoid the invalid count value.

Example

No code snippet is provided as the issue is related to a third-party package and the exact code change is unclear.

Notes

The issue may be specific to the @google/gemini-cli package version 0.38.2, and updating to a newer version may resolve the problem. However, without more information about the package or the specific input causing the error, it is difficult to provide a more specific solution.

Recommendation

Apply workaround: The best course of action is to try to update the @google/gemini-cli package to a newer version, if available, to see if the issue is resolved. If updating is not possible, you can try to identify the specific input causing the error and modify it to avoid the invalid count value.

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