google-gemini / google-gemini/gemini-cli

Error renderNodeToOutput makes CLI unusable after a single Edit file approval

Open
#25,483 2 comments 0 reactions 0 assignees View on GitHub
🔒 maintainer only area/core effort/medium kind/bug priority/p1 status/bot-triaged type/bug
Dominant language
TypeScript
Stars
107k
Forks
14.6k
Avg merge
2d 3h
Merged PRs (30d)
45

Description

### What happened?

Beginning: I opened Gemini CLI, gave it instructions to edit some Python files in a repo, it asked me 3 questions to clarify things (3.1-pro). After the answers, it wants to start making edits.

Problem starts: It asks me for permission to edit a file, offers the usual options (accept once, during session, etc.)
I choose both accept once, and in a new session chose accept all during session, and in both cases it failed.

Failure: console starts blinking really fast, between output of Debug messages, also edit in progress, next question, etc. Too fast to notice anything except the red lines with the errors which blink and go with the rest of the messages alternatively.

npm --version
11.12.1

node --version
v25.9.0

After stopping and trying to /resume, I could get a log:

```
Debug Console (F12 to close)


│ ℹ Detected terminal background color: #000000

│ ℹ Detected terminal name: VTE(8203)

│ ℹ Both GOOGLE_API_KEY and GEMINI_API_KEY are set. Using GOOGLE_API_KEY.

│ ⚠ Both GOOGLE_API_KEY and GEMINI_API_KEY are set. Using GOOGLE_API_KEY.
│ ℹ Authenticated via "gemini-api-key".
│ ⚠ [STARTUP] Phase 'load_builtin_commands' was started but never ended. Skipping metrics.
│ ⚠ Both GOOGLE_API_KEY and GEMINI_API_KEY are set. Using GOOGLE_API_KEY.
│ ✖ =========================================
│ 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 ()
│ at renderBorder (file:///home/alfonso/.nvm/versions/node/v25.9.0/lib/node_modules/@google/gemini-cli/bundle/chunk-C3HWPYQ6.js:37307:89)
│ at handleContainerNode (file:///home/alfonso/.nvm/versions/node/v25.9.0/lib/node_modules/@google/gemini-cli/bundle/chunk-C3HWPYQ6.js:37360:5)
│ at renderNodeToOutput (file:///home/alfonso/.nvm/versions/node/v25.9.0/lib/node_modules/@google/gemini-cli/bundle/chunk-C3HWPYQ6.js:37784:5)
│ at handleContainerNode (file:///home/alfonso/.nvm/versions/node/v25.9.0/lib/node_modules/@google/gemini-cli/bundle/chunk-C3HWPYQ6.js:37469:9)
│ at renderNodeToOutput (file:///home/alfonso/.nvm/versions/node/v25.9.0/lib/node_modules/@google/gemini-cli/bundle/chunk-C3HWPYQ6.js:37784:5)
│ at handleContainerNode (file:///home/alfonso/.nvm/versions/node/v25.9.0/lib/node_modules/@google/gemini-cli/bundle/chunk-C3HWPYQ6.js:37469:9)
│ at renderNodeToOutput (file:///home/alfonso/.nvm/versions/node/v25.9.0/lib/node_modules/@google/gemini-cli/bundle/chunk-C3HWPYQ6.js:37784:5)
│ at handleContainerNode (file:///home/alfonso/.nvm/versions/node/v25.9.0/lib/node_modules/@google/gemini-cli/bundle/chunk-C3HWPYQ6.js:37469:9)
│ at renderNodeToOutput (file:///home/alfonso/.nvm/versions/node/v25.9.0/lib/node_modules/@google/gemini-cli/bundle/chunk-C3HWPYQ6.js:37784:5) (x63)
```

### What did you expect to happen?

The usual, I approve an edit, it finishes, and asks for the next edit. If I approve all edits in session, it edits a few files without asking in the repo during the session, and then tells me what it did.

### Client information

* **CLI Version:** 0.38.1
* **Git Commit:** 7f5580034
* **Session ID:** e861ff58-cf9b-4728-af8c-baccde8dcdfb
* **Operating System:** linux v25.9.0
* **Sandbox Environment:** no sandbox
* **Mdel Version:** gemini-3.1-pro-preview-customtools
* **Auth Type:** gemini-api-key
* **Memory Usage:** 298.2 MB
* **Terminal Name:** VTE(8203)
* **Terminal Background:** #000000
* **Kitty Keyboard Protocol:** Unsupported

### Login information

API key

### Anything else we need to know?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.