Files
gemini-cli/scripts/backlog-analysis/data/bugs.json
T

2086 lines
824 KiB
JSON

[
{
"body": "### What happened?\nThe Gemini CLI is experiencing consistently high startup times, taking up to 9.77 seconds to boot. During initialization, the CLI calls `refreshAuth()` which sets up the backend client models. In this process, the CLI synchronously awaits `this.experimentsPromise` (which fetches from the internal API proxy) and `quotaPromise`. The API proxy alone takes ~1.42 seconds to fetch its internal experiments and launch the HTTP server, and these sequential network requests significantly block the startup sequence.\n\n### What did you expect to happen?\nThe CLI should boot quickly, ideally taking around 4 seconds or less.\n\n### What is needed for this fix?\nTo resolve this issue, the sequential `await` calls in `packages/core/src/config/config.ts` (`refreshAuth`) must be decoupled. \n1. Remove `await this.experimentsPromise;` and `await quotaPromise;` from `refreshAuth()`.\n2. Chain these promises asynchronously so that operations depending on them (e.g., setting request timeout, fetching admin controls, verifying pro model access) run concurrently via `.then(...)` and `.catch(...)`.\n3. Update the tests in `packages/core/src/config/config.test.ts` and `trackerTools.test.ts` to accommodate the asynchronous configuration load, ensuring they wait for `config.initialize()` before asserting state.\n\n### Client information\nPlatform: Linux\nVersion: Gemini CLI (Development)\n\n### Login information\nInternal Proxy Authentication / Google Account",
"number": 25757,
"title": "Gemini CLI Slow Boot Times (up to 9.77s)",
"url": "https://github.com/google-gemini/gemini-cli/issues/25757",
"analysis": "The Gemini CLI startup is delayed by sequential network requests in the `refreshAuth` method. Specifically, `await this.experimentsPromise` and `await quotaPromise` block the main execution thread for several seconds. Decoupling these from the critical boot path by removing the synchronous awaits will allow the CLI to initialize while these values are fetched in the background.",
"effort_level": "medium",
"reasoning": "The fix involves modifying the asynchronous control flow of the CLI's initialization sequence. While the change is localized to a single file, decoupling sequential awaits requires careful handling of the resulting promises to ensure downstream components correctly manage the pending states, which aligns with the 'Medium' criteria for asynchronous flow and state synchronization.",
"validated": true
},
{
"body": "### URL of the page with the issue\n\nfourfours.store@gmail.com\n\n### What is the problem?\n\nHello Gemini CLI Team,\n\nI am experiencing an authentication error stating my account is suspended due to a Terms of Service violation when trying to log into the Gemini CLI.\n\nI previously contacted Google One Support (Case ID: 0-5987000040641) and Google Developer Program Support (Request ID: 4874947). They informed me that since my benefits are integrated with my Google AI subscription, the Gemini CLI team has the specialized tools to investigate and resolve this, and they explicitly directed me to open an issue here.\n\nI believe the suspension was caused because I unintentionally linked my Google Account to an unauthorized third-party VS Code extension called 'OpenCode'. I want to confirm that I have completely disconnected 'OpenCode' from my account permissions and removed it entirely. My account connections are now clean.\n\nAs a premium subscriber, I heavily rely on the official Gemini CLI for my work and assure you I will only use the official tools moving forward. Could you please review my account and restore my access?\n\nthis is the account that facing the problem \"fourfours.store@gmail.com\"\n\n<img width=\"3199\" height=\"1799\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/9b3e2f1a-2d3f-4920-8707-efa7ac1a2416\" />\n\nThank you for your assistance.\nFateh\n\n### What did you expect to happen?\n\nI expected to be able to successfully authenticate and log into the Gemini CLI with my Google account, as I have completely removed the unauthorized third-party extension that initially caused the suspension.\n\n### Additional context\n\nI have attached a screenshot of my Google Account's 'Third-party apps & services' page to prove that the 'OpenCode' extension has been fully disconnected and my account is clean. Please let me know if you need any further information.\n\n<img width=\"3199\" height=\"1799\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/c2b67723-de45-4f5b-8833-6544828d2be6\" />",
"number": 25744,
"title": "GeminiCLI.com Feedback: [ISSUE] Account Suspended (Error 403) - Unintentional Third-Party Extension Use - Directed here by Google Support",
"url": "https://github.com/google-gemini/gemini-cli/issues/25744",
"analysis": "The issue is a server-side account suspension (HTTP 403) triggered by Google's backend policy enforcement, likely due to the use of unauthorized third-party extensions. This is an administrative/account status issue rather than a functional bug in the Gemini CLI source code.",
"effort_level": "small",
"reasoning": "The issue is an account-level suspension that cannot be resolved through code changes in this repository. The only actionable task for the engineering team is to ensure the CLI provides a clear and descriptive error message when a 403 Forbidden status is returned. This falls under minor string/content updates and trivial logic adjustments.",
"recommended_implementation": "Modify 'packages/cli/src/validateNonInterActiveAuth.ts' to explicitly catch HTTP 403 errors. If a 403 is detected, display a user-friendly message stating that the account may be suspended or lack sufficient permissions, and provide a URL to the Google AI Studio support or appeals page.",
"validated": true
},
{
"body": "### What happened?\n\nWhen generating Markdown output using gemini-cli, content that includes LaTeX-style syntax (e.g., $, \\, \\to, \\dots) is not rendered correctly.\n\nInstead of being interpreted properly (as math or escaped text), the raw characters are displayed in a broken or inconsistent way in Markdown viewers (e.g., GitHub issue preview).\n\nFor example:\nA set of processes $\\{P_0, P_1, \\dots, P_n\\}$ exists...\nand \nIf the graph contains no cycles $\\to$ No Deadlock.\nThese are rendered incorrectly or appear as plain text with escape characters visible, rather than formatted expressions.\n\nThis affects readability and makes the output look unpolished, especially for technical content (e.g., OS, math, algorithms).\n\n<img width=\"1175\" height=\"435\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/d1268354-66b0-4ea6-8d8f-ce9d38563dce\" />\n\n### What did you expect to happen?\n\n* Either:\n * Proper rendering of LaTeX-style expressions (if supported), or\n * Proper escaping/formatting so the text displays cleanly in Markdown (e.g., without broken symbols)\n\nExample expected output:\nA set of processes {P\u2080, P\u2081, ..., P\u2099} exists...\nor properly escaped Markdown-safe text.\n\n### Client information\n\n## About Gemini CLI\n\n| Property | Value |\n|----------------|--------------------------------------------|\n| **CLI Version** | 0.38.1 |\n| **Git Commit** | 7f5580034 |\n| **Model** | Auto (Gemini 3) |\n| **Sandbox** | No sandbox |\n| **OS** | darwin |\n| **Auth Method** | Signed in with Google |\n| **Tier** | Gemini Code Assist in Google One AI Pro |\n\n### Login information\n\nI'm logging in with my Google Account.\n\n### Anything else we need to know?\n\n_No response_",
"number": 25656,
"title": "Markdown rendering issue with LaTeX-style syntax ($, \\, etc.)",
"url": "https://github.com/google-gemini/gemini-cli/issues/25656",
"analysis": "The CLI's Markdown rendering logic in `packages/cli/src/gemini.tsx` (likely using `ink-markdown` or a similar component) fails to correctly parse or escape LaTeX math delimiters ($) and backslash sequences (\\). This results in the raw LaTeX code being rendered literally or incorrectly in the terminal UI, which also affects the text when copied to other Markdown viewers like GitHub.",
"effort_level": "medium",
"reasoning": "The issue involves adjusting Markdown parsing logic or implementing a pre-processing utility to handle LaTeX-style delimiters and escape sequences within the Ink-based CLI. This falls under the 'Parsers and Validation' category for Medium effort, as it requires logic tracing in the rendering pipeline and validation across terminal outputs. The previous 'Large' classification was a false positive triggered by the word 'deadlock' appearing in the user's example text rather than the codebase architecture.",
"validated": true
},
{
"body": "### What happened?\n\n * Environment: Gemini CLI v0.38.2, Windows 10, PowerShell 5.1.\n * Reproduction Steps:\n 1. Agent executes run_shell_command(\"gemini \\\"/stats model\\\"\") inside a Windows PowerShell environment.\n 2. The command triggers a recursive UI refresh or ANSI escape sequence loop.\n 3. The output exceeds 11,000,000 characters.\n * Impact: The massive garbage output (terminal codes) is added to the session context, leading to immediate 99% context/token usage and causing the UI to freeze/show \"garbage\" characters.\n\n\n\n### What did you expect to happen?\n\n* Expected Behavior: The CLI should detect recursive execution or limit the raw byte output from sub-processes to prevent token exhaustion.\n\n### Client information\n\n\n* **CLI Version:** 0.38.2\n* **Git Commit:** b0ed611a0\n* **Session ID:** aebae1e6-3690-47e3-8ced-0cd1c7e0856d\n* **Operating System:** win32 v24.15.0\n* **Sandbox Environment:** no sandbox\n* **Model Version:** gemini-3-flash-preview\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 430.9 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** Unknown\n* **Kitty Keyboard Protocol:** Unsupported\n* **IDE Client:** VS Code\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 25615,
"title": "run_shell_command triggers infinite UI loop output on Windows, consuming 99% of session tokens.",
"url": "https://github.com/google-gemini/gemini-cli/issues/25615",
"analysis": "The root cause is the lack of output truncation and ANSI sequence sanitization in the shell command execution logic. When an agent executes a command that produces infinite or massive output (like a recursive CLI call or PowerShell ANSI loop), the SDK captures all of it, exhausting the token context. Windows PowerShell is particularly prone to ANSI sequence issues in certain terminal environments.",
"effort_level": "medium",
"reasoning": "The fix requires implementing output truncation and ANSI sequence sanitization within the shell execution pipeline. This involves logic tracing across the ShellToolInvocation and ShellExecutionService to monitor output buffers and enforce limits. According to the criteria, this falls under 'Parsers and Validation' (ANSI handling) and 'Asynchronous Flow' (managing process output streams), requiring robust testing to ensure the CLI remains responsive without breaking valid command output.",
"validated": true
},
{
"body": "### What happened?\n\n# Bug Report: Gemini CLI - Theme Validation Error for `text.response` key\n\n## Summary\nThe Gemini CLI (v0.38.2) configuration validator identifies the `text.response` key in a custom theme as an \"Unrecognized key(s)\" and throws a configuration error. However, the official documentation explicitly lists `response` as a supported key for theme customization.\n\n## Environment\n- **Gemini CLI Version:** 0.38.2\n- **OS:** Darwin (macOS)\n- **Configuration File:** `~/.gemini/settings.json`\n\n## Steps to Reproduce\n1. Define a custom theme in `settings.json` under `ui.customThemes`.\n2. Within the `text` object of the custom theme, add a `response` key with a hex color value.\n3. Set `ui.theme` to the name of this custom theme.\n4. Run any `gemini` command (e.g., `gemini --version`).\n\n## Actual Behavior\nThe CLI outputs a configuration error:\n```text\nInvalid configuration in /Users/user2/.gemini/settings.json:\n\nError in: ui.customThemes.<ThemeName>.text\n Unrecognized key(s) in object: 'response'\n```\n\n## Expected Behavior\nThe CLI should validate successfully, as `response` is a documented property of the theme `text` object.\n\n## Evidence\n\n### 1. Documented Schema (from geminicli.com)\nThe documentation at `https://geminicli.com/docs/cli/themes/#changing-themes` states:\n> **`response`**: Takes precedence over `primary` for rendering model responses.\n\n### 2. User Configuration Example\n```json\n{\n \"ui\": {\n \"theme\": \"LimeWhite\",\n \"customThemes\": {\n \"LimeWhite\": {\n \"text\": {\n \"primary\": \"#00FF00\",\n \"response\": \"#FFFFFF\",\n \"secondary\": \"#a0a0a0\",\n \"accent\": \"#00FF00\"\n }\n }\n }\n }\n}\n```\n\n## Impact\nUsers cannot utilize the documented `response` color override without triggering a validation error on every command execution.\n\n\n### What did you expect to happen?\n\nI expect to not see the configuration warning when i boot up gemini.\n\nThe 'response' text colour changes correctly (to white), but gemini still thinks it's configured wrong.\n\n### Client information\n\n\n* **CLI Version:** 0.38.2\n* **Git Commit:** b0ed611a0\n* **Session ID:** ce4d364b-58b2-4ccf-9e5b-3fed8277ae87\n* **Operating System:** darwin v24.10.0\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto-gemini-3\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 86.3 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** #1e1e1e\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 25610,
"title": "Bug Report: Gemini CLI - Theme Validation Error for `text.response` key",
"url": "https://github.com/google-gemini/gemini-cli/issues/25610",
"analysis": "The configuration validator (likely using Zod) is missing the `response` key in the schema definition for the theme's `text` object. This causes a validation failure when the CLI parses `settings.json` because the schema is likely configured to disallow unknown keys (e.g., using `.strict()`).",
"effort_level": "small",
"reasoning": "The issue is a straightforward configuration schema update. It involves adding a single missing key ('response') to a Zod schema definition for themes. This is a highly localized fix with a clear root cause, fitting the criteria for trivial logic/config adjustments that can be completed within a day.",
"validated": true,
"recommended_implementation": "In `src/config/schema.ts`, add the `response` key to the Zod schema definition for the `text` object within the theme configuration to allow custom response colors."
},
{
"body": "### What happened?\n\n`gemini mcp list` reports Google first-party MCP servers (Cloud Run, GKE, Developer Knowledge) as `\u2717 Disconnected`, even though they connect successfully and all tools are discoverable.\n\n**Reproduction:**\n\n```bash\nmkdir -p /tmp/gemini-test/.gemini\ncat > /tmp/gemini-test/.gemini/settings.json << 'EOF'\n{\n \"mcpServers\": {\n \"cloud-run\": {\n \"httpUrl\": \"https://run.googleapis.com/mcp\",\n \"authProviderType\": \"google_credentials\",\n \"oauth\": { \"scopes\": [\"https://www.googleapis.com/auth/cloud-platform\"] }\n }\n }\n}\nEOF\n\nHOME=/tmp/gemini-test gemini mcp list\n```\n\n**Output:**\n```\nConfigured MCP servers:\n\n\u2717 cloud-run: https://run.googleapis.com/mcp (http) - Disconnected\n```\n\n**But the server is fully functional.** Using the MCP SDK directly:\n\n```javascript\nconst transport = new StreamableHTTPClientTransport(\n new URL('https://run.googleapis.com/mcp'), { requestInit: { headers } }\n);\nconst client = new Client({ name: 'test', version: '1.0' });\n\nawait client.connect(transport, { timeout: 5000 }); // \u2705 succeeds (152ms)\nawait client.ping(); // \u274c McpError -32601: Method not supported\nawait client.listTools(); // \u2705 succeeds (5 tools returned)\n```\n\n**Root cause:** [`testMCPConnection()`](https://github.com/google-gemini/gemini-cli/blob/main/packages/cli/src/commands/mcp/list.ts#L70-L142) in `list.ts` calls `client.ping()` after `client.connect()`. Google's MCP servers return `-32601: Method not supported` for `ping`, and the catch block reports `DISCONNECTED`:\n\n```typescript\n// list.ts lines 129-141\ntry {\n await client.connect(transport, { timeout: 5000 }); // \u2705 succeeds\n await client.ping(); // \u274c -32601\n await client.close();\n return MCPServerStatus.CONNECTED;\n} catch {\n await transport.close();\n return MCPServerStatus.DISCONNECTED; // \u2190 false negative\n}\n```\n\nNotably, [`connectToMcpServer()`](https://github.com/google-gemini/gemini-cli/blob/main/packages/core/src/tools/mcp-client.ts#L1775-L1860) in `mcp-client.ts` \u2014 the code path used when Gemini CLI actually connects to MCP servers for tool discovery \u2014 does **not** call `ping()`. It connects and proceeds directly to tool discovery, which works perfectly with these servers. This means the diagnostic command (`gemini mcp list`) reports servers as broken that the CLI itself has no trouble using.\n\n### What did you expect to happen?\n\n`gemini mcp list` should report the server as `\u2713 Connected` since the MCP `initialize` handshake succeeds and tools are discoverable. The `ping` method is optional per the MCP spec \u2014 a server shouldn't be marked Disconnected just because it doesn't implement `ping`.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\n```\nGemini CLI version: 0.38.1\nPlatform: macOS (arm64)\nNode.js: v25.9.0\n```\n\n</details>\n\n\n### Login information\n\nGoogle ADC (`gcloud auth application-default login`). Using `authProviderType: google_credentials` in the server config, which uses `GoogleCredentialProvider` to obtain Bearer tokens via `google-auth-library`.\n\n### Anything else we need to know?\n\n### Affected servers\n\nAll Google first-party MCP servers using the ESF `StatelessServer` backend:\n- `https://run.googleapis.com/mcp` (Cloud Run)\n- `https://container.googleapis.com/mcp` (GKE)\n- `https://developerknowledge.googleapis.com/mcp` (Developer Knowledge)\n\n### Suggested fix\n\nMake `ping()` optional in `testMCPConnection()`. A successful `connect()` (which completes the MCP `initialize` handshake) is sufficient proof of connectivity:\n\n```diff\n try {\n await client.connect(transport, { timeout: 5000 });\n- await client.ping();\n+ try {\n+ await client.ping();\n+ } catch {\n+ // ping is optional per MCP spec \u2014 some servers (e.g. Google first-party)\n+ // don't implement it. A successful connect() is sufficient.\n+ }\n await client.close();\n return MCPServerStatus.CONNECTED;\n } catch {\n```\n\n### Secondary: timeout discrepancy\n\n`testMCPConnection()` uses a hardcoded 5-second timeout (`{ timeout: 5000 }`), while `connectToMcpServer()` in `mcp-client.ts` uses `MCP_DEFAULT_TIMEOUT_MSEC` (10 minutes). This could cause additional false \"Disconnected\" reports for slower-starting servers that the CLI would connect to successfully during normal use.\n",
"number": 25599,
"title": "gemini mcp list reports Google first-party MCP servers as \"Disconnected\" due to unsupported ping() method",
"url": "https://github.com/google-gemini/gemini-cli/issues/25599",
"analysis": "The `gemini mcp list` command uses `testMCPConnection` which calls `await client.ping()`. Because some first-party servers do not implement the `ping` method, they throw a `MethodNotFound` error, causing the `catch` block to incorrectly return `DISCONNECTED` even though the transport connected successfully.",
"effort_level": "small",
"reasoning": "The fix is highly localized to a single function (testMCPConnection) within a single file (packages/cli/src/commands/mcp/list.ts). It involves a straightforward logic adjustment to the try/catch block to distinguish between a failed connection and an unsupported ping method, which falls under the 'Trivial Logic' category of the Small effort level criteria.",
"recommended_implementation": "In `packages/cli/src/commands/mcp/list.ts`, catch the error from `await client.ping()`. If the error indicates an unsupported method (or simply if `client.connect()` already succeeded), return `MCPServerStatus.CONNECTED` instead of dropping to `DISCONNECTED`.",
"validated": true
},
{
"body": "### What happened?\n\n[bug-report-history-1776455841609.json](https://github.com/user-attachments/files/26839556/bug-report-history-1776455841609.json)\n\nIt seems that gemini CLI has an opened communication channel with GCA via gemini.md file. Maybe it is working as expected but it could polute the data between the user and the Gemini CLI model (instead of GCA plugin model).\n\nIn the following [screencast](https://screencast.googleplex.com/cast/NTAxMzY0NDg2ODg0NTU2OHw4ZDBlZDQ1MC03Yw), one can see how Gemini CLI response with a 'geminidoceassist.rule': '#AXEL' set in the open setting json format from VS Code IDE.\n\n[ACTION REQUIRED] \ud83d\udcce PLEASE ATTACH THE EXPORTED CHAT HISTORY JSON FILE TO THIS ISSUE IF YOU FEEL COMFORTABLE SHARING IT.\n\n### What did you expect to happen?\n\n'geminidoceassist.rule': '#AXEL' word does not appear while prompting with Gemini CLI because this rule is set for VSCode GCA plugin.\n\n### Client information\n\n\n* **CLI Version:** 0.38.1\n* **Git Commit:** 7f5580034\n* **Session ID:** 6766a437-896e-4ab2-b227-f269d5a8cea6\n* **Operating System:** darwin v24.11.0\n* **Sandbox Environment:** no sandbox\n* **Model Version:** gemini-3-flash-preview\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 439.4 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** #1e1e1e\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 25597,
"title": "Gemini CLI reads setting from VS Code GCA plugin",
"url": "https://github.com/google-gemini/gemini-cli/issues/25597",
"analysis": "The `vscode-ide-companion` extension indiscriminately tracks active text editors via `vscode.window.onDidChangeActiveTextEditor` in `open-files-manager.ts`. When a user opens `.vscode/settings.json`, its content is sent to the CLI's context, confusing the LLM with IDE-specific configuration keys.",
"effort_level": "small",
"reasoning": "The fix is highly localized to the VS Code companion extension's event listener. It involves adding a simple conditional check to exclude specific configuration files (like settings.json) from the active editor tracking logic, which is a trivial logic adjustment with a clear root cause.",
"recommended_implementation": "In `packages/vscode-ide-companion/src/open-files-manager.ts`, update the `isFileUri` helper or the event listener to explicitly return `false` if `uri.path.endsWith('.vscode/settings.json')`.",
"validated": true
},
{
"body": "## Summary\n`relaunchAppInChildProcess` spawns a full-memory child via `node:child_process.spawn`\nwith `stdio: ['inherit','inherit','inherit','ipc']`, but the bootstrap parent does\nnot install signal handlers to forward termination signals to the child.\n\nWhen the parent receives `SIGTERM`/`SIGHUP` from a supervising process (e.g. an\nACP client, systemd, a container runtime, or any process manager), the bootstrap\nexits but the child is reparented to PID 1 / the user's `systemd --user` manager\nand keeps running. The orphan continues to hold the OAuth session and allocated\nheap until killed manually.\n\n## Reproduction\n```bash\n# terminal 1\ngemini -m gemini-3.1-pro-preview -y --acp\n\n# terminal 2\nps -eo pid,ppid,pgid,cmd | grep gemini\n# observe bootstrap PID and child PID (child PPID == bootstrap PID)\nkill -TERM <bootstrap-pid>\n\nps -eo pid,ppid,pgid,cmd | grep gemini\n# child is still alive, PPID now 1 (or systemd user manager PID)\n```\n\nInteractive Ctrl+C does not surface the bug because SIGINT is delivered to the\nwhole foreground process group through the controlling terminal. The bug only\nmanifests with programmatic `kill(pid, signal)`, which is the normal path for\nany process manager that supervises gemini CLI as a child process.\n\n## Root cause\nFile: `packages/cli/src/utils/relaunch.ts`, function `relaunchAppInChildProcess`.\n\nThe `runner` closure spawns the child, wires an IPC message listener, and\nresolves on `close`. There is no `process.on('SIGTERM', ...)` (or HUP/INT/QUIT/\nUSR1/USR2) that proxies the signal to `child.kill(signal)`, so the parent\nsimply dies on its default signal disposition while the child keeps going.\n\n## Proposed fix\nInstall forwarders before awaiting the child, remove them on close/error to\navoid listener leaks across relaunch iterations:\n\n```ts\nconst FORWARDED_SIGNALS: readonly NodeJS.Signals[] = [\n 'SIGTERM', 'SIGHUP', 'SIGINT', 'SIGQUIT', 'SIGUSR1', 'SIGUSR2',\n];\nconst forwarders = new Map<NodeJS.Signals, () => void>();\nfor (const sig of FORWARDED_SIGNALS) {\n const handler = () => {\n try { child.kill(sig); } catch { /* child may already be gone */ }\n };\n forwarders.set(sig, handler);\n process.on(sig, handler);\n}\nconst removeForwarders = () => {\n for (const [sig, handler] of forwarders) process.off(sig, handler);\n forwarders.clear();\n};\n\nreturn new Promise<number>((resolve, reject) => {\n child.on('error', (err) => { removeForwarders(); reject(err); });\n child.on('close', (code) => {\n removeForwarders();\n process.stdin.resume();\n resolve(code ?? 1);\n });\n});\n```\n\nDesign notes:\n- Use a Map of `{signal \u2192 handler}` so cleanup is precise, avoiding\n `removeAllListeners` which would disturb other subscribers.\n- Remove forwarders on both `close` and `error` \u2014 otherwise the listener\n count grows each relaunch iteration and Node logs a MaxListenersExceeded\n warning after ~10 relaunches.\n- `try/catch` around `child.kill` guards the race where the signal arrives\n just after the child exits.\n- `stdio: 'inherit'` is left unchanged; signal forwarding is orthogonal\n to the stdio wiring.\n- `detached: true` is intentionally *not* introduced \u2014 it would change\n PGID/foreground-tty semantics and break interactive Ctrl+C.\n\n## Downstream workaround\nSetting `GEMINI_CLI_NO_RELAUNCH=true` skips the relaunch, which also\navoids the bug \u2014 but it disables the `--max-old-space-size` tuning that\nrelaunch was designed to apply. Fixing signal forwarding keeps both.\n\n## Environment\n- `@google/gemini-cli` v0.38.1\n- Node.js 20+\n- Linux (observed under `systemd --user`; reparenting target is the user\n manager rather than PID 1, which can mask the orphan in casual\n `ps -ef` inspection)\n\nHappy to open a PR with the above diff + a test that asserts the child\nreceives `SIGTERM` when the parent is signalled.",
"number": 25590,
"title": "Bug: relaunchAppInChildProcess does not forward signals to child, orphaning it when parent is killed",
"url": "https://github.com/google-gemini/gemini-cli/issues/25590",
"analysis": "The `relaunchAppInChildProcess` utility spawns a replacement CLI process using `child_process.spawn`. However, the parent process does not bind signal listeners (`SIGTERM`, `SIGHUP`) to forward termination events to the child. If a process manager kills the parent, the child is orphaned and reparented to PID 1.",
"effort_level": "small",
"reasoning": "Localized fix in `packages/cli/src/utils/relaunch.ts` involving standard Node.js process event listeners.",
"recommended_implementation": "In `packages/cli/src/utils/relaunch.ts`, immediately after spawning the child, add signal handlers: `['SIGINT', 'SIGTERM', 'SIGHUP'].forEach(sig => process.on(sig, () => child.kill(sig)));`.",
"validated": false
},
{
"body": "### Description\nAfter running `gemini-cli` (v0.38.1) for an extended period (weeks) with `--approval-mode yolo`, the system eventually hits the macOS PTY limit (`kern.tty.ptmx_max = 511`), preventing any new terminal sessions from opening system-wide with the error: `Device not configured`.\n\n### Diagnostic Evidence\n- **System Limit:** `sysctl kern.tty.ptmx_max` \u2192 511\n- **Current Usage:** `lsof | grep \"/dev/ptmx\" | wc -l` \u2192 511\n- **Top Consumer:** PID 11595 (`node .../bin/gemini --approval-mode yolo`) is holding **230** PTY master descriptors. Other orphaned Gemini instances are holding the remainder.\n- **Process State:** `sample` of the process shows it is healthy and sitting in a `uv__io_poll` wait state, but it has failed to release `/dev/ptmx` descriptors for sub-agents or tool calls (e.g., `ck`).\n- **Uptime:** The leaking processes have uptimes ranging from 1 to 17 days.\n\n### Steps to Reproduce\n1. Run Gemini CLI in a persistent session (e.g., within `tmux`).\n2. Use `--approval-mode yolo`.\n3. Perform numerous tasks that invoke sub-agents or external search tools over several days.\n4. Observe the PTY count increasing via `lsof` without ever decreasing.\n\n### Environment\n- **OS:** macOS 15.7.2 (ARM64)\n- **Node Version:** 22.21.1\n- **Gemini CLI Version:** 0.38.1\n\n### Related Issues\nLikely related to #22814 (File descriptor leak in ShellExecutionService) and #22001 (Terminal Instance Resource Retention).",
"number": 25583,
"title": "[BUG] PTY Master Device Exhaustion (ENXIO) on macOS after prolonged usage in YOLO mode",
"url": "https://github.com/google-gemini/gemini-cli/issues/25583",
"analysis": "Executing numerous shell commands in YOLO mode exhausts the macOS pseudo-terminal limit (`ptmx_max`). While `pty.kill()` is called on exit in `ShellExecutionService`, `node-pty` can leak file descriptors on macOS under heavy concurrent usage if the underlying C++ bindings fail to release the master FD promptly when destroyed asynchronously.",
"effort_level": "large",
"reasoning": "This issue involves platform-specific resource management and deep terminal/PTY complexities on macOS. Resolving PTY master device exhaustion requires tracing the lifecycle of node-pty instances, ensuring proper cleanup of file descriptors in asynchronous flows, and potentially addressing race conditions in process termination. According to the criteria, platform-specific PTY and child process management issues are classified as Large effort.",
"validated": true
},
{
"body": "### What happened?\n\n \u2502\n\u2502 \u2139 Detected terminal background color: #0c0c0c \u2502\n\u2502 \u2502\n\u2502 \u2716 ========================================= \u2502\n\u2502 This is an unexpected error. Please file a bug report using the /bug tool. \u2588\u2502\n\u2502 CRITICAL: Unhandled Promise Rejection! \u2588\u2502\n\u2502 ========================================= \u2588\u2502\n\u2502 Reason: Error: Custom plans directory 'c:\\csc\\ops\\plans\\' resolves to 'c:\\csc\\ops\\plans', which is outside the \u2588\u2502\n\u2502 project root 'C:\\Users\\davey'. \u2588\u2502\n\u2502 Stack trace: \u2588\u2502\n\u2502 Error: Custom plans directory 'c:\\csc\\ops\\plans\\' resolves to 'c:\\csc\\ops\\plans', which is outside the project \u2588\u2502\n\u2502 root 'C:\\Users\\davey'. \u2588\u2502\n\u2502 at _Storage.getPlansDir \u2588\u2502\n\u2502 (file:///C:/Users/davey/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-ETUADTWF.js:42413:15) \u2588\u2502\n\u2502 at Config._initialize \u2588\u2502\n\u2502 (file:///C:/Users/davey/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-ZTFHMKKJ.js:350264:37) \u2588\u2502\n\u2502 at async \u2588\u2502\n\u2502 file:///C:/Users/davey/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/interactiveCli-EOCVNM6H.js:4791\u2588\u2502\n\u2502 6:9 \u2588\u2502\n\u2502 \u2139 Authenticated via \"oauth-personal\". \n\n### What did you expect to happen?\n\nthe console did not respond, pressed tab twice and got the above message. no reply needed. good day\n\n### Client information\n\n\n* **CLI Version:** 0.38.1\n* **Git Commit:** 7f5580034\n* **Session ID:** 538581cd-6a49-407c-bf62-1e23a174c08b\n* **Operating System:** win32 v24.13.0\n* **Sandbox Environment:** no sandbox\n* **Model Version:** gemini-2.5-flash-lite\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 275.5 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** #0c0c0c\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 25566,
"title": "bug report requested by app.",
"url": "https://github.com/google-gemini/gemini-cli/issues/25566",
"analysis": "If a user configures a custom plans directory that resolves outside the project root, `_Storage.getPlansDir()` intentionally throws an Error. Because this is called during the asynchronous `Config._initialize()` bootstrap phase without a surrounding `try/catch`, it results in an Unhandled Promise Rejection that crashes the CLI.",
"effort_level": "medium",
"reasoning": "The issue involves an unhandled promise rejection during the asynchronous bootstrap phase of the application. According to the provided criteria, resolving unhandled promise rejections and addressing filesystem/path resolution logic falls under the Medium effort level, as it requires modifying the asynchronous control flow to ensure the error is caught and reported gracefully rather than crashing the CLI.",
"recommended_implementation": "In `packages/core/src/config/config.ts`, wrap the `this.storage.getPlansDir()` path resolution check in a `try/catch` block. Catch the error, emit a user-friendly warning to the console, and safely fall back to the default `getProjectTempPlansDir()`.",
"validated": true
},
{
"body": "### What happened?\n\nI upgraded from 0.33.1 to 0.38.1 and noticed that pasting text does not work anymore.\nNeither with ctrl+v nor with right click into the text field.\nI downgraded step by step until 0.35.0 where it then worked again.\nSo I guess there was some kind of bug introduced in 0.36.0 and upwards.\nI am using Linux Mint.\n\n\n### What did you expect to happen?\n\nPasting using ctrl+v and right click still works.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\nAbout Gemini CLI\n\nCLI Version 0.35.0\nGit Commit 9804bd696\nModel Auto (Gemini 3)\nSandbox no sandbox \nOS linux\nAuth Method Signed in with Google (..@gmail.com)\nTier Gemini Code Assist in Google One AI Pro \n```\n\nEnvironment Details \n - Operating System: Linux Mint 22.1 (Xia) \n - Kernel Version: 6.8.0-110-generic (x86_64) \n - Desktop Environment: XFCE (WindowManager: Xfwm4) \n - Display Server: X11 (Display: :0.0) \n - Shell: Bash \n \nHardware Specifications \n - CPU: Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz \n - RAM: 15,324,004 kB (~15.3 GB) \n\n</details>\n\n### Login information\n\nGemini Code Assist in Google One AI Pro, Signed in with Google\n\n### Anything else we need to know?\n\n_No response_",
"number": 25561,
"title": "Pasting broken in version 0.36.0+",
"url": "https://github.com/google-gemini/gemini-cli/issues/25561",
"analysis": "The regression in version 0.36.0+ likely stems from changes in the interactive CLI's input handling logic, specifically how it processes characters from stdin. The application is likely failing to handle 'bracketed paste mode' or is processing input in a way that discards rapid multi-character sequences (common in pastes) instead of appending them to the active input buffer. This typically happens when an input hook or event listener is optimized for single keypresses and fails to account for the high-frequency stream of data produced during a paste operation.",
"effort_level": "medium",
"reasoning": "The issue is a regression in input handling within an Ink-based CLI, likely involving how the input buffer or state management (useState/useEffect) processes rapid character sequences or bracketed paste escape codes. This falls under the Medium criteria for React/Ink state management and input buffer synchronization, requiring logic tracing between versions 0.35.0 and 0.36.0 rather than a deep architectural or protocol overhaul.",
"validated": true
},
{
"body": "### What happened?\n\nOn WIndows 11 the terminate behavior don't work well, the /exit don't exit and commands on my guess not work. The Ctrl + C or D not work on the second hit.\n\n0.40.0-nightly.20260415.g06e7621b2\n\nWin 11\n\n### What did you expect to happen?\n\nTerminate and for commands to execute the task\n\n### Client information\n\nCommands are not working\n\n### Login information\n\nN/A\n\n### Anything else we need to know?\n\nN/A",
"number": 25548,
"title": "Exit options don't terminate the session and close de cli",
"url": "https://github.com/google-gemini/gemini-cli/issues/25548",
"analysis": "The issue involves the CLI failing to terminate on Windows 11 via commands (/exit) or signals (Ctrl+C/D). This is likely due to the interactive loop in 'interactiveCli.tsx' not correctly invoking the exit sequence or a hung promise preventing the process from closing. Windows-specific terminal handling in Node.js often requires explicit signal listeners and ensuring the Ink UI framework's exit method is called. The 'second hit' failure for Ctrl+C suggests the process might be stuck in a cleanup phase or terminal raw mode is not being restored correctly.",
"effort_level": "large",
"reasoning": "The issue involves platform-specific terminal signal handling and process termination on Windows 11, which is explicitly categorized as a Large effort. Debugging why Ctrl+C/D fails on the second attempt suggests complex race conditions or hung asynchronous cleanup tasks within the Ink UI lifecycle and Node.js process management, requiring deep platform-specific investigation.",
"validated": true
},
{
"body": "### What happened?\n\nI typed in a prompt and I want to copy it. I enter copy mode with ctrl+s.\nAs soon as I do that, it scrolls to the output / empty space. \nWhen I scroll back, I am taken out of the copy mode.\nNet effect - I am unable to copy the prompt.\n\nhttps://github.com/user-attachments/assets/60fa8e08-5017-4a50-bc3b-efb45bac1373\n\n### What did you expect to happen?\n\nI want to be able to select and copy the prompt text. \n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n\u2502 CLI Version 0.37.1 \u2502 \n\u2502 Git Commit 3b2d4f100 \u2502 \n\u2502 Model gemini-3-flash-preview \u2502 \n\u2502 Sandbox no sandbox \u2502 \n\u2502 OS linux \u2502 \n\u2502 Auth Method Signed in with Google (ksprashanth82@gmail.com) \u2502 \n\u2502 Tier Gemini Code Assist \u2502 \n\u2502 GCP Project cloudshell-gca \u2502 \n\u2502 IDE Client Cloud Shell ```\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 25532,
"title": "Copy Mode does't seem to let me copy the prompt - only any output",
"url": "https://github.com/google-gemini/gemini-cli/issues/25532",
"analysis": "The 'Copy Mode' (triggered by ctrl+s) in the interactive CLI is likely implemented using a scrollable viewport component that manages a buffer of chat history. The bug occurs because the current prompt is either excluded from this buffer or the scroll offset is incorrectly initialized to the start of the model's response, causing the viewport to jump. Navigating back to the prompt triggers an exit condition for the copy mode because the prompt is treated as 'outside' the scrollable area.",
"effort_level": "medium",
"reasoning": "The issue involves debugging and synchronizing UI state within Ink components, specifically managing the scrollable buffer and viewport offset when transitioning into 'Copy Mode'. This falls under the Medium criteria for React/Ink state management and input buffer synchronization, as it requires tracing how the chat history is passed to the copy mode component and ensuring the prompt is correctly included in the scrollable area.",
"validated": true
},
{
"body": "### What happened?\n\nI am using Gemini in VS Code with WSL.\n\nWhile working in:\n/home/jacques/repogit/mmm-tools/FLUX\n\nI asked Gemini to create:\ntests/gemini_test_repo_parent.txt\n\nGemini reported success and showed the relative path inside the active project, but the file was actually created in a different repository:\n\n/home/jacques/repogit/data-model-core/mmm/tests/gemini_test_repo_parent.txt\n\nSo the displayed path did not match the real write location.\n\nSteps to reproduce:\n1. Open VS Code in WSL.\n2. Work in a project such as /home/jacques/repogit/mmm-tools/FLUX.\n3. Ask Gemini to create a file in tests using a relative path.\n4. Gemini reports success.\n5. Search the filesystem and verify the file may be created in a different repository.\n\n### What did you expect to happen?\n\nThe file should have been created in the active workspace, at:\n\n/home/jacques/repogit/mmm-tools/FLUX/tests/gemini_test_repo_parent.txt\n\nGemini should always resolve relative paths against the current workspace/project only.\nThe path displayed in the UI should match the actual file written on disk.\n\n### Client information\n\nUsing Gemini in VS Code with WSL Ubuntu.\nThis report comes from the VS Code integration, not Gemini CLI.\nPlatform: Windows + WSL Ubuntu.\n\n### Login information\n\ngoogle account\n\n### Anything else we need to know?\n\nHow can we reproduce it?\n1. Open VS Code in WSL.\n2. Open or work inside a project such as:\n /home/jacques/repogit/mmm-tools/FLUX\n3. Ask Gemini to create a file with a relative path, for example:\n \"Create a test file named gemini_test_repo_parent.txt in the tests folder\"\n4. Gemini reports success and shows the relative path under the current project.\n5. Search the filesystem for the created file.\n\nIn my case, the file was created in a different repository:\n/home/jacques/repogit/data-model-core/mmm/tests/gemini_test_repo_parent.txt\ninstead of the active project.\n\nEnvironment\n- VS Code\n- WSL (Ubuntu)\n- Gemini in VS Code\n- Active working directory:\n /home/jacques/repogit/mmm-tools/FLUX\n\nAdditional context :\nI ran a comparison test.\n\nWhen I opened only the FLUX folder directly as the VS Code workspace root, Gemini created the file in the correct location.\n\nWhen working in the broader parent workspace / repo context, Gemini reported the correct relative path in the UI, but the file was actually written into another project.\n\nThis suggests a workspace/path resolution bug, possibly involving stale context, parent repo handling, or wrong workspace resolution in WSL.\n",
"number": 25527,
"title": "VS Code + WSL: Gemini writes files to the wrong project/workspace",
"url": "https://github.com/google-gemini/gemini-cli/issues/25527",
"analysis": "The issue is caused by incorrect base directory resolution in the VS Code extension's backend. When Gemini attempts to write a file using a relative path, the `vscode-ide-companion` server likely resolves the path against a stale or default workspace root instead of the currently active workspace folder. In WSL environments, this is exacerbated if the extension does not strictly use the VS Code Workspace API (`vscode.workspace.workspaceFolders`) to anchor file operations, leading to files being written to the wrong repository if multiple projects have been opened in the same session.",
"effort_level": "medium",
"reasoning": "The fix requires modifying the path resolution logic to correctly handle multi-root workspaces in the VS Code extension and ensuring the CLI anchors relative paths to the active workspace folder. This involves logic tracing across the IDE server and state synchronization between the extension and the CLI, which fits the Medium criteria for integration and robust testing requirements.",
"validated": true
},
{
"body": "## Description\nWhen using the Gemini Live backend, there is noticeable end-of-speech latency compared to competitors. Additionally, releasing the spacebar immediately after finishing a sentence often causes the last sentence to not appear (buffer cutoff issue). The local Whisper backend handles this perfectly.\n\n## Requirements\n- Investigate the buffer handling and connection teardown in the `GeminiLiveTranscriptionProvider`.\n- Ensure trailing audio is fully processed and returned before closing the transcription stream.\n\nEpic: #24175",
"number": 25495,
"title": "[Voice] Fix Gemini Live Latency & Cutoff",
"url": "https://github.com/google-gemini/gemini-cli/issues/25495",
"analysis": "The issue stems from a premature termination of the audio stream when the user releases the spacebar. The 'GeminiLiveTranscriptionProvider' (likely located within the SDK's session or agent logic) closes the connection before the backend has finished processing the final audio chunks. This causes a race condition where trailing audio is lost and latency is perceived because the client isn't waiting for the final 'end-of-turn' or 'final' transcription flag from the Gemini Live API.",
"effort_level": "large",
"reasoning": "The issue involves debugging and fixing complex race conditions within the Voice transcription infrastructure, specifically the Gemini Live streaming pipeline. It requires managing the asynchronous lifecycle of audio streams and ensuring graceful connection teardown to prevent data loss. According to the criteria, tasks involving major stateful subsystems like Voice transcription and concurrency issues such as race conditions in streaming throughput are classified as Large.",
"validated": true
},
{
"body": "### What happened?\n\nBeginning: 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.\n\nProblem starts: It asks me for permission to edit a file, offers the usual options (accept once, during session, etc.)\nI choose both accept once, and in a new session chose accept all during session, and in both cases it failed.\n\nFailure: 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.\n\nnpm --version\n11.12.1\n\nnode --version\nv25.9.0\n\n\nAfter stopping and trying to /resume, I could get a log:\n\n```\nDebug Console (F12 to close) \n\u2502 \n\u2502 \n\u2502 \u2139 Detected terminal background color: #000000 \n\u2502 \n\u2502 \u2139 Detected terminal name: VTE(8203) \n\u2502 \n\u2502 \u2139 Both GOOGLE_API_KEY and GEMINI_API_KEY are set. Using GOOGLE_API_KEY. \n\u2502 \n\u2502 \u26a0 Both GOOGLE_API_KEY and GEMINI_API_KEY are set. Using GOOGLE_API_KEY. \n\u2502 \u2139 Authenticated via \"gemini-api-key\". \n\u2502 \u26a0 [STARTUP] Phase 'load_builtin_commands' was started but never ended. Skipping metrics. \n\u2502 \u26a0 Both GOOGLE_API_KEY and GEMINI_API_KEY are set. Using GOOGLE_API_KEY. \n\u2502 \u2716 ========================================= \n\u2502 This is an unexpected error. Please file a bug report using the /bug tool.\n\u2502 CRITICAL: Unhandled Promise Rejection! \n\u2502 ========================================= \n\u2502 Reason: RangeError: Invalid count value: -1 \n\u2502 Stack trace: \n\u2502 RangeError: Invalid count value: -1 \n\u2502 at String.repeat (<anonymous>) \n\u2502 at renderBorder (file:///home/alfonso/.nvm/versions/node/v25.9.0/lib/node_modules/@google/gemini-cli/bundle/chunk-C3HWPYQ6.js:37307:89) \n\u2502 at handleContainerNode (file:///home/alfonso/.nvm/versions/node/v25.9.0/lib/node_modules/@google/gemini-cli/bundle/chunk-C3HWPYQ6.js:37360:5) \n\u2502 at renderNodeToOutput (file:///home/alfonso/.nvm/versions/node/v25.9.0/lib/node_modules/@google/gemini-cli/bundle/chunk-C3HWPYQ6.js:37784:5) \n\u2502 at handleContainerNode (file:///home/alfonso/.nvm/versions/node/v25.9.0/lib/node_modules/@google/gemini-cli/bundle/chunk-C3HWPYQ6.js:37469:9) \n\u2502 at renderNodeToOutput (file:///home/alfonso/.nvm/versions/node/v25.9.0/lib/node_modules/@google/gemini-cli/bundle/chunk-C3HWPYQ6.js:37784:5) \n\u2502 at handleContainerNode (file:///home/alfonso/.nvm/versions/node/v25.9.0/lib/node_modules/@google/gemini-cli/bundle/chunk-C3HWPYQ6.js:37469:9) \n\u2502 at renderNodeToOutput (file:///home/alfonso/.nvm/versions/node/v25.9.0/lib/node_modules/@google/gemini-cli/bundle/chunk-C3HWPYQ6.js:37784:5) \n\u2502 at handleContainerNode (file:///home/alfonso/.nvm/versions/node/v25.9.0/lib/node_modules/@google/gemini-cli/bundle/chunk-C3HWPYQ6.js:37469:9) \n\u2502 at renderNodeToOutput (file:///home/alfonso/.nvm/versions/node/v25.9.0/lib/node_modules/@google/gemini-cli/bundle/chunk-C3HWPYQ6.js:37784:5) (x63)\n```\n\n### What did you expect to happen?\n\nThe 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.\n\n### Client information\n\n\n* **CLI Version:** 0.38.1\n* **Git Commit:** 7f5580034\n* **Session ID:** e861ff58-cf9b-4728-af8c-baccde8dcdfb\n* **Operating System:** linux v25.9.0\n* **Sandbox Environment:** no sandbox\n* **Mdel Version:** gemini-3.1-pro-preview-customtools\n* **Auth Type:** gemini-api-key\n* **Memory Usage:** 298.2 MB\n* **Terminal Name:** VTE(8203)\n* **Terminal Background:** #000000\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\nAPI key\n\n### Anything else we need to know?\n\n_No response_",
"number": 25483,
"title": "Error renderNodeToOutput makes CLI unusable after a single Edit file approval",
"url": "https://github.com/google-gemini/gemini-cli/issues/25483",
"analysis": "The error `renderNodeToOutput` is an internal failure of the `ink` library (used for the CLI UI) during its reconciliation or rendering phase. The 'blinking' and rapid output suggest an infinite re-render loop or a race condition occurring in `packages/cli/src/gemini.tsx`. This is likely triggered when the UI transitions from the 'user approval' state (for file edits) to the 'executing' state. If the SDK (`packages/sdk/src/session.ts`) emits progress updates or debug logs too rapidly immediately after the state change, `ink` may attempt to render a partially unmounted or invalid component tree, leading to the crash.",
"effort_level": "medium",
"reasoning": "The issue involves debugging an infinite re-render loop and state synchronization failure within the Ink-based CLI UI. This requires tracing React-like state transitions (useState/useEffect) in packages/cli/src/gemini.tsx and managing the integration between the SDK's event emitter and the UI's rendering cycle. It fits the Medium criteria for state management and asynchronous flow resolution.",
"validated": true
},
{
"body": "## Bug\nShell tool `data` events trigger a React re-render on every chunk, while `binary_progress` already throttles to 1s intervals via `OUTPUT_UPDATE_INTERVAL_MS`.\n\n## Impact\nCommands that emit thousands of lines (build warnings, manifest generation with ~2000 duplicate warnings, verbose test runs) pin the UI and make the terminal unresponsive until the command completes.\n\n## Repro\n1. Run a shell command that produces several thousand lines of stdout quickly\n2. Observe that the UI becomes laggy / unresponsive\n\n## Proposal\nApply the same `OUTPUT_UPDATE_INTERVAL_MS` throttling to text output that's already applied to `binary_progress`. The final chunk should flush immediately so users still see the final state without delay.\n\n## Related\nFix proposed in #22843 (closed per contribution policy).",
"number": 25459,
"title": "Shell tool text output causes UI jank on high-volume commands",
"url": "https://github.com/google-gemini/gemini-cli/issues/25459",
"analysis": "The root cause is that the CLI's React-based UI (likely using Ink) performs a state update and re-render for every 'data' chunk received from the shell tool's stdout/stderr. High-frequency output floods the React render queue, leading to UI unresponsiveness. The fix involves buffering these text chunks and updating the UI state at a throttled interval, similar to the existing implementation for binary progress.",
"effort_level": "medium",
"reasoning": "The fix requires implementing a throttled state update mechanism within a React/Ink environment. This involves managing buffers and timing logic (useEffect/useState) to synchronize high-frequency shell output with the UI render cycle, which falls under the Medium criteria for React state management and asynchronous flow.",
"validated": true
},
{
"body": "### What happened?\n\nFollowing the fix for Issue #23369 in version 0.38.0, the /stats command has become practically useless for users relying on screen readers and Braille displays. While it's true that the graphical \"noise\" (the block characters) has been removed, the actual data\u2014specifically the quota usage and model stats\u2014has vanished along with it.\nSteps to Reproduce:\n1. \nEnable accessibility.screenReader: true in settings.json.\n2. \nRun /stats.\n3. \nObserve the output.\nUser: /stats \nSession Stats \nInteraction Summary \nSession ID: eb2c6f04-f5f2-4b5e-b1e8-3bcd93376d80 \nAuth Method: Signed in with Google (gabriele.battaglia@gmail.com) \nTier: Gemini Code Assist in Google One AI Pro \nTool Calls: 0 ( \u2713 0 x 0 ) \nSuccess Rate: 0.0% \nPerformance \nWall Time: 13.4s \nAgent Active: 0s \n\u00bb API Time: 0s (0.0%) \n\u00bb Tool Time: 0s (0.0%) \n/model \ngemini-3-flash-preview context \n0% used \nShift+Tab to accept edits \n>\n\nActual Behavior:\nThe output is stripped of all meaningful data. It shows \"0% used\" regardless of actual usage or simply omits the relevant lines. The UI fix effectively broke the feature's core functionality.\nQuestions for the Dev Team:\n1. \nWhat kind of QA process was performed before merging PR #23442 into a stable release? Was it actually tested with a screen reader, or did someone just assume that \"less text equals more accessibility\"?\n2. \nIn what world is \"removing the data\" considered a valid solution for an accessibility bug? Accessibility means making information reachable, not deleting it to avoid formatting challenges.\nThis is a disaster for blind users who rely on these metrics to manage their sessions. We expected a professional fix, not a lobotomized command. Please address this regression immediately.\nEnvironment:\n\u2022 \nVersion: 0.35.3 -> 0.38.0\n\u2022 \nOS: Windows (NVDA / Braille Display)\n\u2022 \nTerminal: Windows Terminal / CMD\n\n\n### What did you expect to happen?\n\nThe command should return the usage data in a clear, text-only format (e.g., \"Usage: 45%\"), reset in [hh:mm] at [hh:mm].\n\n### Client information\n\n\n* **CLI Version:** 0.38.0\n* **Git Commit:** 3f0873a83\n* **Session ID:** 60e3728d-a824-46f7-b7df-49418ba70907\n* **Operating System:** win32 v25.9.0\n* **Sandbox Environment:** no sandbox\n* **Model Version:** gemini-3-flash-preview\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 273.2 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** #0c0c0c\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\nAuth web Google account.\n\n### Anything else we need to know?\n\n_No response_",
"number": 25441,
"title": "[Regression][Accessibility] /stats command output is gutted in v0.38.0 \u2013 Information missing, not just formatted",
"url": "https://github.com/google-gemini/gemini-cli/issues/25441",
"analysis": "The regression in v0.38.0 was caused by an over-aggressive accessibility fix that removed the data values along with the graphical block characters in the /stats command. When screenReader mode is enabled, the rendering logic likely omits the components containing the actual statistics instead of providing a text-only fallback.",
"effort_level": "small",
"reasoning": "The issue is a localized regression in the UI rendering logic of the /stats command. It requires adjusting an Ink component to ensure text-based data is preserved when graphical elements are hidden in accessibility mode. This is a minor structural layout tweak in a single component, fitting the criteria for a Small effort level.",
"validated": true,
"recommended_implementation": "In the component responsible for rendering the stats bars (likely `StatsView.tsx`), update the conditional logic to ensure that numeric values and labels are rendered as plain text when `accessibility.screenReader` is enabled, rather than omitting the entire data block along with the graphical characters."
},
{
"body": "### What happened?\n\nEven when settings appear to be active in the current session (or even persist across restarts like \"Compact Tool Output\"), a manual inspection of the `~/.gemini/settings.json` file reveals that the changes are never actually written to the disk. \n\n**Settings NOT found in settings.json (i did not do an exhaustive search, so there could be others):**\n- compact tool output\n- hide sandbox status\n- use alternate screen buffer\n- render process\n- terminal buffer\n- incremental rendering\n- screen reader mode\n- ide mode\n- compress compression threshold\n- enable git worktrees\n- memory manager agent\n- use the generalist profile to manage agent context\n- enable context management\n- topic & update narration\n\nA search of the entire `~/.gemini/` directory (including `state.json` and `projects.json`) confirmed that keywords like \"compact,\" \"render,\" and \"incremental\" do not appear in any configuration file, despite being enabled in the UI.\n\n### What did you expect to happen?\n\nEvery setting change made through the CLI should be serialized to the global `~/.gemini/settings.json` file (or the active project-level `.gemini/settings.json`) immediately upon being set.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n# paste output here\n\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 \u2502\n\u2502 About Gemini CLI \u2502\n\u2502 \u2502\n\u2502 CLI Version 0.38.0 \u2502\n\u2502 Git Commit 3f0873a83 \u2502\n\u2502 Model Auto (Gemini 3) \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS linux \u2502\n\u2502 Auth Method Signed in with Google (kurokirasama@gmail.com) \u2502\n\u2502 Tier Gemini Code Assist in Google One AI Pro \u2502\n\u2502 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n```\n\n</details>\n\n### Login information\n\ngoogle account\n\n### Anything else we need to know?\n\nThe only setting that appears to correctly map and write to the JSON file is `enable session cleanup` (mapped to `general.sessionRetention.enabled`). All other verified changes seem to exist only in the application's active memory or are being read from a non-standard/hidden location that is not the documented `settings.json`.",
"number": 25429,
"title": "Bug Report: Global Configuration Serialisation Failure",
"url": "https://github.com/google-gemini/gemini-cli/issues/25429",
"analysis": "The issue stems from a synchronization gap between the in-memory configuration state used by the CLI and the persistence layer. While the UI (likely built with Ink in `gemini.tsx` or `interactiveCli.tsx`) updates the application state, it fails to trigger a write operation to `~/.gemini/settings.json`. This suggests either missing 'save' calls in the settings change handlers or that the serialization schema in the SDK excludes these specific fields.",
"effort_level": "medium",
"reasoning": "The issue involves state synchronization between the Ink-based UI and the persistence layer. Fixing it requires auditing the settings schema in the SDK, updating the serialization logic to include the missing fields, and ensuring that the CLI's state change handlers correctly trigger asynchronous write operations to the filesystem. This spans multiple components and requires validation across the CLI and SDK.",
"recommended_implementation": "1. Update the `Settings` interface in `packages/sdk/src/types.ts` to include all missing keys (e.g., `compactToolOutput`, `hideSandboxStatus`). 2. In `packages/cli/src/interactiveCli.tsx`, locate the settings menu component and ensure the `onChange` or `onToggle` handlers call a persistence method like `config.save()`. 3. Ensure the configuration manager in the SDK correctly serializes these new fields to JSON.",
"validated": true
},
{
"body": "### What happened?\n\nDuring intensive work-in-progress updates, the bottom part of screen is blinking in terminal significantly. Especially when there is an in-progress streaming of model thoughts/answers/updates and you are typing at the same time. But not only when with typing.\n\nThis may affect user health eventually, especially for those who are sensitive to screen flashes/blinking, up to triggering epilepsy episodes.\n\nSee this recording:\n<video src=\"https://github.com/user-attachments/assets/7ced41e7-de7e-4e2b-b64d-c1fdfc582b55\" width=\"100%\" controls>\n Your browser does not support the video tag.\n</video>\n\n### What did you expect to happen?\n\nDuring work-in-progress updates, the screen should not blink in terminal.\n\n### Client information\n\n\n* **CLI Version:** 0.3.2\n* **Git Commit:** 545e956c3\n* **Session ID:** f83b9a03-d3ea-4e9a-a916-b59fcbef49b8\n* **Operating System:** darwin v24.12.0\n* **Sandbox Environment:** no sandbox\n* **Model Version:** uto-gemini-3\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 393.6 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** #ffffff\n* **Kitty Keyboard Protocol:** Unsupported\nproblem=during work-in-progress updates, screen is blinking in terminal. can that be fixed plz?\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 25390,
"title": "Screen is blinking during active usage in terminal",
"url": "https://github.com/google-gemini/gemini-cli/issues/25390",
"analysis": "The screen blinking in the terminal is a classic symptom of excessive UI re-renders in a Terminal User Interface (TUI), likely built with the 'ink' library. When the model streams thoughts or answers, each chunk of text triggers a state update. If the entire CLI component tree (including history) re-renders on every chunk while the user is also providing input, the terminal's stdout buffer is overwhelmed with escape sequences to clear and redraw the screen, causing visible flicker.",
"effort_level": "medium",
"reasoning": "The issue involves optimizing React/Ink state management and rendering logic to prevent excessive terminal redraws. This requires modifying state synchronization between streaming updates and user input, likely using <Static> components and throttling, which falls under the Medium category for logic tracing and state management across multiple components.",
"recommended_implementation": "1. In 'packages/cli/src/interactiveCli.tsx', wrap the historical messages in an Ink <Static> component so they are rendered once and then ignored by the reconciler. 2. Implement a throttle (using a ref or a custom hook) for the streaming text updates in the agent session logic to limit redraws to ~30fps. 3. Ensure that the input field and the streaming output are decoupled in the component tree to minimize the scope of updates.",
"validated": true
},
{
"body": "### What happened?\n\nI am hitting this error when trying to use the Gemini coding agent:\n\n<img width=\"372\" height=\"380\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/d650e1be-b9af-4eb8-a064-5af53cb99f78\" />\n\n\n\n### What did you expect to happen?\n\nNo error like that should appear\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n\u2502 CLI Version 0.37.1 \u2502\n\u2502 Git Commit 3b2d4f100 \u2502\n\u2502 Model gemini-3-flash-preview \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS darwin \u2502\n\u2502 Auth Method Signed in with Google (***) \u2502\n\u2502 Tier Gemini Code Assist for individuals\n```\n\n</details>\n\n### Login information\n\nGoogle Account\n\n### Anything else we need to know?\n\nHere is the info on the quarantine:\n\n```\n\n\u276f xattr -l $HOME/.gemini/tmp/bin/rg\n\ncom.apple.quarantine: 0081;693eb51d;BrowserOS;\n```\n\nand I was able to fix it via \n\n```\nxattr -d com.apple.quarantine $HOME/.gemini/tmp/bin/rg\n```\n\nSee https://github.com/zed-industries/zed/issues/47209. ",
"number": 25377,
"title": "Quarantined version of ripgrep (rg) on macOS",
"url": "https://github.com/google-gemini/gemini-cli/issues/25377",
"analysis": "The bundled 'ripgrep' (rg) binary is being blocked by macOS Gatekeeper because it contains the 'com.apple.quarantine' extended attribute. This is a common issue with binaries distributed via npm or zip files on macOS that haven't been notarized or cleared during installation.",
"effort_level": "small",
"reasoning": "The fix is highly localized, requiring a simple programmatic call to 'xattr' to remove the quarantine attribute on macOS. This is a straightforward platform-specific adjustment that can be implemented in a single file where the binary is initialized or executed, fitting the criteria for a small effort task.",
"validated": true,
"recommended_implementation": "In src/utils/ripgrep.ts, add a check for process.platform === 'darwin' and use child_process.execSync to run 'xattr -d com.apple.quarantine' on the ripgrep binary path before it is first used."
},
{
"body": "### What happened?\n\nWhen using Gemini CLI inside a tmux environment, any Thai text containing the character SARA AM (U+0E33) triggers severe rendering bugs that make\nthe CLI unusable.\n\nSymptoms identified:\n1. Output Duplication (Streaming Spam): When the AI streams a response containing SARA AM, the terminal fails to refresh the current line\n correctly. Instead, it \"spams\" the same line multiple times vertically. (e.g., a single bullet point appearing 8-10 times, as shown in the\n attached example).\n2. Self-Jumping Input Line: During interactive typing, entering SARA AM causes the current input line to \"jump\" downward spontaneously, leaving\n large vertical gaps between the prompt and the previous output.\n3. Cursor Desync: The internal layout engine (Ink) loses track of the actual cursor position because it perceives SARA AM as part of a 1-column\n cluster, while tmux/terminal renders it as a 2-column sequence.\n\nThe Technical Root Cause:\n* Ink's behavior: Uses Intl.Segmenter which merges Consonant + SARA AM into a single grapheme cluster of width 1.\n* tmux/xterm.js behavior: Renders the same sequence across 2 columns (matching standard wcwidth logic).\n* The Mismatch: Since the terminal's physical cursor is 1 unit ahead of where Ink thinks it is, every frame refresh results in Ink sending \"move\n cursor\" or \"clear line\" commands to incorrect coordinates. This triggers tmux to scroll or wrap lines prematurely to protect the buffer, leading\n to the \"spamming\" effect.\n\n### What did you expect to happen?\n\nThe CLI should maintain a 1:1 coordinate sync with the terminal grid. Typing or streaming SARA AM should result in a single, stable line of text\nwithout triggering unintended line breaks or duplicated output.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 \u2502\n\u2502 About Gemini CLI \u2502\n\u2502 \u2502\n\u2502 CLI Version 0.37.2 \u2502\n\u2502 Git Commit 545e956c3 \u2502\n\u2502 Model gemini-3-flash-preview \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS linux \u2502\n\u2502 Auth Method Signed in with Google \u2502\n\u2502 Tier Gemini Code Assist in Google One AI Pro \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\n```\n\n</details>\n\n### Login information\n\nLogged in via Google Account.\n\n### Anything else we need to know?\n\n* Platform: Linux (Debian) + tmux.\n* Consistency: This issue is exclusive to SARA AM (U+0E33). Other Thai combining marks (vowels/tones) work correctly because both Ink and\n terminals agree they have 0 width.\n* Replicability: The issue is highly replicable by simply asking the AI to \"Response in Thai with words like '\u0e01\u0e33\u0e25\u0e31\u0e07', '\u0e17\u0e33', '\u0e41\u0e19\u0e30\u0e19\u0e33'\".\n\nVisual Evidence of the \"Spam\" bug:\n\n \u0e21\u0e31\u0e19\u0e17\u0e33\u0e2d\u0e30\u0e44\u0e23\u0e44\u0e14\u0e49\u0e1a\u0e49\u0e32\u0e07? (The God Mode)\n \u0e21\u0e31\u0e19\u0e17\u0e33\u0e2d\u0e30\u0e44\u0e23\u0e44\u0e14\u0e49\u0e1a\u0e49\u0e32\u0e07? (The God Mode)\n \u0e21\u0e31\u0e19\u0e17\u0e33\u0e2d\u0e30\u0e44\u0e23\u0e44\u0e14\u0e49\u0e1a\u0e49\u0e32\u0e07? (The God Mode)\n \u0e21\u0e31\u0e19\u0e17\u0e33\u0e2d\u0e30\u0e44\u0e23\u0e44\u0e14\u0e49\u0e1a\u0e49\u0e32\u0e07? (The God Mode)\n ... (repeated multiple times for a single output line)\n\nProposed Fix:\nUpdate the string-width calculation within the Ink library to treat U+0E33 as having a visual width of 1, effectively making the Consonant + SARA\nAM cluster have a total width of 2, aligning it with the behavior of terminal grids.",
"number": 25369,
"title": "Thai SARA AM (U+0E33) width mismatch causing erratic line jumping and output duplication (spamming) in tmux",
"url": "https://github.com/google-gemini/gemini-cli/issues/25369",
"analysis": "The root cause is a discrepancy between how the Ink UI library (via Intl.Segmenter) and the tmux terminal emulator calculate the visual width of the Thai SARA AM (U+0E33) character. Ink perceives it as a single-column character, while tmux/terminal renders it as two columns or handles the combining sequence differently. This mismatch causes Ink's layout engine to lose track of the cursor position, leading to line duplication during streaming and vertical jumping during input.",
"effort_level": "medium",
"reasoning": "The issue involves logic tracing and state synchronization within the Ink UI layer. Fixing the width mismatch requires intercepting and sanitizing text across multiple components (streaming output and interactive input), which falls under the Medium criteria for Ink state management and parser adjustments. Additionally, validation requires a specific tmux environment to ensure the fix resolves the cursor desync without introducing regressions in other character clusters.",
"recommended_implementation": "In packages/cli/src/gemini.tsx and packages/cli/src/interactiveCli.tsx, apply string normalization (e.g., .normalize('NFC')) to AI-generated content and user input. If normalization is insufficient, implement a custom component or hook that intercepts text and manually adjusts for known problematic Thai characters before they reach Ink's Text components.",
"validated": true
},
{
"body": "### What happened?\n\nwhile editing code- it stop responding and had an \"unexpected error\".\n\n### What did you expect to happen?\n\nnormal coding.\n\n### Client information\n\n\n* **CLI Version:** 0.37.2\n* **Git Commit:** 545e956c3\n* **Session ID:** 5ce31e85-8669-4273-8e3c-89557aaf7e5c\n* **Operating System:** win32 v24.14.1\n* **Sandbox Environment:** no sandbox\n* **Model Version:** gemini-3.1-pro-preview\n* **Auth Type:** gemini-api-key\n* **Memory Usage:** 266.8 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** Unknown\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\nAPI key\n\n### Anything else we need to know?\n\n\n\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 \u2713 Shell python -m py_compile compact_text_editor_qt.py [current working directory Z:\\NEW DESKTOP 2023\\My_AI_Tools\\s\u2026 \u2502\n\u2502 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\n\u2715 [API Error: UNKNOWN: unknown error, open\n 'C:\\Users\\Toshiba\\.gemini\\tmp\\secure\\chats\\session-2026-04-13T23-50-760af6d8.json']\n\n\n ? for shortcuts\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n auto-accept edits Shift+Tab to plan 1 GEMINI.md file\n\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 Debug Console (F12 to close) \u2502\n\u2502 \u2502\n\u2502 \u2139 Both GOOGLE_API_KEY and GEMINI_API_KEY are set. Using GOOGLE_API_KEY. \u2502\n\u2502 (x2) \u2502\n\u2502 \u26a0 Both GOOGLE_API_KEY and GEMINI_API_KEY are set. Using GOOGLE_API_KEY. \u2502\n\u2502 \u2139 Authenticated via \"gemini-api-key\". \u2502\n\u2502 \u26a0 [STARTUP] Phase 'load_builtin_commands' was started but never ended. Skipping metrics. \u2502\n\u2502 \u26a0 Both GOOGLE_API_KEY and GEMINI_API_KEY are set. Using GOOGLE_API_KEY. \u2502\n\u2502 \u26a0 Unable to determine encoding for windows code page 862. \u2502\n\u2502 \u2716 xterm.js: Parsing error: { \u2502\n\u2502 position: 143, \u2502\n\u2502 code: 215, \u2502\n\u2502 currentState: 7, \u2502\n\u2502 collect: 0, \u2502\n\u2502 params: s3 { \u2502\n\u2502 maxLength: 32, \u2502\n\u2502 maxSubParamsLength: 32, \u2502\n\u2502 params: Int32Array(32) [ \u2502\n\u2502 15, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0 \u2502\n\u2502 ], \u2502\n\u2502 length: 1, \u2502\n\u2502 _subParams: Int32Array(32) [ \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0 \u2502\n\u2502 ], \u2502\n\u2502 _subParamsLength: 0, \u2502\n\u2502 _subParamsIdx: Uint16Array(32) [ \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0 \u2502\n\u2502 ], \u2502\n\u2502 _rejectDigits: false, \u2502\n\u2502 _rejectSubDigits: false, \u2502\n\u2502 _digitIsSub: false \u2502\n\u2502 }, \u2502\n\u2502 abort: false \u2502\n\u2502 } \u2502\n\u2502 \u2716 xterm.js: Parsing error: { \u2502\n\u2502 position: 144, \u2502\n\u2502 code: 215, \u2502\n\u2502 currentState: 9, \u2502\n\u2502 collect: 0, \u2502\n\u2502 params: s3 { \u2502\n\u2502 maxLength: 32, \u2502\n\u2502 maxSubParamsLength: 32, \u2502\n\u2502 params: Int32Array(32) [ \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0 \u2502\n\u2502 ], \u2502\n\u2502 length: 1, \u2502\n\u2502 _subParams: Int32Array(32) [ \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0 \u2502\n\u2502 ], \u2502\n\u2502 _subParamsLength: 0, \u2502\n\u2502 _subParamsIdx: Uint16Array(32) [ \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0 \u2502\n\u2502 ], \u2502\n\u2502 _rejectDigits: false, \u2502\n\u2502 _rejectSubDigits: false, \u2502\n\u2502 _digitIsSub: false \u2502\n\u2502 }, \u2502\n\u2502 abort: false \u2502\n\u2502 } \u2502\n\u2502 \u2716 xterm.js: Parsing error: { \u2502\n\u2502 position: 32, \u2502\n\u2502 code: 215, \u2502\n\u2502 currentState: 7, \u2502\n\u2502 collect: 0, \u2502\n\u2502 params: s3 { \u2502\n\u2502 maxLength: 32, \u2502\n\u2502 maxSubParamsLength: 32, \u2502\n\u2502 params: Int32Array(32) [ \u2502\n\u2502 19, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0 \u2502\n\u2502 ], \u2502\n\u2502 length: 1, \u2502\n\u2502 _subParams: Int32Array(32) [ \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0 \u2502\n\u2502 ], \u2502\n\u2502 _subParamsLength: 0, \u2502\n\u2502 _subParamsIdx: Uint16Array(32) [ \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0 \u2502\n\u2502 ], \u2502\n\u2502 _rejectDigits: false, \u2502\n\u2502 _rejectSubDigits: false, \u2502\n\u2502 _digitIsSub: false \u2502\n\u2502 }, \u2502\n\u2502 abort: false \u2502\n\u2502 } \u2502\n\u2502 \u2716 xterm.js: Parsing error: { \u2502\n\u2502 position: 63, \u2502\n\u2502 code: 215, \u2502\n\u2502 currentState: 7, \u2502\n\u2502 collect: 0, \u2502\n\u2502 params: s3 { \u2502\n\u2502 maxLength: 32, \u2502\n\u2502 maxSubParamsLength: 32, \u2502\n\u2502 params: Int32Array(32) [ \u2502\n\u2502 19, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0 \u2502\n\u2502 ], \u2502\n\u2502 length: 1, \u2502\n\u2502 _subParams: Int32Array(32) [ \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0 \u2502\n\u2502 ], \u2502\n\u2502 _subParamsLength: 0, \u2502\n\u2502 _subParamsIdx: Uint16Array(32) [ \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0 \u2502\n\u2502 ], \u2502\n\u2502 _rejectDigits: false, \u2502\n\u2502 _rejectSubDigits: false, \u2502\n\u2502 _digitIsSub: false \u2502\n\u2502 }, \u2502\n\u2502 abort: false \u2502\n\u2502 } \u2502\n\u2502 \u2716 xterm.js: Parsing error: { \u2502\n\u2502 position: 300, \u2502\n\u2502 code: 215, \u2502\n\u2502 currentState: 7, \u2502\n\u2502 collect: 0, \u2502\n\u2502 params: s3 { \u2502\n\u2502 maxLength: 32, \u2502\n\u2502 maxSubParamsLength: 32, \u2502\n\u2502 params: Int32Array(32) [ \u2502\n\u2502 58, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0 \u2502\n\u2502 ], \u2502\n\u2502 length: 1, \u2502\n\u2502 _subParams: Int32Array(32) [ \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0 \u2502\n\u2502 ], \u2502\n\u2502 _subParamsLength: 0, \u2502\n\u2502 _subParamsIdx: Uint16Array(32) [ \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0 \u2502\n\u2502 ], \u2502\n\u2502 _rejectDigits: false, \u2502\n\u2502 _rejectSubDigits: false, \u2502\n\u2502 _digitIsSub: false \u2502\n\u2502 }, \u2502\n\u2502 abort: false \u2502\n\u2502 } \u2502\n\u2502 \u2716 xterm.js: Parsing error: { \u2502\n\u2502 position: 352, \u2502\n\u2502 code: 215, \u2502\n\u2502 currentState: 7, \u2502\n\u2502 collect: 0, \u2502\n\u2502 params: s3 { \u2502\n\u2502 maxLength: 32, \u2502\n\u2502 maxSubParamsLength: 32, \u2502\n\u2502 params: Int32Array(32) [ \u2502\n\u2502 58, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0 \u2502\n\u2502 ], \u2502\n\u2502 length: 1, \u2502\n\u2502 _subParams: Int32Array(32) [ \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0 \u2502\n\u2502 ], \u2502\n\u2502 _subParamsLength: 0, \u2502\n\u2502 _subParamsIdx: Uint16Array(32) [ \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0 \u2502\n\u2502 ], \u2502\n\u2502 _rejectDigits: false, \u2502\n\u2502 _rejectSubDigits: false, \u2502\n\u2502 _digitIsSub: false \u2502\n\u2502 }, \u2502\n\u2502 abort: false \u2502\n\u2502 } \u2502\n\u2502 \u2716 xterm.js: Parsing error: { \u2502\n\u2502 position: 415, \u2502\n\u2502 code: 215, \u2502\n\u2502 currentState: 7, \u2502\n\u2502 collect: 0, \u2502\n\u2502 params: s3 { \u2502\n\u2502 maxLength: 32, \u2502\n\u2502 maxSubParamsLength: 32, \u2502\n\u2502 params: Int32Array(32) [ \u2502\n\u2502 58, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0 \u2502\n\u2502 ], \u2502\n\u2502 length: 1, \u2502\n\u2502 _subParams: Int32Array(32) [ \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0 \u2502\n\u2502 ], \u2502\n\u2502 _subParamsLength: 0, \u2502\n\u2502 _subParamsIdx: Uint16Array(32) [ \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0 \u2502\n\u2502 ], \u2502\n\u2502 _rejectDigits: false, \u2502\n\u2502 _rejectSubDigits: false, \u2502\n\u2502 _digitIsSub: false \u2502\n\u2502 }, \u2502\n\u2502 abort: false \u2502\n\u2502 } \u2502\n\u2502 \u2716 xterm.js: Parsing error: { \u2502\n\u2502 position: 436, \u2502\n\u2502 code: 215, \u2502\n\u2502 currentState: 7, \u2502\n\u2502 collect: 0, \u2502\n\u2502 params: s3 { \u2502\n\u2502 maxLength: 32, \u2502\n\u2502 maxSubParamsLength: 32, \u2502\n\u2502 params: Int32Array(32) [ \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0 \u2502\n\u2502 ], \u2502\n\u2502 length: 1, \u2502\n\u2502 _subParams: Int32Array(32) [ \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0 \u2502\n\u2502 ], \u2502\n\u2502 _subParamsLength: 0, \u2502\n\u2502 _subParamsIdx: Uint16Array(32) [ \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0, 0, 0, 0, 0, \u2502\n\u2502 0, 0, 0, 0, 0 \u2502\n\u2502 ], \u2502\n\u2502 _rejectDigits: false, \u2502\n\u2502 _rejectSubDigits: false, \u2502\n\u2502 _digitIsSub: false \u2502\n\u2502 }, \u2502\n\u2502 abort: false \u2502\n\u2502 } \u2502\n\u2502 \u2716 Error writing conversation file. Error: UNKNOWN: unknown error, open \u2502\n\u2502 'C:\\Users\\Toshiba\\.gemini\\tmp\\secure\\chats\\session-2026-04-13T23-50-760af6d8.json' \u2502\n\u2502 at Object.writeFileSync (node:fs:2413:20) \u2502\n\u2502 at ChatRecordingService.writeConversation \u2502\n\u2502 (file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-2P3YD5SP.js:253244:12) \u2502\n\u2502 at ChatRecordingService.updateConversation \u2502\n\u2502 (file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-2P3YD5SP.js:253264:10) \u2502\n\u2502 at ChatRecordingService.updateMessagesFromHistory \u2502\n\u2502 (file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-2P3YD5SP.js:253415:12) \u2502\n\u2502 at GeminiChat.setHistory \u2502\n\u2502 (file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-2P3YD5SP.js:309951:31) \u2502\n\u2502 at GeminiClient.tryMaskToolOutputs \u2502\n\u2502 (file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-2P3YD5SP.js:314576:22) \u2502\n\u2502 at async GeminiClient.processTurn \u2502\n\u2502 (file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-2P3YD5SP.js:314217:5) \u2502\n\u2502 at async GeminiClient.sendMessageStream \u2502\n\u2502 (file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-2P3YD5SP.js:314400:14) \u2502\n\u2502 at async \u2502\n\u2502 file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/interactiveCli-25PTL36A.js:44087:2 \u2502\n\u2502 4 \u2502\n\u2502 at async \u2502\n\u2502 file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/interactiveCli-25PTL36A.js:44262:3 \u2502\n\u2502 8 { \u2502\n\u2502 errno: -4094, \u2502\n\u2502 code: 'UNKNOWN', \u2502\n\u2502 syscall: 'open', \u2502\n\u2502 path: 'C:\\\\Users\\\\Toshiba\\\\.gemini\\\\tmp\\\\secure\\\\chats\\\\session-2026-04-13T23-50-760af6d8.json' \u2502\n\u2502 } \u2502\n\u2502 \u2716 Error updating conversation history from memory. Error: UNKNOWN: unknown error, open \u2502\n\u2502 'C:\\Users\\Toshiba\\.gemini\\tmp\\secure\\chats\\session-2026-04-13T23-50-760af6d8.json' \u2502\n\u2502 at Object.writeFileSync (node:fs:2413:20) \u2502\n\u2502 at ChatRecordingService.writeConversation \u2502\n\u2502 (file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-2P3YD5SP.js:253244:12) \u2502\n\u2502 at ChatRecordingService.updateConversation \u2502\n\u2502 (file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-2P3YD5SP.js:253264:10) \u2502\n\u2502 at ChatRecordingService.updateMessagesFromHistory \u2502\n\u2502 (file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-2P3YD5SP.js:253415:12) \u2502\n\u2502 at GeminiChat.setHistory \u2502\n\u2502 (file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-2P3YD5SP.js:309951:31) \u2502\n\u2502 at GeminiClient.tryMaskToolOutputs \u2502\n\u2502 (file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-2P3YD5SP.js:314576:22) \u2502\n\u2502 at async GeminiClient.processTurn \u2502\n\u2502 (file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-2P3YD5SP.js:314217:5) \u2502\n\u2502 at async GeminiClient.sendMessageStream \u2502\n\u2502 (file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-2P3YD5SP.js:314400:14) \u2502\n\u2502 at async \u2502\n\u2502 file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/interactiveCli-25PTL36A.js:44087:2 \u2502\n\u2502 4 \u2502\n\u2502 at async \u2502\n\u2502 file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/interactiveCli-25PTL36A.js:44262:3 \u2502\n\u2502 8 { \u2502\n\u2502 errno: -4094, \u2502\n\u2502 code: 'UNKNOWN', \u2502\n\u2502 syscall: 'open', \u2502\n\u2502 path: 'C:\\\\Users\\\\Toshiba\\\\.gemini\\\\tmp\\\\secure\\\\chats\\\\session-2026-04-13T23-50-760af6d8.json' \u2502\n\u2502 } \u2502\n\u2502 \u2716 Error writing conversation file. Error: UNKNOWN: unknown error, open \u2502\n\u2502 'C:\\Users\\Toshiba\\.gemini\\tmp\\secure\\chats\\session-2026-04-13T23-50-760af6d8.json' \u2502\n\u2502 at Object.writeFileSync (node:fs:2413:20) \u2502\n\u2502 at ChatRecordingService.writeConversation \u2502\n\u2502 (file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-2P3YD5SP.js:253244:12) \u2502\n\u2502 at ChatRecordingService.updateConversation \u2502\n\u2502 (file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-2P3YD5SP.js:253264:10) \u2502\n\u2502 at ChatRecordingService.recordMessage \u2502\n\u2502 (file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-2P3YD5SP.js:253054:12) \u2502\n\u2502 at file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-MODIYMRW.js:67996:35 \u2502\n\u2502 at \u2502\n\u2502 file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/interactiveCli-25PTL36A.js:44311:1 \u2502\n\u2502 5 \u2502\n\u2502 at async \u2502\n\u2502 file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-2P3YD5SP.js:254636:23 { \u2502\n\u2502 errno: -4094, \u2502\n\u2502 code: 'UNKNOWN', \u2502\n\u2502 syscall: 'open', \u2502\n\u2502 path: 'C:\\\\Users\\\\Toshiba\\\\.gemini\\\\tmp\\\\secure\\\\chats\\\\session-2026-04-13T23-50-760af6d8.json' \u2502\n\u2502 } \u2502\n\u2502 \u2716 Error saving message to chat history. Error: UNKNOWN: unknown error, open \u2502\n\u2502 'C:\\Users\\Toshiba\\.gemini\\tmp\\secure\\chats\\session-2026-04-13T23-50-760af6d8.json' \u2502\n\u2502 at Object.writeFileSync (node:fs:2413:20) \u2502\n\u2502 at ChatRecordingService.writeConversation \u2502\n\u2502 (file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-2P3YD5SP.js:253244:12) \u2502\n\u2502 at ChatRecordingService.updateConversation \u2502\n\u2502 (file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-2P3YD5SP.js:253264:10) \u2502\n\u2502 at ChatRecordingService.recordMessage \u2502\n\u2502 (file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-2P3YD5SP.js:253054:12) \u2502\n\u2502 at file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-MODIYMRW.js:67996:35 \u2502\n\u2502 at \u2502\n\u2502 file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/interactiveCli-25PTL36A.js:44311:1 \u2502\n\u2502 5 \u2502\n\u2502 at async \u2502\n\u2502 file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-2P3YD5SP.js:254636:23 { \u2502\n\u2502 errno: -4094, \u2502\n\u2502 code: 'UNKNOWN', \u2502\n\u2502 syscall: 'open', \u2502\n\u2502 path: 'C:\\\\Users\\\\Toshiba\\\\.gemini\\\\tmp\\\\secure\\\\chats\\\\session-2026-04-13T23-50-760af6d8.json' \u2502\n\u2502 } \u2502\n\u2502 \u2716 ========================================= \u2502\n\u2502 This is an unexpected error. Please file a bug report using the /bug tool. \u2502\n\u2502 CRITICAL: Unhandled Promise Rejection! \u2502\n\u2502 ========================================= \u2502\n\u2502 Reason: Error: UNKNOWN: unknown error, open \u2502\n\u2502 'C:\\Users\\Toshiba\\.gemini\\tmp\\secure\\chats\\session-2026-04-13T23-50-760af6d8.json' \u2502\n\u2502 Stack trace: \u2502\n\u2502 Error: UNKNOWN: unknown error, open 'C:\\Users\\Toshiba\\.gemini\\tmp\\secure\\chats\\session-2026-04-13T23-50-760af6d8.json' \u2502\n\u2502 at Object.writeFileSync (node:fs:2413:20) \u2502\n\u2502 at ChatRecordingService.writeConversation \u2502\n\u2502 (file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-2P3YD5SP.js:253244:12) \u2502\n\u2502 at ChatRecordingService.updateConversation \u2502\n\u2502 (file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-2P3YD5SP.js:253264:10) \u2502\n\u2502 at ChatRecordingService.recordMessage \u2502\n\u2502 (file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-2P3YD5SP.js:253054:12) \u2502\n\u2502 at file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-MODIYMRW.js:67996:35 \u2502\n\u2502 at \u2502\n\u2502 file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/interactiveCli-25PTL36A.js:44311:1 \u2502\n\u2502 5 \u2502\n\u2502 at async \u2502\n\u2502 file:///C:/Users/Toshiba/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-2P3YD5SP.js:254636:23\n\n![Image](https://github.com/user-attachments/assets/7cedd6b1-db18-48b6-8cb0-f73f7bfc2505)\n\n[session-2026-04-13T23-50-760af6d8.json](https://github.com/user-attachments/files/26693464/session-2026-04-13T23-50-760af6d8.json)\n",
"number": 25350,
"title": "\"unhandeled promise rejection!\" - cli crash",
"url": "https://github.com/google-gemini/gemini-cli/issues/25350",
"analysis": "The crash is caused by an unhandled promise rejection, which in Node.js leads to a process exit if not caught. The logs indicate the crash occurred during or immediately after a shell command execution ('python -m py_compile'). This suggests that either the shell execution logic in the SDK or the tool-calling orchestration in the session management is failing to catch an asynchronous error, possibly related to process termination, timeouts, or Windows-specific shell behavior.",
"effort_level": "medium",
"reasoning": "The issue is explicitly identified as an unhandled promise rejection occurring during an asynchronous shell command execution. According to the criteria, resolving unhandled promise rejections and managing standard asynchronous control flow falls under the Medium category. While the crash occurred on Windows, the fix primarily involves implementing robust error wrapping in the tool execution logic and adding a global rejection handler, which does not yet necessitate deep architectural changes or complex PTY/signal handling characteristic of the Large category.",
"validated": true
},
{
"body": "## Summary\n\nIn ACP mode, stdout can be polluted by non-JSON debug lines when project hooks are enabled and the ACP session closes. The ACP client then logs `Failed to parse JSON message:` for hook planner/runner debug lines even though the hook itself succeeds.\n\nExamples of leaked lines:\n\n- `Deduplicated hook: ...`\n- `Created execution plan for SessionEnd: ...`\n- `Expanding hook command: ...`\n- `Hook execution for SessionEnd: ...`\n\n## Why this matters\n\nACP stdout should remain strict NDJSON. Even when the hook behavior is correct, the client sees protocol corruption/noise and reports parser warnings.\n\nMore importantly, this blocks practical use of Gemini CLI as a dependable ACP server for external clients, orchestrators, and IDE integrations. The broader goal here is not just to remove noise in a test run, but to make Gemini CLI ACP mode reliable enough to be used as a real integration surface.\n\n## Repro\n\n1. Configure project-level hooks with a `SessionEnd` matcher for `exit`.\n2. Start Gemini CLI in ACP mode from the bundle, for example `bundle/gemini.js --acp`.\n3. Connect an ACP client over `acp.ndJsonStream(...)`.\n4. Run a prompt that triggers at least one tool call and then close stdin / close the ACP connection.\n5. Observe client-side parse warnings from `@agentclientprotocol/sdk/dist/stream.js` with `Failed to parse JSON message:`.\n\nI reproduced this while validating ACP hook behavior with a `SessionEnd(exit)` hook and an `AfterTool(write_file)` hook.\n\n## Expected\n\nOnly NDJSON protocol messages should be emitted on stdout in ACP mode. Debug / feedback text should stay on stderr.\n\nThat guarantee is important if Gemini CLI ACP mode is intended to be used as a real server boundary rather than only as an internal/dev surface.\n\n## Actual\n\nDuring shutdown, hook planning/execution debug lines are emitted to stdout, so the ACP client tries to parse them as NDJSON and reports parse failures.\n\n## Diagnosis\n\nThis looks like a cleanup ordering bug between the global console patch and ACP shutdown:\n\n- `packages/cli/src/gemini.tsx` installs a global `ConsolePatcher` and registers `consolePatcher.cleanup` with `registerCleanup(...)`.\n- `packages/cli/src/acp/acpClient.ts` also installs an ACP-specific `ConsolePatcher`.\n- ACP shutdown awaits `connection.closed.finally(runExitCleanup)`.\n- During `runExitCleanup()`, the global cleanup restores the console before `SessionEnd` hook debug logging is fully done.\n- The later `debugLogger.debug(...)` calls from hook planning / execution then fall back to stdout.\n\n## Candidate fix\n\nKeep a console patch active for the entire ACP shutdown lifecycle.\n\nOne local fix that stopped the parser warnings was:\n\n- treat ACP as non-interactive for the global patch setup, and\n- do **not** register the global `ConsolePatcher.cleanup` in ACP mode, so the console remains redirected until ACP shutdown is fully complete.\n\nThe ACP-local patch can still be restored at the very end.\n\n## Validation\n\nAfter applying that fix locally, these passed:\n\n- `npm run bundle`\n- `npm run test:integration:sandbox:none -- ./acp-success-memory-hooks.test.ts`\n- `npm run test:integration:sandbox:none -- ./acp-telemetry.test.ts`\n\nThe stderr warnings are still visible, but ACP stdout stays clean and the client no longer logs NDJSON parse failures.\n",
"number": 25345,
"title": "ACP stdout is polluted by SessionEnd hook debug logs during shutdown",
"url": "https://github.com/google-gemini/gemini-cli/issues/25345",
"analysis": "The issue is caused by debug logging within the hook execution logic (likely in the SDK) writing to stdout. In ACP (Agent Communication Protocol) mode, stdout is reserved for NDJSON messages. Any non-JSON output corrupts the stream and causes client-side parser errors. The specific log lines mentioned are characteristic of the hook planning and execution phase.",
"effort_level": "small",
"reasoning": "The issue involves redirecting specific debug log statements from stdout to stderr to prevent protocol corruption in ACP mode. This is a highly localized fix that involves identifying the log calls in the hook runner logic and updating them to use the correct output stream, which falls under the 'Small' effort category for tweaking static logging and error messages.",
"validated": true,
"recommended_implementation": "In the hook planner and runner modules (e.g., `src/hooks/planner.ts` and `src/hooks/runner.ts`), redirect all debug and status logging from `console.log` to `console.error`. This ensures that hook execution metadata is sent to stderr, preserving the integrity of the NDJSON protocol on stdout during ACP sessions."
},
{
"body": "### What happened?\n\n I am experiencing frequent ERR_STREAM_PREMATURE_CLOSE errors while using the Gemini CLI. This error has occurred multiple times\n (n times) today during both long response generations and sequences of tool executions. The process terminates abruptly, forcing\n me to restart the task.\n\n### What did you expect to happen?\n\n I expected the streaming response and tool execution to complete successfully without the stream closing prematurely. The\n connection should remain stable throughout long generations, or provide a more resilient recovery mechanism.\n\n### Client information\n\n\n* **CLI Version:** 0.37.1\n* **Git Commit:** 3b2d4f100\n* **Session ID:** 566b8616-9967-4125-921f-3436d4ac16d9\n* **Operating System:** darwin v25.8.2\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto-gemini-3\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 360.6 MB\n* **Terminal Name:** tmux 3.6a\n* **Terminal Background:** #000000\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\n Authenticated using oauth-personal.\n\n### Anything else we need to know?\n\n * Error Code: ERR_STREAM_PREMATURE_CLOSE\n * Frequency: Very high (happened numerous times today).\n * Context: The issue seems to trigger more often when the model is generating large amounts of text or when multiple complex\n tools are being called in succession.\n * Note: I am attaching the exported chat history JSON to this issue to help with the investigation of the stream interruption.",
"number": 25253,
"title": "Frequent ERR_STREAM_PREMATURE_CLOSE during response streaming and tool execution",
"url": "https://github.com/google-gemini/gemini-cli/issues/25253",
"analysis": "The error ERR_STREAM_PREMATURE_CLOSE occurs when a Node.js stream is destroyed before it has fully ended. In the Gemini CLI, this typically happens during long-running HTTP/2 or fetch streaming responses from the Gemini API or during tool execution I/O. The current implementation likely lacks robust error handling for the response stream, causing the process to crash when the network connection hiccups or the server closes the connection unexpectedly.",
"effort_level": "medium",
"reasoning": "Handling ERR_STREAM_PREMATURE_CLOSE requires implementing resilient stream management and retry logic across the SDK and CLI rendering layers. This involves tracing asynchronous flows, managing UI state synchronization during network interruptions, and ensuring robust error handling for long-running streaming responses, which fits the Medium effort criteria for logic tracing and state management.",
"validated": true
},
{
"body": "### What happened?\n\nTrying to do setup \" gemini mcp add mobile-mcp npx -y @mobilenext/mobile-mcp@latest\" ; and after i start the gemini cli , it shows this, \n\n\nXcode command line tools \u2502\n\u2502 Android Platform Tools \u2502\n\u2502 node.js v22+ \u2502\n\u2502 MCP supported foundational models or agents, like Claude MCP, OpenAI Agent SDK, Copilot Studio \u2502\n\u2502 Simulators, Emulators, and Real Devices \u2502\n\u2502 When launched, Mobile MCP can connect to: \u2502\n\u2502 \u2502\n\u2502 iOS Simulators on macOS' \u2502\n\u2502 Stack trace: \u2502\n\u2502 Error: ENAMETOOLONG: name too long, lstat '/home/vatsal1/example.com\". \u2502\n\u2502 More prompt examples can be found here. \u2502\n\u2502 \u2502\n\u2502 Prerequisites \u2502\n\u2502 What you will need to connect MCP with your agent and mobile devices: \u2502\n\u2502 \u2502\n\u2502 Xcode command line tools \u2584\u2502\n\u2502 Android Platform Tools \u2588\u2502\n\u2502 node.js v22+ \u2588\u2502\n\u2502 MCP supported foundational models or agents, like Claude MCP, OpenAI Agent SDK, Copilot Studio \u2588\u2502\n\u2502 Simulators, Emulators, and Real Devices \u2588\u2502\n\u2502 When launched, Mobile MCP can connect to: \u2588\u2502\n\u2502 \u2588\u2502\n\u2502 iOS Simulators on macOS' \u2588\u2502\n\u2502 at Module.realpathSync (node:fs:2791:29) \u2588\u2502\n\u2502 at robustRealpath (file:///home/vatsal1/.npm-global/lib/node_modules/@google/gemini-cli/bundle/chunk-JS5WSGB2.js:41537:16) \u2588\u2502\n\u2502 at resolveToRealPath (file:///home/vatsal1/.npm-global/lib/node_modules/@google/gemini-cli/bundle/chunk-JS5WSGB2.js:41528:10) \u2588\u2502\n\u2502 at checkPermissions (file:///home/vatsal1/.npm-global/lib/node_modules/@google/gemini-cli/bundle/chunk-MODIYMRW.js:74042:30) \u2588\u2502\n\u2502 at file:///home/vatsal1/.npm-global/lib/node_modules/@google/gemini-cli/bundle/interactiveCli-25PTL36A.js:49073:37 \u2588\u2502\n\u2502 at file:///home/vatsal1/.npm-global/lib/node_modules/@google/gemini-cli/bundle/interactiveCli-25PTL36A.js:37593:7 \u2588\u2502\n\u2502 at Object.handleSubmit (file:///home/vatsal1/.npm-global/lib/node_modules/@google/gemini-cli/bundle/interactiveCli-25PTL36A.js:35127:9) \u2588\u2502\n\u2502 at file:///home/vatsal1/.npm-global/lib/node_modules/@google/gemini-cli/bundle/interactiveCli-25PTL36A.js:37642:20 \u2588\u2502\n\u2502 at file:///home/vatsal1/.npm-global/lib/node_modules/@google/gemini-cli/bundle/interactiveCli-25PTL36A.js:38175:13 \u2588\u2502\n\u2502 at file:///home/vatsal1/.npm-global/lib/node_modules/@google/gemini-cli/bundle/chunk-MODIYMRW.js:64327:15 \n\n### What did you expect to happen?\n\njust normal chat conversation to happen\n\n### Client information\n\n\n* **CLI Version:** 0.37.1\n* **Git Commit:** 3b2d4f100\n* **Session ID:** fc78ec2f-5d54-464a-a1ca-238d2e0dde86\n* **Operating System:** linux v22.22.2\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto-gemini-3\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 291.7 MB\n* **Terminal Name:** VTE(8000)\n* **Terminal Background:** #e6f2f8\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 25228,
"title": "mcp bug (mobile-mcp)",
"url": "https://github.com/google-gemini/gemini-cli/issues/25228",
"analysis": "The Gemini CLI fails to gracefully handle MCP servers that output non-JSON-RPC text to stdout or stderr during initialization. In this case, 'mobile-mcp' is outputting its system requirements (likely because prerequisites like Xcode or Android tools are missing), which is being rendered directly in the CLI UI, likely causing the initialization to hang or the UI to break because the CLI expects JSON-RPC communication.",
"effort_level": "medium",
"reasoning": "The fix requires modifying the MCP transport logic to handle non-JSON-RPC output (noise) from stdout/stderr during the initialization phase. This involves logic tracing within the service integration layer to filter streams and updating the CLI's React/Ink state management to gracefully display these initialization errors instead of hanging the UI. This aligns with the criteria for Medium effort involving state synchronization and service integration.",
"recommended_implementation": "1. Update the MCP client in `packages/sdk/src/tool.ts` to capture and buffer `stderr` during the `initialize` phase. 2. Implement a validation check to ensure the first message from the server is a valid JSON-RPC response. 3. In `packages/cli/src/gemini.tsx`, wrap MCP initialization in a try-catch block and render a descriptive error message if a server fails to start or provides invalid output instead of allowing the raw output to disrupt the terminal UI.",
"validated": true
},
{
"body": "### Environment\n- OS: Windows 11\n- Gemini CLI version: 0.37.1\n- Node.js version: v20.20.2\n- PowerShell version: 7.6.0\n- Shell setting: enableInteractiveShell: true (node-pty)\n\n### What happened?\n`run_shell_command` executes commands (exit code is returned) but stdout is **always empty** regardless of command, encoding, or shell syntax used.\n\nCommands tested \u2014 all returned empty stdout:\n- `Get-ChildItem -Name`\n- `Get-Location`\n- `pwd`\n- `echo hello`\n- `cmd /c dir /b`\n- `.venv\\Scripts\\python.exe -c \"print('hello')\"`\n- `Get-ChildItem -Name | Out-String`\n\n### Root cause identified\nThe `isBinary()` function in `shellExecutionService.ts` performs a null-byte check on the first 512 bytes of shell output. When `enableInteractiveShell: true`, node-pty emits ANSI/VT control sequences containing null bytes at the start of every output stream. This triggers `isBinary()` to return `true`, halting the stream before any content is delivered to the model.\n\nThis is the same class of bug as #5961 (isBinaryFile misclassifies UTF-16 files).\n\n### Proof\n\nNode.js `execSync` works correctly on the same machine:\n```javascript\nconst {execSync} = require('child_process');\nconsole.log(execSync('Get-ChildItem -Name', {shell:'powershell.exe', encoding:'utf8'}));\n// Returns full file listing correctly\n```\n\nGemini CLI `run_shell_command` with same command \u2192 empty output.\n\n### Manual fix that works\nIn `chunk-2P3YD5SP.js` (bundled), changing `isBinary()` to always return `false`:\n```javascript\n// Before\nif (byte === 0) {\n return true;\n}\n\n// After\nif (byte === 0) {\n return false; // disabled \u2014 causes false positives on Windows PTY output\n}\n```\nAfter this patch, `run_shell_command` returns correct output for all commands.\n\n### Proposed fix\nSame approach as #5961 \u2014 check for known PTY/ANSI escape sequences before running null-byte detection, or skip `isBinary()` entirely for shell stdout streams (which are always text by definition).\n\n### Impact\n`run_shell_command` is completely non-functional on Windows with node-pty. This degrades the entire agentic workflow since the model cannot read any command output and enters wasteful debug loops.",
"number": 25164,
"title": "[Windows] run_shell_command always returns empty output \u2014 isBinary() false-positive on node-pty PTY stream",
"url": "https://github.com/google-gemini/gemini-cli/issues/25164",
"analysis": "The `run_shell_command` fails on Windows when using `node-pty` because the `isBinary()` check incorrectly flags ANSI/VT escape sequences (which may contain null bytes or specific control characters) as binary data. This causes the output stream to be terminated prematurely. The fix involves refining the binary detection logic in the shell execution module to be more permissive of control characters common in PTY streams.",
"effort_level": "medium",
"reasoning": "The issue is a logic-based false positive in the binary detection heuristic when processing ANSI/VT escape sequences from a PTY stream. While it involves Windows-specific behavior (node-pty/ConPTY), the fix is localized to refining the 'isBinary' utility or its application within the shell execution service. This aligns with the 'Medium' criteria for adjusting ANSI escape sequence handling and logic tracing across components.",
"validated": true
},
{
"body": "### What happened?\n\n\"row1: Place your finger on the fingerprint reader\nrow2: (immediately): Verification Timeout\"\n\n\n### What did you expect to happen?\n\nWait at least a second) to read my fingerprint.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n\nAbout Gemini CLI \u2502\u2588\n\u2502 \u2502\u2588\n\u2502 CLI Version 0.37.1 \u2502\u2588\n\u2502 Git Commit 3b2d4f100 \u2502\u2588\n\u2502 Model Auto (Gemini 3) \u2502\u2588\n\u2502 Sandbox no sandbox \u2502\u2588\n\u2502 OS linux \u2502\u2588\n\u2502 Auth Method Signed in with Google (main@gmail.com) \u2502\u2588\n\u2502 Tier Gemini Code Assist in Google One AI Pro \u2502\u2588\n\u2502 \n\n```\n\n</details>\n\n### Login information\n\nGoogle Account\n\n### Anything else we need to know?\n\nUbuntu 24.04 with fingerprint enabled for terminal commands.\nDefault wait timeout configured for such autentication is 10 seconds which is not respected by gemini-cli.",
"number": 25162,
"title": "Fingerprint approval for commands require SUDO is not waiting in command block",
"url": "https://github.com/google-gemini/gemini-cli/issues/25162",
"analysis": "The issue is likely caused by the shell execution logic not correctly handling interactive TTY prompts for sudo authentication (such as macOS Touch ID or Linux PAM). When a command requiring sudo is executed via `child_process.spawn` or similar without a proper TTY, the authentication module fails immediately because it cannot interact with the user or detects an EOF on stdin, resulting in an instant 'Verification Timeout'.",
"effort_level": "large",
"reasoning": "The issue involves complex child process management and terminal/PTY interaction to handle interactive sudo prompts like Touch ID. According to the criteria, platform-specific complexities involving child process (spawn/exec) management and terminal/PTY issues are classified as Large effort.",
"validated": true
},
{
"body": "### What happened?\n\nUpon upgrading to 0.36.0/0.37.0, Gemini CLI cannot be used anymore, failing with the following error at startup:\n\n```\n=========================================\nThis is an unexpected error. Please file a bug report using the /bug tool.\nCRITICAL: Unhandled Promise Rejection!\n=========================================\nReason: Error: Failed to initialize checkpointing: Error: spawn git ENOENT\n at ChildProcess._handle.onexit (node:internal/child_process:286:19)\n at onErrorNT (node:internal/child_process:484:16)\n at process.processTicksAndRejections (node:internal/process/task_queues:89:21). Please check that Git is working properly or disable checkpointing.\nStack trace:\nError: Failed to initialize checkpointing: Error: spawn git ENOENT\n at ChildProcess._handle.onexit (node:internal/child_process:286:19)\n at onErrorNT (node:internal/child_process:484:16)\n at process.processTicksAndRejections (node:internal/process/task_queues:89:21). Please check that Git is working properly or disable checkpointing.\n at _GitService.initialize (file:///home/erdavila/Apps/node-v24.13.0-linux-x64/lib/node_modules/@google/gemini-cli/bundle/chunk-JCJR4TJP.js:319248:13)\n at async Config.getGitService (file:///home/erdavila/Apps/node-v24.13.0-linux-x64/lib/node_modules/@google/gemini-cli/bundle/chunk-JCJR4TJP.js:350228:7)\n at async Config._initialize (file:///home/erdavila/Apps/node-v24.13.0-linux-x64/lib/node_modules/@google/gemini-cli/bundle/chunk-JCJR4TJP.js:348879:7)\n at async file:///home/erdavila/Apps/node-v24.13.0-linux-x64/lib/node_modules/@google/gemini-cli/bundle/interactiveCli-QUKUV3RI.js:48343:9\nAuthenticated via \"oauth-personal\".\n```\n\n### What did you expect to happen?\n\nGemini CLI should work with whatever Git is available via the `PATH` environment variable.\n\n### Client information\n\nMy system is Linux Mint 22.2.\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n# paste output here\nAbout Gemini CLI \u2502\n\u2502 \u2502\n\u2502 CLI Version 0.37.0 \u2502\n\u2502 Git Commit 352bbe149 \u2502\n\u2502 Model gemini-3-flash-preview \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS linux \u2502\n\u2502 Auth Method Signed in with Google (***@gmail.com) \u2502\n\u2502 Tier Gemini Code Assist for individuals \n```\n\n</details>\n\n### Login information\n\nGoogle Account\n\n### Anything else we need to know?\n\nI have a locally-compiled Git version (unchanged; obtained directly from the the `master` branch at https://github.com/git/git.git). The binary is at `~/bin`. The path `~/bin` is included in the `PATH` environment variable.\nThe command `gemini` fails in the same terminal session where I can use the locally-compiled Git.\nGemini CLI worked fine before upgrading to 0.36.0. I don't know which version I used before upgrading to 0.36.0.\nGemini CLI was upgraded with the `npm install -g @google/gemini-cli` command\n\nGemini CLI can be used if I install git via the `apt install git` command.",
"number": 25034,
"title": "Gemini CLI fails with locally-compiled Git",
"url": "https://github.com/google-gemini/gemini-cli/issues/25034",
"analysis": "The Gemini CLI fails at startup because it attempts to initialize a checkpointing feature that relies on the 'git' executable. The 'spawn git ENOENT' error indicates that the 'git' command is not found in the system's PATH. This occurs during the initialization phase, likely within the session management logic of the SDK.",
"effort_level": "medium",
"reasoning": "The issue is an unhandled promise rejection occurring during the asynchronous initialization of the checkpointing feature. While it involves child_process, it is a standard error handling and async flow problem rather than a complex architectural or platform-specific PTY issue. It fits the Medium criteria as it requires tracing the startup sequence and implementing robust validation or try-catch logic for the git dependency.",
"validated": true
},
{
"body": "### User Reports\nSeveral users have reported being unable to press 'Enter' to approve options in the Gemini CLI.\n\n**Symptoms:**\n* Users can navigate options (e.g., using numbers or arrow keys), but the 'Enter' key does nothing.\n* The issue appears intermittently.\n* One user reported that closing and reconnecting the terminal temporarily fixed it.\n* Another user noted that using YOLO mode () stopped the issue.\n\n<img width=\"512\" height=\"130\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/b07a8376-d7a9-452b-85c1-50e79834d4ec\" />\n\n### Error Details\nA stack trace provided by a user shows a critical unhandled promise rejection related to a fetch timeout:\n\n```\ncode: 'UND_ERR_HEADERS_TIMEOUT'\nReason: TypeError: fetch failed\nStack trace:\nTypeError: fetch failed\n at Object.processResponse (file:///.../google_gemini_cli/bundle/chunk-3IWYOUJ2.js:194037:20)\n...\n\u2716 [ERROR] [IDEConnectionUtils] IDE fetch failed for http://127.0.0.1:38371/mcp TypeError: fetch failed\n```\n\n<img width=\"2292\" height=\"1054\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/de71dc70-18bd-4e7b-b855-ffcf6436c400\" />\n\nThe error appears to be linked to the IDE companion extension connection (`IDEConnectionUtils`) and potentially blocks the UI rendering or input handling loop when a fetch to `127.0.0.1:38371/mcp` times out or fails.\n\n### Context\n* **Date of Reports:** April 6-7, 2026\n* **Affected Component:** UI / IDE Connection Utility\n* **Workaround:** Using YOLO mode seems to bypass the problematic check/fetch.",
"number": 24830,
"title": "Intermittent 'Enter' key non-responsiveness and UI hang during option approval",
"url": "https://github.com/google-gemini/gemini-cli/issues/24830",
"analysis": "The issue is caused by an unhandled promise rejection during a fetch call to the local IDE companion server (typically running on port 38371). When the request times out (UND_ERR_HEADERS_TIMEOUT), the CLI's interactive UI (built with Ink) enters a deadlocked state. The input handler for the 'Enter' key becomes unresponsive because the UI state machine is awaiting a promise that has failed without a catch block or a timeout, effectively freezing the event loop for user input.",
"effort_level": "medium",
"reasoning": "The issue involves resolving an unhandled promise rejection and fixing a UI deadlock within the Ink-based interactive CLI. This requires tracing the state synchronization between the CLI's input handlers and the asynchronous fetch calls to the IDE companion server. While the previous analysis suggested 'Large' due to the 'intermittent' nature, the root cause is a standard async control flow failure (UND_ERR_HEADERS_TIMEOUT) that needs robust error boundaries and timeout logic in the React/Ink state management layer, which fits the Medium criteria.",
"validated": true
},
{
"body": "### What happened?\n\n### Description\n\nMy Gemini CLI installation appears to have been automatically updated from the stable channel to a nightly build, even though I did not intentionally install `@nightly`.\n\nI expected automatic updates to stay on the stable channel by default.\n\n### What happened?\n\nI was using Gemini CLI normally and later found that the installed version had become:\n\n```bash\nnpm list -g @google/gemini-cli\n/opt/homebrew/lib\n\u2514\u2500\u2500 @google/gemini-cli@0.36.0-nightly.20260406.15298b28c\n\n### What did you expect to happen?\n\nIf I installed the stable version, automatic updates should remain on the stable channel and should not switch me to nightly unless I explicitly opt in.\n\n### Client information\n\n\u2502 About Gemini CLI \u2502\n\u2502 \u2502\n\u2502 CLI Version 0.36.0-nightly.20260406.15298b28c \u2502\n\u2502 Git Commit 4734630ba \u2502\n\u2502 Model Auto (Gemini 3) \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS darwin \u2502\n\u2502 Auth Method Signed in with Google (xxx@gmail.com) \u2502\n\u2502 Tier Gemini Code Assist in Google One AI Pro \n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 24810,
"title": "Stable installation was automatically updated to a nightly build",
"url": "https://github.com/google-gemini/gemini-cli/issues/24810",
"analysis": "The CLI's update detection logic likely fetches the latest version from the npm registry without specifying the 'latest' distribution tag. This results in the CLI identifying nightly pre-release versions (which often have higher version numbers) as available updates for stable installations. If the CLI has an auto-update feature, it is likely pulling the absolute newest version string instead of the one tagged as stable.",
"effort_level": "small",
"reasoning": "The issue is a localized logic error in the version checking mechanism. The fix involves ensuring the update check specifically queries the 'latest' npm distribution tag or filters out pre-release/nightly version strings. This is a straightforward logic adjustment likely contained within a single utility or initialization file.",
"validated": true,
"recommended_implementation": "In the update check utility (e.g., `src/utils/update.ts`), modify the npm registry fetch logic to explicitly request the 'latest' distribution tag instead of the highest version number. This ensures that users on the stable channel are not prompted to update to pre-release or nightly builds."
},
{
"body": "",
"number": 24790,
"title": "Warning about alternate buffer mode incorrectly fires when the user is just in terminalBuffer mode.",
"url": "https://github.com/google-gemini/gemini-cli/issues/24790",
"analysis": "The issue is a false positive warning triggered during terminal mode detection. The CLI incorrectly identifies 'terminalBuffer' mode as an 'alternate buffer' mode, likely due to an overly broad conditional check in the terminal initialization logic.",
"effort_level": "small",
"reasoning": "The issue involves correcting a false positive warning triggered by an overly broad conditional check in the terminal initialization logic. This is a highly localized logic fix, likely involving a single line change in one file, which aligns with the criteria for Small effort.",
"validated": true,
"recommended_implementation": "In src/terminal.ts, update the conditional check that triggers the alternate buffer warning to explicitly exclude 'terminalBuffer' mode, ensuring the warning only fires when the mode is strictly 'alternateBuffer'."
},
{
"body": "### Rendering glitch with nested scrollbars and wrapped lines\n\n**What happened?**\nWhen the CLI renders output with nested scrollbars (e.g., inside a tool call box) and wrapped lines, the content occasionally breaks out of the bordered box on the right side. This is particularly noticeable when a vertical scrollbar is present.\n\n**What did you expect to happen?**\nThe content should be correctly contained within the bordered box, accounting for the scrollbar width and proper wrapping boundaries.\n\n**Client information**\n<details>\n<summary>Client Information</summary>\n\n- **Version**: 0.36.0-nightly.20260317.2f90b4653\n- **OS**: darwin (macOS)\n- **Date**: Monday, April 6, 2026\n\n</details>\n\n**Anything else we need to know?**\nThe following image shows a `WriteFile` tool output where the wrapped markdown text is breaking the right border of the containing box.\n\n<img width=\"2148\" height=\"322\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/e2ebf378-8799-4e6a-91b5-9c9e916ee7f4\" />\n",
"number": 24768,
"title": "Rendering glitch with nested scrollbars and wrapped lines",
"url": "https://github.com/google-gemini/gemini-cli/issues/24768",
"analysis": "The rendering glitch occurs because the text wrapping logic within the CLI's UI components (likely using Ink) does not account for the width of the vertical scrollbar when calculating the available horizontal space inside a bordered box. When a scrollbar is present, it occupies one character column, but the text is wrapped as if the full width of the box (minus borders) is available, causing the text to overlap or push out the right border.",
"effort_level": "medium",
"reasoning": "The issue requires adjusting the layout logic within Ink components to dynamically account for scrollbar width during text wrapping. This involves tracing state management for scrollable containers, calculating available horizontal space, and ensuring synchronization between the content width and the container's border constraints, which fits the Medium effort criteria for UI state and layout synchronization.",
"recommended_implementation": "In the component rendering the tool call box (likely in 'packages/cli/src/gemini.tsx'), locate the container for the wrapped text. If the content height exceeds the maximum allowed height (triggering a scrollbar), reduce the 'width' or 'maxWidth' prop of the text container by 1 to account for the scrollbar's width. Ensure the parent 'Box' has 'overflowX: hidden' or explicit width constraints to prevent border breakage.",
"validated": true
},
{
"body": "### What happened?\n\nit takes around 5 seconds to execute in directory with no past sessions\n\n### What did you expect to happen?\n\nI'd expect this to execute as quickly as --help command and not make any network requests \n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n\u2502 CLI Version 0.36.0 \u2502\n\u2502 Model Auto (Gemini 3) \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS linux \u2502\n\u2502 Auth Method Signed in with Google (agierakowski@gmail.com) \u2502\n\u2502 Tier Gemini Code Assist in Google One AI Ultra \n```\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 24691,
"title": "--list-sessions is very slow and makes numerous network calls",
"url": "https://github.com/google-gemini/gemini-cli/issues/24691",
"analysis": "The --list-sessions command is likely being executed after the CLI performs full initialization, which includes authentication checks and model discovery via network calls. This overhead is unnecessary for a command that only needs to read local session metadata.",
"effort_level": "small",
"reasoning": "The fix involves reordering the CLI bootstrap sequence to intercept the --list-sessions flag before the SDK and authentication layers are initialized. This is a localized logic adjustment in the entry point, fitting the criteria for a small effort task with a clear root cause.",
"validated": true,
"recommended_implementation": "In the main entry point (e.g., `src/index.ts`), move the logic that handles the `--list-sessions` flag to the very beginning of the execution flow, before the SDK initialization and authentication checks. This ensures the command only reads local session files and exits before any network requests are made."
},
{
"body": "### What happened?\n\nEvery time I create a new folder, I encounter the same issue where pressing the 'r' key doesn't resolve the prompt. I'm currently forced to manually update the trust file for every new directory.\n\n<img width=\"1367\" height=\"407\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/750d8c2f-ea46-4341-a22c-28e36231a48a\" />\n\n### What did you expect to happen?\n\nShould open cli prompt\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n# paste output here\n```\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\nThis happens every time I open gemini cli in new untrusted folder",
"number": 24689,
"title": "Trust New Folder Infinite Loop",
"url": "https://github.com/google-gemini/gemini-cli/issues/24689",
"analysis": "The issue describes an infinite loop in the interactive CLI's trust prompt. When a user encounters an untrusted directory and presses 'r' (likely intended to trust/reload), the application fails to persist the trust status or refresh its internal state, causing the prompt to reappear. This typically happens because the keypress handler doesn't correctly trigger the file system update for the trust configuration or the UI component doesn't re-evaluate the trust status after the update.",
"effort_level": "medium",
"reasoning": "The issue involves a failure in UI state synchronization within the Ink-based CLI. Fixing it requires tracing the 'r' keypress handler, ensuring the trust persistence utility correctly updates the filesystem, and verifying that the React state triggers a re-render to bypass the trust prompt. This falls under the Medium category for React/Ink state management and asynchronous flow resolution.",
"validated": true
},
{
"body": "### What happened?\n\nWhen Zed is configured as the external editor and \"Modify with external editor\" is selected \nfor a file edit tool request, Gemini CLI opens Zed and correctly displays the diff in a new tab.\n\nHowever, after reviewing the diff and closing that tab in Zed, returning to Gemini CLI and \nselecting \"Allow once\" does nothing \u2014 the edit is never applied and the CLI remains blocked.\n\nThe only way to unblock Gemini CLI is to kill the entire Zed process at the OS level. \nOnce Zed is killed, \"Allow once\" works as expected and the file edit is applied.\n\nThis makes the \"Modify with external editor\" feature effectively unusable with Zed, as \nterminating the editor on every edit causes a significant productivity loss.\n\n### What did you expect to happen?\n\nAfter closing the diff tab in Zed and selecting \"Allow once\" in Gemini CLI, the file edit \nshould be applied immediately \u2014 without needing to kill the entire Zed process.\n\nThis is the behavior observed with VS Code on the same machine: closing the diff tab in \nVS Code is sufficient for Gemini CLI to proceed normally.\n\n### Client information\n\n```\nCLI Version 0.35.3\nGit Commit 52d103469\nModel Auto (Gemini 3)\nSandbox no sandbox\nOS win32\nAuth Method Signed in with Google\nTier Gemini Code Assist in Google One AI Pro\n```\n\n### Login information\n\nGoogle Account (OAuth)\n\n### Anything else we need to know?\n\nRoot cause hypothesis: Gemini CLI likely invokes Zed with a `--wait` flag and waits for \nthe spawned process to exit. Unlike VS Code (`code --wait`), Zed is a single-instance \napplication \u2014 opening a file does not spawn a new process. Closing an individual tab \ndoes not cause the Zed process to exit, so Gemini CLI waits indefinitely.\n\nTested editors:\n- Zed: reproduces the issue (closing the diff tab does not unblock Gemini CLI)\n- VS Code: works correctly (closing the diff tab unblocks Gemini CLI)\n\nOther editors have not been tested.\n\nAdditional context:\n- Gemini CLI is run in Windows Terminal (not inside Zed's integrated terminal).\n- Zed is used purely as a standalone text editor; no AI features (ACP, agent panel, etc.) \n are enabled or used in Zed. This is unrelated to the Zed \u2194 Gemini CLI ACP integration.\n\nOS: Windows",
"number": 24678,
"title": "`Modify with external editor` with Zed hangs until entire Zed process is killed (closing the diff tab is not enough)",
"url": "https://github.com/google-gemini/gemini-cli/issues/24678",
"analysis": "The Gemini CLI's interactive mode likely spawns the external editor (Zed) and waits for the child process to exit before it allows the tool execution to proceed, even after the user clicks 'Allow once'. Zed's CLI behavior differs from VS Code; while VS Code with `--wait` terminates the process when the tab is closed, Zed may keep the process alive until the entire application is closed. The CLI is likely blocked on an `await` for the editor process or a file lock held by that process on the temporary diff file.",
"effort_level": "medium",
"reasoning": "The issue involves the CLI's interactive state being blocked by a child process (Zed). Fixing this requires modifying the asynchronous control flow to ensure the UI remains responsive and can proceed upon user confirmation regardless of the editor's process state. This falls under 'Asynchronous Flow' and 'Service Integration' in the Medium category, as it requires logic tracing and state synchronization between the Ink UI and external process execution, rather than a trivial config change or a deep architectural overhaul.",
"validated": true
},
{
"body": "### What happened?\n\nI like the screenReader mode as it's very simple. However, if there is no content following the \"Model:\" line header, the tables break. See the screenshot and compare. Thank you.\n\n<img width=\"1989\" height=\"1162\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/a9425712-994a-439f-9c3f-c0200e74279e\" />\n\n### What did you expect to happen?\n\nPlease make the table format correct. Thank you.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n# paste output here\n```\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 24675,
"title": "Tables in screenReader mode break",
"url": "https://github.com/google-gemini/gemini-cli/issues/24675",
"analysis": "The issue is a layout/formatting bug in the interactive CLI's screenReader mode. When a model response starts with a table immediately after the 'Model:' header without any preceding text, the terminal rendering (likely using Ink) fails to correctly calculate the table's starting position or width, causing it to break. This occurs in the component responsible for rendering model outputs in the CLI.",
"effort_level": "small",
"reasoning": "The issue is a localized UI layout bug in the Ink-based CLI component. Fixing it involves adding a newline or adjusting the structural layout to ensure the 'Model:' header doesn't interfere with the subsequent table rendering in screenReader mode. This falls under minor tweaks to structural layouts in Ink components, which is categorized as Small effort.",
"validated": true,
"recommended_implementation": "In `src/components/Message.tsx`, ensure the model response content is rendered in a separate `Box` from the 'Model:' label to force a newline, preventing table layout corruption in screenReader mode."
},
{
"body": "Long term would like to get rid of selection mode but before we do need to make it still work correctly.\n\nRight now it doesn't auto-exit properly in alternate buffer mode and we don't show a message for it.",
"number": 24666,
"title": "Regression in selection mode behavior",
"url": "https://github.com/google-gemini/gemini-cli/issues/24666",
"analysis": "The issue describes a state management failure in the CLI's interactive mode where 'selection mode' (likely a TUI state for navigating history or text) persists incorrectly when the terminal is in alternate buffer mode. Additionally, there is a missing UI indicator to inform the user that selection mode is active.",
"effort_level": "medium",
"reasoning": "The issue involves state synchronization within the Ink-based TUI to ensure selection mode exits correctly when terminal buffer states change, alongside adding a UI indicator. This aligns with Medium effort criteria for React/Ink state management and UI state synchronization across components, rather than a deep architectural or platform-specific PTY overhaul.",
"validated": true
},
{
"body": "### What happened?\n\nWhen a session is resumed, the conversation itself continues on the resumed session, but some session-scoped storage paths appear to stay bound to the fresh startup session ID that was created before resume was processed.\n\nThat means the resumed chat can end up with split state:\n\n- the conversation/history continues under the resumed session\n- but plan files, tracker state, and task artifacts can still be written under the startup-only session namespace\n\nFrom a user perspective, this can make resumed work look inconsistent or partially \"lost\":\n\n- plan mode files may not be where the resumed session logically expects them\n- task tracker continuity can break across resume\n- session-scoped artifacts can be orphaned under a different session directory\n\nThis appears to affect current upstream `main` as of commit `a93a1ebd` on April 3, 2026.\n\n### What did you expect to happen?\n\nAfter resuming a session, all session-scoped state should move with that resumed session consistently.\n\nIn other words, once Gemini CLI resumes session `X`, the CLI should use session `X` for:\n\n- chat recording\n- plan mode storage\n- tracker storage\n- task storage\n- any cleanup logic for session-scoped artifacts\n\nThere should not be a split where the resumed conversation uses one session ID while storage-backed workflow state continues using another.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\n```console\n> /about\nAbout Gemini CLI\n\nCLI Version 0.36.0-nightly.20260317.2f90b4653\nGit Commit a93a1ebd6\nModel Auto (Gemini 3)\nSandbox no sandbox\nOS win32\nAuth Method Signed in with Google\nTier Gemini Code Assist in Google One AI Pro\n```\n\n</details>\n\n### Login information\n\n- Auth Method: `Signed in with Google`\n- Tier: `Gemini Code Assist in Google One AI Pro`\n\n### Anything else we need to know?\n\nI searched for existing issues first and found related-but-different reports, but not a direct duplicate of this specific storage/session split:\n\n- `#21311` covers resumed sessions becoming invalid / disappearing after auth failure\n- `#21359` covers plan mode writes failing when `sessionId` is missing\n- `#24532` covers sessions that appear to have never been recorded / cannot be resumed\n\nThis issue is different: resume itself can succeed, but resumed workflow state appears to stay partially bound to the startup session ID.\n\n## Technical analysis\n\nThe current implementation appears to construct `Storage` once using the startup session ID, then later mutate only the config session ID during resume:\n\n- `packages/core/src/config/config.ts:1257`\n - `this.storage = new Storage(this.targetDir, this._sessionId);`\n- `packages/cli/src/gemini.tsx:592`\n - `config.setSessionId(resumedSessionData.conversation.sessionId);`\n- `packages/cli/src/ui/hooks/useSessionBrowser.ts:71`\n - `config.setSessionId(existingSessionId);`\n- `packages/core/src/config/config.ts:1733`\n - `setSessionId(sessionId: string): void { this._sessionId = sessionId; }`\n\nBut `Storage` keeps its own captured readonly session ID:\n\n- `packages/core/src/config/storage.ts:31`\n - `private readonly sessionId: string | undefined;`\n- `packages/core/src/config/storage.ts:36`\n - `constructor(targetDir: string, sessionId?: string) { ... this.sessionId = sessionId; }`\n\nAnd the session-scoped storage paths continue to derive from that captured `Storage.sessionId`:\n\n- `packages/core/src/config/storage.ts:309`\n - `getProjectTempPlansDir()`\n- `packages/core/src/config/storage.ts:316`\n - `getProjectTempTrackerDir()`\n- `packages/core/src/config/storage.ts:343`\n - `getProjectTempTasksDir()`\n\nThe tracker service is also cached off the storage-derived tracker path:\n\n- `packages/core/src/config/config.ts:2753`\n - `getTrackerService()`\n- `packages/core/src/config/config.ts:2756`\n - `this.storage.getProjectTempTrackerDir()`\n\nAnd the prompt wiring exposes that tracker directory to the model:\n\n- `packages/core/src/prompts/promptProvider.ts:76`\n - `context.config.storage.getProjectTempTrackerDir()`\n\nSo the current behavior appears to be:\n\n1. CLI starts with fresh startup session ID `A`\n2. `Storage` is constructed using `A`\n3. user resumes existing session `B`\n4. config session ID changes to `B`\n5. storage-backed session paths can still resolve using `A`\n\nThis creates a split between the resumed conversation session and the storage-backed workflow session.\n\n## Why this matters\n\nThis is especially noticeable in workflows that rely on resume plus persistent state, for example:\n\n- resuming a session and continuing in plan mode\n- resuming a session and using the task tracker\n- resuming a session and expecting later cleanup to match the resumed session's artifacts\n\nThe bug is subtle because the resumed chat itself may look correct while plan/tracker/task state drifts into a different directory tree.\n\n## Suggested reproduction\n\nI have not included a full end-to-end runtime repro here, but the logic looks straightforward to exercise:\n\n1. start a session and create plan/tracker/task state\n2. quit the CLI\n3. start Gemini CLI again so it gets a fresh startup session ID\n4. resume the previous session via `--resume` or the session browser\n5. continue using plan mode or tracker-backed workflow features\n6. inspect `~/.gemini/tmp/<project>/...` and compare the resumed session ID versus the directories being used for plans/tracker/tasks\n\n## Expected fix direction\n\nOne of these should happen:\n\n- recreate or rebind `Storage` when `setSessionId()` is called during resume\n- make `Storage` read the current config session ID dynamically rather than capturing it only once\n- otherwise ensure all session-scoped services are refreshed after resume so they point at the resumed session namespace\n\nRight now, `Config.setSessionId()` appears to update only config state, not the already-constructed storage/session-scoped services.\n",
"number": 24639,
"title": "Resuming a session keeps plans/tracker/tasks bound to the startup session ID",
"url": "https://github.com/google-gemini/gemini-cli/issues/24639",
"analysis": "The issue is caused by a lifecycle mismatch where session-scoped components (plans, trackers, and task artifacts) are initialized using a temporary session ID generated at startup. When the resume logic executes in the SDK, it updates the conversation history but fails to propagate the resumed session ID to the already-initialized storage managers, resulting in state being split between the old (startup) and resumed session directories.",
"effort_level": "medium",
"reasoning": "The issue involves a state synchronization and lifecycle mismatch where session-scoped components (trackers, plan managers) are initialized with a temporary ID before the resume logic executes. Fixing this requires tracing the session ID propagation across the Agent and Session classes and ensuring that storage-related components are either lazily initialized or re-configured upon session resumption. This fits the 'Medium' criteria as it involves logic tracing and state synchronization across multiple SDK components.",
"validated": true
},
{
"body": "The settings box overflows on small terminal sizes\nhttps://screenshot.googleplex.com/9FhBd5XDRCPt6Hu",
"number": 24636,
"title": "Settings box overflow",
"url": "https://github.com/google-gemini/gemini-cli/issues/24636",
"analysis": "The settings box in the interactive CLI likely uses fixed dimensions or lacks responsive layout constraints, causing it to exceed the terminal boundaries when the window is small. This is typically a layout issue in the Ink-based UI components.",
"effort_level": "small",
"reasoning": "The issue is a layout adjustment within an Ink-based UI component to handle terminal resizing or small dimensions. According to the criteria, minor tweaks to structural layouts in Ink components are classified as Small effort, as they are localized fixes typically involving flexbox property adjustments (like flexShrink or maxWidth) rather than complex state management or architectural changes.",
"validated": true,
"recommended_implementation": "In the settings component (likely `Settings.tsx`), add `flexShrink={1}` and `maxWidth=\"100%\"` to the root `Box` component to ensure it respects terminal boundaries on smaller screens."
},
{
"body": "### What happened?\n\nAttempting to resolve a Node.js code problem and after pasting 18 lines of Chrome console log messages, the entire CLI crashes.\n[\n\n### What did you expect to happen?\n\nI expected it to find root cause and provide suggestions for fix. I espeically did not expect it ot compltely crash requiring CTRL-C to stop. The comand line remains active and only acts like it is processing commands.\n\n[bug-report-history-1775240186309.json](https://github.com/user-attachments/files/26469517/bug-report-history-1775240186309.json)\n\n### Client information\n\n\n* **CLI Version:** 0.36.0\n* **Git Commit:** 8b1e649c2\n* **Session ID:** 4a5bfd84-e214-4ab7-8916-77108ea688a1\n* **Operating System:** linux v24.13.0\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto-gemini-3\n* **Auth Type:** gemini-api-key\n* **Memory Usage:* 390.8 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** #300a24\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\nAPi Key\n\n### Anything else we need to know?\n\n_No response_",
"number": 24625,
"title": "CLI Hard Crash",
"url": "https://github.com/google-gemini/gemini-cli/issues/24625",
"analysis": "The crash likely occurs due to an unhandled promise rejection or a deadlock in the React/Ink rendering loop within the interactive CLI. When 18 lines are pasted, the input buffer might trigger multiple state updates or a large payload that causes the SDK session to hang or the UI to enter an inconsistent 'processing' state without a timeout or error recovery mechanism. The fact that it requires CTRL-C suggests the Node.js event loop is stuck or a promise is never resolving.",
"effort_level": "medium",
"reasoning": "The issue involves debugging state synchronization and input buffer handling within the React/Ink TUI, specifically triggered by multi-line pastes. This aligns with the Medium criteria for React/Ink state management and asynchronous flow resolution, requiring logic tracing across the CLI and SDK session components rather than deep architectural or platform-specific PTY changes.",
"validated": true
},
{
"body": "### What happened?\n\n~$ npm run build:binary\n\n~$ ./dist/linux-x64/gemini\n\nUnknown arguments: max-old-space-size, maxOldSpaceSize\nUsage: gemini [options] [command]\n\nGemini CLI - Defaults to interactive mode. Use -p/--promp\nt for non-interactive (headless) mode.\n\nCommands:\n gemini mcp Manage MCP servers\n gemini extensions <command> Manage Gemini CLI extensions. [aliases: extension]\n gemini skills <command> Manage agent skills. [aliases: skill]\n gemini hooks <command> Manage Gemini CLI hooks. [aliases: hook]\n gemini [query..] Launch Gemini CLI [default]\n\nPositionals:\n query Initial prompt. Runs in interactive mode by default; use -p/--prompt for non-intera\n ctive.\n\nOptions:\n -d, --debug Run in debug mode (open debug console with F12)\n [boolean] [default: false]\n -m, --model Model [string]\n -p, --prompt Run in non-interactive (headless) mode with the given prom\n pt. Appended to input on stdin (if any). [string]\n -i, --prompt-interactive Execute the provided prompt and continue in interactive mo\n de [string]\n -w, --worktree Start Gemini in a new git worktree. If no name is provided\n , one is generated automatically. [string]\n -s, --sandbox Run in sandbox? [boolean]\n -y, --yolo Automatically accept all actions (aka YOLO mode, see https\n ://www.youtube.com/watch?v=xvFZjo5PgG0 for more details)?\n [boolean] [default: false]\n --approval-mode Set the approval mode: default (prompt for approval), auto\n _edit (auto-approve edit tools), yolo (auto-approve all to\n ols), plan (read-only mode)\n [string] [choices: \"default\", \"auto_edit\", \"yolo\", \"plan\"]\n --policy Additional policy files or directories to load (comma-sepa\n rated or multiple --policy) [array]\n --admin-policy Additional admin policy files or directories to load (comm\n a-separated or multiple --admin-policy) [array]\n --acp Starts the agent in ACP mode [boolean]\n --experimental-acp Starts the agent in ACP mode (deprecated, use --acp instea\n d) [boolean]\n --allowed-mcp-server-names Allowed MCP server names [array]\n --allowed-tools [DEPRECATED: Use Policy Engine instead See https://geminic\n li.com/docs/core/policy-engine] Tools that are allowed to\n run without confirmation [array]\n -e, --extensions A list of extensions to use. If not provided, all extensio\n ns are used. [array]\n -l, --list-extensions List all available extensions and exit. [boolean]\n -r, --resume Resume a previous session. Use \"latest\" for most recent or\n index number (e.g. --resume 5) [string]\n --list-sessions List available sessions for the current project and exit.\n [boolean]\n --delete-session Delete a session by index number (use --list-sessions to s\n ee available sessions). [string]\n --include-directories Additional directories to include in the workspace (comma-\n separated or multiple --include-directories) [array]\n --screen-reader Enable screen reader mode for accessibility. [boolean]\n -o, --output-format The format of the CLI output.\n [string] [choices: \"text\", \"json\", \"stream-json\"]\n --raw-output Disable sanitization of model output (e.g. allow ANSI esca\n pe sequences). WARNING: This can be a security risk if the\n model output is untrusted. [boolean]\n --accept-raw-output-risk Suppress the security warning when using --raw-output.\n [boolean]\n -v, --version Show version number [boolean]\n -h, --help Show help \n\n### What did you expect to happen?\n\ngemini binary work\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n# paste output here\n```\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 24591,
"title": "[bug] SEA - Unknown arguments: max-old-space-size, maxOldSpaceSize",
"url": "https://github.com/google-gemini/gemini-cli/issues/24591",
"analysis": "The issue is caused by Node.js runtime flags (specifically --max-old-space-size) being passed into the application's process.argv when executed as a Single Executable Application (SEA). The CLI's argument parser (yargs) does not recognize these V8/Node-specific flags and throws an 'Unknown arguments' error.",
"effort_level": "small",
"reasoning": "The issue is a highly localized fix in the CLI entry point. It requires filtering Node-specific runtime flags from process.argv before they reach the yargs parser. This is a trivial logic adjustment constrained to a single file and does not involve complex architectural or platform-specific subsystems.",
"validated": true,
"recommended_implementation": "In the main entry point (e.g., src/index.ts), filter process.argv to remove any arguments matching --max-old-space-size or --maxOldSpaceSize before passing the array to the yargs parser."
},
{
"body": "### URL of the page with the issue\n\nhttp://localhost:4321/docs/reference/tools/\n\n### What is the problem?\n\nTools linked from reference/tools are not showing in the sidebar.\n\n### What did you expect to happen?\n\nTools linked from reference/tools are not showing in the sidebar.\n\n### Additional context\n\n_No response_",
"number": 24564,
"title": "GeminiCLI.com Feedback: Tools not showing on sidebar",
"url": "https://github.com/google-gemini/gemini-cli/issues/24564",
"analysis": "The issue is a missing navigation entry in the documentation sidebar for the 'Tools' reference page. The URL `http://localhost:4321/docs/reference/tools/` suggests the documentation is built using Astro (default port 4321) and that the content page itself exists, but the sidebar configuration is not pointing to it. This is a common configuration issue in documentation frameworks like Starlight or Docusaurus.",
"effort_level": "small",
"reasoning": "Updating a documentation sidebar is a trivial configuration change in Astro/Starlight. It involves adding a single entry to the sidebar array in the configuration file, which is a highly localized and low-risk task.",
"recommended_implementation": "Locate the documentation configuration file (likely `astro.config.mjs` or a dedicated `sidebar.ts` in the documentation source directory) and add an entry for 'Tools' under the 'Reference' section pointing to `reference/tools`. If the sidebar is auto-generated from package metadata, ensure `packages/sdk/GEMINI.md` or `packages/sdk/package.json` contains the necessary tags for the 'Tools' category.",
"validated": true
},
{
"body": "### What happened?\n\nDescription: \n The gemini extensions new command fails when trying to list or copy boilerplate templates because the examples directory is missing \n from the installed NPM package's bundle folder. \n \n Environment: \n - OS: Linux \n - Node.js version: v22.17.0 \n - Gemini CLI version: 0.36.0 \n - Install path: /home/hermann/.nvm/versions/node/v22.17.0/lib/node_modules/@google/gemini-cli/ \n \n Reproduction Steps: \n Run the following command in any directory: \n \n gemini extensions new my-extension mcp-server \n\nActual Behavior: \n The command fails with the following error: \n \n ENOENT: no such file or directory, scandir \n '/home/hermann/.nvm/versions/node/v22.17.0/lib/node_modules/@google/gemini-cli/bundle/examples' \n \n Technical Details: \n In bundle/gemini.js, the code defines: \n var EXAMPLES_PATH = join(__dirname2, \"examples\"); \n However, the examples directory is not included in the bundle/ directory of the published @google/gemini-cli@0.36.0 package. The \n package.json file only specifies \"files\": [\"bundle/\"], and while examples should ideally be inside bundle/, it appears to be omitted \n during the build/publish process.\n\n[bug-report-history-1775144900287.json](https://github.com/user-attachments/files/26442020/bug-report-history-1775144900287.json)\n\n### What did you expect to happen?\n\n Suggested Fix: \n Ensure the examples directory is correctly placed inside the bundle/ folder during the build process so it is included in the NPM \n package distribution.\n\n### Client information\n\n\n* **CLI Version:** 0.36.0\n* **Git Commit:** 8b1e649c2\n* **Session ID:** 8b691de9-be0d-4e04-a407-36c154334654\n* **Operating System:** linux v22.17.0\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto-gemini-3\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 386.0 MB\n* **Terminal Name:** VTE(7600)\n* **Terminal Background:** #171421\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\nGoogle Account, OAuth.\n\n### Anything else we need to know?\n\n_No response_",
"number": 24534,
"title": "gemini extensions new fails with ENOENT due to missing examples directory in NPM bundle",
"url": "https://github.com/google-gemini/gemini-cli/issues/24534",
"analysis": "The 'gemini extensions new' command fails with ENOENT because the 'examples' directory, which likely contains the boilerplate templates for new extensions, is not included in the NPM package distribution. This occurs when the 'files' field in the package.json of the relevant package (likely 'packages/cli' or 'packages/sdk') omits the directory, or the build process does not copy it to the output folder.",
"effort_level": "small",
"reasoning": "The issue is a configuration error where a directory is missing from the NPM distribution. Fixing this requires a trivial update to the 'files' array in package.json or the build script to ensure the 'examples' folder is included in the bundle. This is a highly localized fix with a clear root cause and no complex logic changes.",
"validated": true,
"recommended_implementation": "In package.json, add \"examples\" to the files array to ensure the boilerplate templates are included in the NPM distribution."
},
{
"body": "### What happened?\n\nI have been observing the same behavior happened on two different PC with 4TB SSD installed, on Ubuntu Linux.\n\nOver time, while gemini-cli agents are working, the 4TB SSD gets filled, and I couldn't find where are those files. The /home directory reported ~1TB, /tmp not much, /var not much, just could not identify where the space was consumed the most.\n\nBut, reboot the PC immediately reclaimed ~2TB SSD space back. I believe this is sort of worth being a bug. Thanks a ton. (ext4 FS cache? or tmpfs?)\n\n### What did you expect to happen?\n\ngemini-cli should free up the space or file descriptors or inodes? Otherwise, the PC eventually requires to reboot every once a while.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n# paste output here\n```\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 24488,
"title": "Take up to the whole 4TB disk space and require a reboot to reclaim",
"url": "https://github.com/google-gemini/gemini-cli/issues/24488",
"analysis": "The issue is likely caused by 'unlinked but open' files. In Linux, if a process creates a temporary file, deletes it (unlink), but keeps the file descriptor open, the disk space is not reclaimed until the process terminates. The massive scale (TBs) suggests a leak in a repetitive task, such as shell command execution outputs, tool-use temporary workspaces, or session logging. The fact that a reboot (which kills the process) reclaims the space confirms the process is holding handles to deleted files.",
"effort_level": "large",
"reasoning": "The issue involves a massive resource leak related to unlinked but open file descriptors, which is a platform-specific complexity involving child process (spawn/exec) management and POSIX signal/lifecycle handling. Identifying the leak requires a deep audit of the tool execution engine, shell integration, and session logging subsystems, which aligns with the criteria for Large effort due to the architectural complexity of managing long-running subprocesses and their associated streams.",
"validated": true
},
{
"body": "### What happened?\n\n\n\n[ACTION REQUIRED] \ud83d\udcce PLEASE ATTACH THE EXPORTED CHAT HISTORY JSON FILE TO THIS ISSUE IF YOU FEEL COMFORTABLE SHARING IT.\n\n[bug-report-history-1775073884165.json](https://github.com/user-attachments/files/26420349/bug-report-history-1775073884165.json)\n\n### What did you expect to happen?\n\nSince today, gemini cli cannot run any shell commands. Running them with e.g. !git status also results in \"File not found: \u2502\n\u2502 (Command produced no output)\"\n\nBut if I exit gemini, I can run it fine in the same pwsh session, so my path is fine.\n\n### Client information\n\n\n* **CLI Version:** 0.35.3\n* **Git Commit:** 52d103469\n* **Session ID:** d6e0c0da-7a63-4600-b3f3-4543b88b2c17\n* **Operating System:** win32 v25.2.1\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto-gemini-3\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 392.1 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** #282c34\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\nGoogle Account\n\n### Anything else we need to know?\n\nI changed nothing on my system, gemini updated itself and then broke.",
"number": 24462,
"title": "Cannot run any shell commands",
"url": "https://github.com/google-gemini/gemini-cli/issues/24462",
"analysis": "The issue involves a failure to execute shell commands (e.g., `!git status`) on Windows, resulting in a 'File not found' error. This suggests that the shell execution logic in the SDK is either not correctly inheriting the system PATH, failing to use the correct shell interpreter for Windows (cmd.exe or powershell.exe), or the sandbox environment is overly restrictive. The error message 'File not found' typically occurs when `child_process.spawn` cannot locate the executable because `shell: true` is missing or the environment variables are stripped.",
"effort_level": "large",
"reasoning": "The issue involves a fundamental failure of shell command execution specifically on the Windows platform. According to the provided criteria, platform-specific complexities involving child process (spawn/exec) management on Windows are classified as Large. This task likely requires debugging the ShellExecutionService's interaction with the Windows environment, ensuring correct shell interpreter usage (cmd vs powershell), and validating PATH resolution within the sandbox, which involves deep platform-specific troubleshooting.",
"validated": true
},
{
"body": "**Description:**\nCurrently, the `IdeClient` initialization in `packages/core/src/ide/ide-client.ts` hardcodes the `version` string to `'1.0.0'` in both HTTP and STDIO connection establishment methods. These lines are marked with `// TODO(#3487): use the CLI version here.`. This hardcoding prevents the IDE client from properly reporting its actual integration version, which could cause compatibility checking issues down the line.\n\n**Expected Behavior:**\nThe IDE client should report the actual, dynamic version of the Gemini CLI when establishing connections, resolving TODO #3487.",
"number": 24413,
"title": "fix(core): use dynamic CLI version for IDE client instead of hardcoded '1.0.0'",
"url": "https://github.com/google-gemini/gemini-cli/issues/24413",
"analysis": "The IdeClient in the core package currently uses a hardcoded version string '1.0.0' for both HTTP and STDIO connections. This needs to be updated to dynamically use the version defined in the package metadata (package.json) to ensure accurate version reporting and compatibility checks.",
"effort_level": "small",
"reasoning": "This is a highly localized fix involving the replacement of hardcoded version strings with a dynamic value. The codebase already provides a utility function (getPackageJson) to retrieve package metadata, making the implementation straightforward and limited to a single file (ide-client.ts).",
"recommended_implementation": "In packages/core/src/ide/ide-client.ts, import the version string from the package.json file (e.g., import { version } from '../../package.json'). Then, locate the HTTP and STDIO connection establishment methods and replace the hardcoded '1.0.0' strings with the imported version variable.",
"validated": true
},
{
"body": "## Summary\n`SlashCommandConflictHandler` permanently records every conflict key it has ever notified in `notifiedConflicts`, but it never expires or resets those entries when a conflict disappears and later reappears.\n\n## Evidence\nIn `packages/cli/src/services/SlashCommandConflictHandler.ts`, `notifiedConflicts` is a process-lifetime `Set<string>`. `handleConflicts(...)` skips any conflict key that has ever been seen before, even if that conflict was resolved earlier in the session.\n\n## Impact\nIf an extension, workspace command, or MCP prompt conflict is resolved and then reintroduced later, the user may never receive a second notification. The set also grows monotonically over the life of the process.\n\n## Expected behavior\nUsers should be notified again when a previously-resolved conflict reappears, and the dedupe state should track currently-active conflicts rather than every historical conflict forever.\n\n## Suggested fix\nTrack active conflict keys per flush or per current conflict state instead of using an unbounded permanent set, and add a regression test for reintroduced conflicts.\r\n",
"number": 24333,
"title": "fix(cli): reset slash-command conflict dedupe when conflicts reappear",
"url": "https://github.com/google-gemini/gemini-cli/issues/24333",
"analysis": "The SlashCommandConflictHandler in the CLI package uses a persistent Set to track notified conflicts. This prevents users from being re-notified if a conflict is resolved and subsequently reintroduced. Additionally, the Set grows indefinitely during the process lifetime, leading to a minor memory leak.",
"effort_level": "medium",
"reasoning": "The fix is localized to a single service file (SlashCommandConflictHandler.ts) but requires implementing state synchronization logic to reconcile the 'notified' set with the current active conflicts. While the previous analysis flagged this as 'Large' due to a 'memory leak', the leak is a trivial logic error in a Set of strings, not a complex architectural or platform-specific resource issue. It fits the 'Medium' criteria as it involves state management and logic tracing to ensure correct re-notification behavior.",
"validated": true
},
{
"body": "### What happened?\n\nThe gemini-cli (v1:0.35.3-1.1) package from the cachyos-extra-v3 repository terminates with a SIGSEGV immediately when started in interactive mode.\n\n\n### What did you expect to happen?\n\nThe CLI should start the interactive prompt or show debug information\n\n### Client information\n\nEnvironment:\nOS: Arch Linux / CachyOS\nKernel: (Please insert uname -r result here, e.g. 6.x.x-cachyos)\nPackage Version: 1:0.35.3-1.1 (cachyos-extra-v3)\nShell: fish\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\nThe process is terminated by signal SIGSEGV.\ngemini --help works correctly.\ngemini (interactive) crashes.\ngemini --debug crashes.",
"number": 24324,
"title": "SIGSEGV (Segmentation Fault) on startup (interactive mode)",
"url": "https://github.com/google-gemini/gemini-cli/issues/24324",
"analysis": "A SIGSEGV in a Node.js-based CLI typically indicates a crash within a native addon (C++ binding). Since `gemini --help` works (which usually only parses arguments and prints text) but `gemini --debug` and interactive mode crash, the failure likely occurs during the initialization of the SDK session or the Ink-based interactive UI. On CachyOS, this is often caused by native modules (like those for terminal handling, secure storage, or networking) being incompatible with specific CPU optimizations (x86-64-v3) or library versions (glibc) used by the distribution.",
"effort_level": "large",
"reasoning": "A SIGSEGV (Segmentation Fault) indicates a crash within a native C++ addon or the Node.js runtime itself, rather than a standard JavaScript error. Debugging this requires platform-specific investigation using tools like gdb or strace to identify the offending native library (likely related to terminal handling or secure storage). This falls under the 'Platform-Specific Complexities' category as it involves deep troubleshooting of the interaction between native modules and specific OS optimizations (CachyOS x86-64-v3).",
"validated": true
},
{
"body": "### What happened?\n\n```console\n$ gemini -v\n0.35.3\n$ gemini mcp add -t http -H \"Authorization: token redacted\" -s project test-remote https://example.com/mcp\nLoaded cached credentials.\nMCP server \"test-remote\" added to project settings. (http)\n$ gemini mcp list\nLoaded cached credentials.\nNo MCP servers configured.\n```\n\nNote that the `.gemini/settings.json` file is correctly created:\n\n```json\n{\n \"mcpServers\": {\n \"test-remote\": {\n \"url\": \"https://example.com/mcp\",\n \"type\": \"http\",\n \"headers\": {\n \"Authorization\": \"token redacted\"\n }\n }\n }\n}\n```\n\n### What did you expect to happen?\n\nGemini CLI should list the MCP server defined in the project settings.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n\u2502 CLI Version 0.35.3 \u2502\n\u2502 Git Commit 52d103469 \u2502\n\u2502 Model Auto (Gemini 2.5) \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS darwin \u2502\n\u2502 Auth Method Signed in with Google (redacted@google.com) \u2502\n\u2502 Tier Gemini Code Assist \u2502\n\u2502 GCP Project redacted \n```\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 24258,
"title": "Listing MCP servers is inconsistent and confusing for untrusted projects",
"url": "https://github.com/google-gemini/gemini-cli/issues/24258",
"analysis": "The `gemini mcp list` command likely only retrieves MCP servers from the global configuration file and ignores the project-level `.gemini/settings.json`. While `mcp add -s project` correctly writes to the local directory, the list command's logic in the CLI package does not aggregate these sources or fails to initialize the configuration loader with the current project context.",
"effort_level": "medium",
"reasoning": "The issue involves logic tracing within the CLI's command handlers to ensure that the 'mcp list' command correctly aggregates settings from the workspace scope. It also requires handling the 'untrusted project' security logic, which determines whether local settings should be loaded. This falls under the Medium criteria as it involves state synchronization between the configuration loader and the UI output, requiring careful validation of the settings resolution hierarchy.",
"validated": true
},
{
"body": "## Problem\nGemini CLI has a few Alpine Linux portability issues that impact basic CLI usage:\n- BusyBox `env` does not support `-S`, so a shebang using `env -S` fails\n- non-interactive shell execution can hit PTY handling problems on musl/Alpine\n- Linux child-process lookup currently relies on a `pgrep` form that is not BusyBox-portable\n\n## Why this matters\nThese are compatibility defects, not preference tweaks. They make baseline CLI behavior unreliable on Alpine systems.\n\n## Proposed scope\nSmall, isolated compatibility fixes in core:\n- BusyBox-safe entrypoint behavior\n- non-interactive execution path that avoids PTY where not needed\n- portable `pgrep` usage on Linux/BusyBox\n\n## Prior implementation\nI already implemented and validated this as PR #22497 (now auto-closed by bot policy after 14 days):\n- https://github.com/google-gemini/gemini-cli/pull/22497\n\n## Request\nIf this is in scope for community contribution, please mark this issue as `help wanted` and I will submit/re-submit the PR in the exact format you prefer.\n",
"number": 24198,
"title": "Alpine compatibility: BusyBox-safe entrypoint + portable non-interactive shell path",
"url": "https://github.com/google-gemini/gemini-cli/issues/24198",
"analysis": "The Gemini CLI fails on Alpine Linux due to BusyBox incompatibilities: the 'env -S' shebang flag is unsupported, PTY allocation fails on musl-based systems for non-interactive tasks, and 'pgrep' usage relies on non-portable flags. These issues prevent basic execution and process management in containerized environments.",
"effort_level": "medium",
"reasoning": "The issue involves platform-specific complexities related to Alpine Linux and BusyBox, specifically addressing PTY allocation failures on musl-based systems and non-portable pgrep usage. While the fixes are localized to shell execution logic, implementing a non-interactive execution path that bypasses PTY requires logic tracing and integration within the ShellExecutionService to ensure output streams are correctly handled, which aligns with the Medium effort criteria for service integration and platform-specific adjustments.",
"validated": true
},
{
"body": "### What is the problem?\n\nDescription\nI am following the [official documentation](https://geminicli.com/docs/get-started/authentication/#recommended-sign-in-with-google) to set up the Gemini CLI. However, when I run the gemini command in my terminal, the \"Sign in with Google\" prompt does not appear as expected. Instead, the tool seems to only support authentication via an API KEY.\n\n<img width=\"800\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/88d1e60b-2545-4977-baf4-6d2ead51ed88\" />\n\nSteps to reproduce:\n1. Install the Gemini CLI via Homebrew using: brew install gemini-cli\n2. Run the gemini command in the terminal.\n3. Observe that there is no interactive OAuth / Google Login prompt.\n\nEnvironment:\nOS: macOS 26\nCLI Version: v0.35.2\n\n### What did you expect to happen?\n\nI had expected to see a \"Sign in with Google\" option or a browser-based login process.\n\n### Additional context\n\nIs this a limitation of the current version, or is there a specific flag/configuration required to trigger the Google Account login flow",
"number": 24197,
"title": "Missing \"Sign in with Google\" option in Gemini CLI",
"url": "https://github.com/google-gemini/gemini-cli/issues/24197",
"analysis": "The Gemini CLI's interactive initialization logic in 'packages/cli/src/interactiveCli.tsx' and 'packages/cli/src/gemini.tsx' appears to only implement API Key authentication. The 'Sign in with Google' (OAuth) flow, while documented, is missing from the interactive prompt components. This requires implementing a browser-based OAuth exchange (likely using a local loopback server or device code flow) and updating the session management in 'packages/sdk/src/session.ts' to handle OAuth tokens alongside API keys.",
"effort_level": "medium",
"reasoning": "Implementing the 'Sign in with Google' flow requires integrating a new authentication service, which involves setting up a local loopback server for OAuth callbacks, managing asynchronous token exchange, and updating the Ink-based UI state. This falls under service integration and complex asynchronous flow management, typically requiring 1-3 days of development and testing.",
"recommended_implementation": null,
"validated": true
},
{
"body": "### What happened?\n\n\ud0c0\uc774\ud551 \ud55c \uae00\uc790\ub9c8\ub2e4 \ub79c\ub354\uac00 \ub418\uc5b4\uc11c \uacc4\uc18d \uc0c8 \uc904\uc774\ub72c\ub2e4.\n\n### What did you expect to happen?\n\n<img width=\"825\" height=\"653\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/72140846-44f2-4bc4-a30c-c78850c826b3\" />\n\n### Client information\n\n\n* **CLI Version:** 0.35.3\n* **Git Commit:** 52d103469\n* **Session ID:** 3b3f6824-dc93-47fc-98de-3cc12ba523b8\n* **Operating System:** darwin v24.11.1\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto-gemini-3\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 314.1 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** #ffffff\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 24181,
"title": "\ud0c0\uc774\ud551 \ud55c \uae00\uc790\ub9c8\ub2e4 \ub79c\ub354\uac00 \ub418\uc5b4\uc11c \uacc4\uc18d \uc0c8 \uc904\uc774\ub72c\ub2e4.",
"url": "https://github.com/google-gemini/gemini-cli/issues/24181",
"analysis": "The issue is a UI rendering bug in the interactive CLI where every keystroke triggers a re-render that appends a new line instead of updating the current line in place. This typically occurs in React-based terminal UIs (like Ink) when state updates are not correctly scoped or when a component's layout forces a line break on every render cycle.",
"effort_level": "medium",
"reasoning": "The issue involves debugging React/Ink state management and UI synchronization within the terminal. Specifically, it relates to how the input buffer and component layout interact during re-renders, which aligns with the Medium criteria for fixing state-related UI bugs in Ink components.",
"validated": true
},
{
"body": "**Describe the bug**\nWhen `general.sessionRetention.maxAge` is set to `\"forever\"` in `~/.gemini/settings.json`, the CLI throws repeated errors during the session cleanup process. \n\n**Error Output**\n```\n* Invalid maxAge format, skipping age-based cleanup: Invalid retention period format: forever. Expected format: <number><unit> where unit is h, d, w, or m\nFailed to cleanup subdir session-<id>: Error: Invalid retention period format: forever. Expected format: <number><unit> where unit is h, d, w, or m\n```\n\n**To Reproduce**\n1. Set `\"maxAge\": \"forever\"` in `~/.gemini/settings.json` under `general.sessionRetention`.\n2. Observe the console output during session cleanup.\n\n**Expected behavior**\nIf `\"forever\"` is a valid/legacy configuration value, it should be handled gracefully (e.g., bypassing the age-based cleanup without throwing an error). If it is invalid, the configuration validator should flag it, or the default behavior should fallback gracefully rather than printing errors for every single session directory.\n\n**Environment:**\n- OS: Linux\n- Gemini CLI Version: 0.35.3",
"number": 24178,
"title": "Bug: Session cleanup throws \"Invalid retention period format: forever\" error",
"url": "https://github.com/google-gemini/gemini-cli/issues/24178",
"analysis": "The session cleanup logic fails when 'maxAge' is set to 'forever' because the duration parser only supports numeric values with units (h, d, w, m). The parser throws an error instead of recognizing 'forever' as a directive to skip cleanup. This logic is likely triggered during CLI initialization or session management.",
"effort_level": "medium",
"reasoning": "The issue requires modifying the duration parsing logic and the session cleanup routine to handle the 'forever' keyword. This falls under the 'Parsers and Validation' category in the Medium criteria, as it involves adjusting parsing logic and potentially updating the configuration schema to allow this specific string literal while ensuring the cleanup loop correctly interprets it as a skip directive.",
"validated": true
},
{
"body": "## Bug Description\ngemini crashes immediately on startup with `spawnSync sysctl ENOENT`.\n\n## Environment\n- macOS 15.7.5 (Intel x64)\n- Node.js v25.8.2\n- gemini-cli installed via: brew install gemini-cli\n\n## Steps to Reproduce\n```bash\nbrew install gemini-cli\ngemini --version\n```\n\n## Full Error\n```\nError: spawnSync sysctl ENOENT\n at spawnSync (node:internal/child_process:1127:20)\n at systemArchitectureSync (system-architecture/index.js:39:31)\n at is64bitSync (is64bit/index.js:15:31)\n```\n\n## Root Cause\nThe system-architecture / is64bit package calls `sysctl -inq sysctl.proc_translated` but sysctl is not available in PATH on this macOS Intel setup.\n\n## Fix Suggestion\nAdd a fallback when sysctl fails, or use a different CPU arch detection method that doesn't depend on sysctl availability.",
"number": 24142,
"title": "Bug: sysctl ENOENT crash on startup (macOS Intel + Node.js v25)",
"url": "https://github.com/google-gemini/gemini-cli/issues/24142",
"analysis": "The crash is caused by a dependency (`system-architecture` or `is64bit`) attempting to execute `sysctl` via `spawnSync` without handling the case where the executable is missing from the system PATH or the environment. On macOS, `sysctl` is typically located at `/usr/sbin/sysctl`. When `spawnSync` fails to find the executable, it throws an `ENOENT` error which is not caught, leading to an immediate crash on startup.",
"effort_level": "small",
"reasoning": "The fix is a highly localized error handling adjustment. It involves wrapping a `spawnSync` call in a try-catch block or providing a fallback within the architecture detection utility to prevent the `ENOENT` crash. This fits the criteria for a small effort task as it has a clear root cause, is easily reproducible, and is constrained to 1-2 files.",
"validated": true,
"recommended_implementation": "In `system-architecture/index.js`, wrap the `spawnSync` call that executes `sysctl` in a try-catch block to handle `ENOENT` errors, returning a default value or an empty string if the command is not found in the system PATH."
},
{
"body": "### What happened?\n\n`McpClientManager.stopExtension()` removes extension-backed MCP servers from\n `allServerConfigs`, but it does not always disconnect the corresponding running\n client.\n\n The current implementation passes the MCP server name to\n `disconnectClient()`, but `disconnectClient()` expects the computed client key.\n\n As a result, the extension can appear unloaded in config state while the\n backing MCP client remains connected.\n\n### What did you expect to happen?\n\nStopping an extension should also disconnect its extension-backed MCP clients.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n CLI Version: 0.35.1\n Git Commit: 8804fb770\n Model: Auto (Gemini 3)\n Sandbox: no sandbox\n OS: darwin\n Auth Method: Signed in with Google\n Tier: Gemini Code Assist in Google One AI Pro\n```\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n This may also be related to extension reload/update inconsistencies such as\n #14527, but this report is specifically about the incorrect disconnect behavior\n in `stopExtension()`.",
"number": 24050,
"title": "McpClientManager.stopExtension does not disconnect extension-backed MCP clients",
"url": "https://github.com/google-gemini/gemini-cli/issues/24050",
"analysis": "The McpClientManager.stopExtension method incorrectly passes the MCP server name to disconnectClient, which expects a computed client key. This mismatch prevents the underlying MCP client from being properly terminated when an extension is stopped, leading to a state where the extension is removed from configuration but the process/connection remains active.",
"effort_level": "small",
"reasoning": "The issue is a highly localized parameter mismatch within a single method (McpClientManager.stopExtension). The root cause is clearly identified as passing a server name instead of a client key. Fixing this involves a simple logic adjustment to use the correct identifier, fitting the criteria for a small effort task constrained to one file with a clear fix.",
"validated": true,
"recommended_implementation": "In `McpClientManager.ts`, update the `stopExtension` method to pass the computed client key to `disconnectClient` instead of the raw server name. This can be achieved by calling `this.getClientKey(serverName)` to obtain the correct identifier used in the `allClients` map."
},
{
"body": "### What happened?\n\nThese old but standard shortcuts used to work in the CLI\n\n### What did you expect to happen?\n\nSee the Title\n\n### Client information\n\n\n* **CLI Version:** 0.35.2\n* **Git Commit:** d118cbba8\n* **Session ID:** 2384b362-a537-4297-afd5-479a90c0c181\n* **Operating System:** linux v20.20.0\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto-gemini-2.5\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 293.4 MB\n* **Terminal Name:** xterm.js(6.1.0-beta.191)\n* **Terminal Background:** #191a1b\n* **Kitty Keyboard Protocol:** Supported\n* **IDE Client:** VS Code\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\nThanks for this tool. Generally, I'm really enjoying using it. ",
"number": 24036,
"title": "For some weeks now ctrl+insert and shift+insert have no longer worked for copy/paste",
"url": "https://github.com/google-gemini/gemini-cli/issues/24036",
"analysis": "The CLI's interactive input handling is likely intercepting or failing to recognize the ANSI escape sequences for Ctrl+Insert and Shift+Insert. This regression often occurs when terminal applications enable raw mode or specific keyboard protocols (like Kitty, which is explicitly mentioned as supported in the report) without explicitly mapping these sequences to clipboard actions in the application's input loop.",
"effort_level": "medium",
"reasoning": "The issue involves handling specific ANSI escape sequences for keyboard shortcuts within an interactive CLI environment. Given that the Kitty Keyboard Protocol is active, the fix requires tracing input handling logic, potentially updating key mapping schemas, and ensuring compatibility with terminal raw mode, which aligns with the Medium criteria for ANSI sequence handling and state synchronization.",
"validated": true
},
{
"body": "**Description**\nToolOutputMaskingService.mask() is called on every conversation turn ([client.ts:625](https://github.com/google-gemini/gemini-cli/blob/main/packages/core/src/core/client.ts#L625)) when tool output masking is enabled (the default). During its backward scan of the conversation history, it JSON-serializes each functionResponse object twice:\n\n[getToolOutputContent(part)](https://github.com/google-gemini/gemini-cli/blob/main/packages/core/src/services/toolOutputMaskingService.ts#L282) calls JSON.stringify(response, null, 2) (pretty-printed) to extract the content string\n[estimateTokenCountSync([part])](https://github.com/google-gemini/gemini-cli/blob/main/packages/core/src/services/toolOutputMaskingService.ts#L123) internally calls JSON.stringify(response) (compact) in [tokenCalculation.ts:87](https://github.com/google-gemini/gemini-cli/blob/main/packages/core/src/utils/tokenCalculation.ts#L87) to estimate the token count\nThe second serialization is entirely redundant. The token estimate can be derived from the content string that was already produced in step 1.\n\n**Reproduction / benchmark**\nThe following test (using the real estimateTokenCountSync, not a mock) demonstrates the issue:\n\n\n```\n// 30 tool calls, 10KB output each \u2014 simulates a moderate coding session\nconst history = buildHistoryWithToolCalls(30, 10_000);\n\nconst originalStringify = JSON.stringify;\nlet stringifyCallCount = 0;\nlet totalCharsStringified = 0;\n\nJSON.stringify = function (...args) {\n stringifyCallCount++;\n const result = originalStringify.apply(this, args);\n totalCharsStringified += result.length;\n return result;\n};\n\nconst result = await service.mask(history, config);\n\n// Result:\n// JSON.stringify calls: 60 (exactly 2\u00d7 per tool output)\n// Total chars stringified: 0.58 MB\n// Items actually masked: 0 (all work was wasted \u2014 below threshold)\n```\nKey observation: With 30 tool outputs and a conversation below the masking threshold, all 60 stringify calls and 0.58 MB of string allocation produce zero useful work. This runs on every single turn.\n\n**Impact**\nEvery turn triggers a full backward scan of the conversation history, even when the conversation is far below the 80K-token masking threshold\nEach tool output is serialized twice (pretty-printed + compact), doubling the allocation cost\nIn a 50-turn coding session with ~100 tool calls (typical), that's ~200 redundant `JSON.stringify` calls per turn on the critical path before model invocation\nThe cost grows linearly with conversation length and compounds each turn\n\n**Suggested fix**\nReuse the content string from `getToolOutputContent()` to derive the token estimate, eliminating the second serialization:\n\n\n```\nconst toolOutputContent = this.getToolOutputContent(part);\n if (!toolOutputContent || this.isAlreadyMasked(toolOutputContent)) {\n continue;\n }\n\n-const partTokens = estimateTokenCountSync([part]);\n+const nameTokens = (part.functionResponse?.name?.length ?? 0) / 4;\n+const partTokens = Math.floor(toolOutputContent.length / 4 + nameTokens);\n```\nThis matches what `estimateFunctionResponseTokens` does internally (`JSON.stringify(response).length / 4`) but avoids the redundant serialization. The pretty-printed string from `getToolOutputContent` is slightly longer due to whitespace, but for a heuristic token estimate the difference is negligible.\n\n**Environment**\ngemini-cli version: 0.36.0-nightly\nNode.js: v24.14.0\nOS: Linux\n**Files involved**\n`packages/core/src/services/toolOutputMaskingService.ts` \u2014 lines 118\u2013123 (the scan loop)\n`packages/core/src/utils/tokenCalculation.ts` \u2014 line 87 (estimateFunctionResponseTokens)\n`packages/core/src/core/client.ts` \u2014 line 625 (call site in `processTurn`",
"number": 24028,
"title": "ToolOutputMaskingService redundantly JSON-serializes every tool response twice per turn",
"url": "https://github.com/google-gemini/gemini-cli/issues/24028",
"analysis": "The ToolOutputMaskingService.mask() method performs redundant JSON serialization of functionResponse objects. It calls getToolOutputContent, which uses JSON.stringify (pretty-printed), and then calls estimateTokenCountSync, which internally performs another JSON.stringify (compact). This happens on every conversation turn for every tool response in the history.",
"effort_level": "small",
"reasoning": "The issue is a localized performance optimization involving redundant JSON serialization. The fix requires refactoring ToolOutputMaskingService to serialize the tool response once and reuse that string for both content extraction and token estimation. This is a straightforward logic adjustment constrained to 1-2 files without complex state management or architectural changes.",
"validated": true,
"recommended_implementation": "In `toolOutputMaskingService.ts`, replace `estimateTokenCountSync([part])` with `estimateTokenCountSync([{ text: toolOutputContent }])`. This reuses the string already generated by `getToolOutputContent` and prevents `estimateTokenCountSync` from redundantly re-serializing the `functionResponse` object."
},
{
"body": "### What happened?\nWhen calling `gemini --list-sessions` (or `gemini list-sessions`), the latest session is not shown in the output. This issue was reported in a Google Chat space by multiple users: https://chat.google.com/room/AAQA_7OsfPM/E8Bn7P41uH8/E8Bn7P41uH8?cls=10\n\n### What did you expect to happen?\nThe `--list-sessions` command should include the most recent session.\n\n\n### Anything else we need to know?\nN/A\n",
"number": 24023,
"title": "Bug: `--list-sessions` does not show the latest session",
"url": "https://github.com/google-gemini/gemini-cli/issues/24023",
"analysis": "The `--list-sessions` command likely fails to include the most recent session due to a logic error in the session retrieval process. This is typically caused by an off-by-one error in a slice operation, a filter that excludes the 'current' or 'active' session, or a sorting issue where the latest file (based on modification time) is being dropped or mismanaged during the transition from the SDK to the CLI output.",
"effort_level": "small",
"reasoning": "The issue is a localized logic error in the session retrieval or display logic, likely involving a simple filter or slice adjustment in the CLI command handler. It does not involve complex state management or architectural changes, making it a straightforward fix within 1-2 files.",
"validated": true,
"recommended_implementation": "In `src/session.ts` (or the relevant session manager), locate the `listSessions` function and remove any `.slice(1)` or filter logic that excludes the most recent session from the results. Ensure the array of sessions, once sorted by modification time, is returned in its entirety to the CLI output."
},
{
"body": "### What happened?\n\nThere is an update available. I run in sadbox -- the update can't be applied.\nI run `gemini-cli -s false` -- no sandbox. \n\nGemini will not update itself -- the message is the same as if run in sandbox and no update happens\nWhen I remove `sandbox` portion from under `tools` in ` setting.json` gemini-cli updates itself. \n\n### What did you expect to happen?\n\nI expect gemini-cli updates itself when not run in sandox regardless of setting.json.\n \n\n### Client information\n\n\n* **CLI Version:** 0.35.1\n* **Git Commit:** 8804fb770\n* **Session ID:** 300f63ea-5711-4c3b-b1f8-01209c578b32\n* **Operating System:** linux v22.22.1\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto-gemini-3\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 271.2 MB\n* **Terminal Name:** tmux 3.4\n* **Terminal Background:** Unknown\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\ngoogle account\n\n### Anything else we need to know?\n\n_No response_",
"number": 24000,
"title": "gemini-cli will not udate if tool.sandbox is present in settings.json regardless of current sandboxing",
"url": "https://github.com/google-gemini/gemini-cli/issues/24000",
"analysis": "The issue occurs because the update logic likely checks the persistent configuration in `settings.json` for sandboxing status instead of the resolved runtime configuration which includes command-line overrides (like `-s false`). When `tool.sandbox` is present in the config file, the update mechanism incorrectly assumes a sandboxed environment even if the user explicitly disabled it for the current session.",
"effort_level": "small",
"reasoning": "The issue is a localized logic error where the update mechanism checks the persistent configuration file instead of the resolved runtime configuration. Fixing this involves changing the reference from the raw settings object to the merged settings object (which includes CLI overrides) in the update check logic, typically involving 1-2 files and fitting the criteria for trivial logic/config adjustments.",
"validated": true,
"recommended_implementation": "In the update check logic (likely in `src/common/update.ts`), replace the check for `settings.user.tools.sandbox` with `settings.merged.tools.sandbox`. This ensures that command-line overrides like `-s false` are correctly prioritized over the persistent configuration in `settings.json` when determining if an update can be applied."
},
{
"body": "### What happened?\n\n\u9032\u5230GEMINI CLI , \u4efb\u4f55\u547d\u4ee4\u7a81\u7136\u90fd\u52d5\u4e0d\u4e86, \u4ee5\u70ba\u662fhistory\u7684\u554f\u984c, \u6e05\u7a7a\u4e86, \u4ee5\u70ba\u662fextensions \u7684\u554f\u984c, \u5378\u8f09\u4e86, \u7d50\u679c\u9023\u500b\"\u4f60\u597d\" \u90fd\u8f49\u4e8617\u79d2\u5f04\u4e0d\u51fa\u4f86. \n\n### What did you expect to happen?\n\nRUN NOMALLY!\n\n### Client information\n\n\n* **CLI Version:** 0.35.2\n* **Git Commit:** d118cbba8\n* **Session ID:** 8a0b6557-2be2-4aaf-a45c-1375b1e12266\n* **Operating System:** win32 v25.5.0\n* **Sandbox Environment:** no sandbox\n* **Model Version:** gemini-3-flash-preview\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 339.7 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** #0c0c0c\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 23977,
"title": "GEMINI CLI \u6b7b\u6389\u4e86",
"url": "https://github.com/google-gemini/gemini-cli/issues/23977",
"analysis": "The user reports extreme latency (17+ seconds) and unresponsiveness in the CLI, even for simple prompts, after clearing history and extensions. This suggests a bottleneck in the communication layer between the CLI and the Gemini API, or a hang in the interactive UI rendering loop. The high memory usage (339.7 MB) for a CLI tool indicates potential memory leaks or inefficient state management in the React-based terminal interface. On Windows (win32), this could also be related to how the terminal handles asynchronous output streams.",
"effort_level": "large",
"reasoning": "The issue involves extreme latency (17+ seconds), high memory usage (339.7 MB), and unresponsiveness on a specific platform (Windows). According to the criteria, diagnosing and fixing memory leaks, performance bottlenecks, and platform-specific terminal/PTY issues falls under the Large effort category as it requires deep architectural investigation and profiling of the interactive CLI loop and async flow.",
"validated": true
},
{
"body": "### What happened?\n\nGemini CLI does not start its ACP server when a sandbox is enabled and stdin is not a TTY.\n\n### What did you expect to happen?\n\nI expected Gemini CLI to start its ACP server.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nGemini CLI version `0.35.0`\n\nSucceeds with `tools.sandbox = false`\nFails with `tools.sandbox = \"sandbox-exec\"`\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\nThanks to an investigation by @loadingalias in [zed-industries/zed PR #52455](https://github.com/zed-industries/zed/pull/52455), the following was uncovered:\n> This is an upstream issue in the Gemini CLI startup. When sandboxing is enabled and stdin is not a TTY, Gemini reads stdin before entering ACP mode. In ACP mode stdin is the protocol transport, so that waits for EOF forever and Gemini never starts its ACP server.\n\nThis is preventing Gemini CLI from being used with ACP-supporting IDEs like Zed when Gemini's sandbox is enabled. See [zed-industries/zed issue #51333](https://github.com/zed-industries/zed/issues/51333) for the original reported issue",
"number": 23959,
"title": "ACP server does not start when sandboxing is enabled and stdin is not a TTY",
"url": "https://github.com/google-gemini/gemini-cli/issues/23959",
"analysis": "The Gemini CLI hangs during startup when sandboxing is enabled because it attempts to read from stdin before the ACP (Agent Communication Protocol) server is initialized. Since ACP uses stdin as its communication transport, this early read blocks indefinitely waiting for an EOF. This occurs specifically when stdin is not a TTY (e.g., when piped from an IDE like Zed) and sandboxing logic (likely for configuration or permission checks) is triggered.",
"effort_level": "large",
"reasoning": "The issue involves a hang in the Agent Communication Protocol (ACP) server initialization specifically when sandboxing is enabled. This requires debugging the interaction between platform-specific sandboxing mechanisms (sandbox-exec) and the stdin-based protocol transport. Since it affects the core protocol startup and involves platform-specific process/stream handling in non-interactive environments, it aligns with the criteria for architectural/protocol changes and platform-specific complexities.",
"validated": true
},
{
"body": "### What happened?\n\nWhen starting gemini with any --model it throws a type error.\n\n```\n\u2502 \u2139 Detected terminal background color: #000000 \u2502\n\u2502 \u2502\n\u2502 \u2139 Detected terminal name: tmux 3.6a \u2502\n\u2502 \u2502\n\u2502 \u2139 Authenticated via \"gemini-api-key\". \u2502\n\u2502 \u2716 ========================================= \u2502\n\u2502 This is an unexpected error. Please file a bug report using the /bug tool. \u2502\n\u2502 CRITICAL: Unhandled Promise Rejection! \u2502\n\u2502 ========================================= \u2502\n\u2502 Reason: TypeError: resolved.startsWith is not a function \u2502\n\u2502 Stack trace: \u2502\n\u2502 TypeError: resolved.startsWith is not a function \u2502\n\u2502 at isCustomModel \u2502\n\u2502 (file:///home/kamil/.node_modules/lib/node_modules/@google/gemini-cli/node_modules/@google/gemini-cli-core/dist/src/config/models.js \u2502\n\u2502 :216:22) \u2502\n\u2502 at supportsModernFeatures \u2502\n\u2502 (file:///home/kamil/.node_modules/lib/node_modules/@google/gemini-cli/node_modules/@google/gemini-cli-core/dist/src/config/models.js \u2502\n\u2502 :228:12) \u2502\n\u2502 at CodebaseInvestigatorAgent \u2502\n\u2502 (file:///home/kamil/.node_modules/lib/node_modules/@google/gemini-cli/node_modules/@google/gemini-cli-core/dist/src/agents/codebase- \u2502\n\u2502 investigator.js:33:19) \u2502\n\u2502 at AgentRegistry.loadBuiltInAgents \u2502\n\u2502 (file:///home/kamil/.node_modules/lib/node_modules/@google/gemini-cli/node_modules/@google/gemini-cli-core/dist/src/agents/registry. \u2502\n\u2502 js:180:31) \u2502\n\u2502 at AgentRegistry.loadAgents \u2502\n\u2502 (file:///home/kamil/.node_modules/lib/node_modules/@google/gemini-cli/node_modules/@google/gemini-cli-core/dist/src/agents/registry. \u2502\n\u2502 js:91:14) \u2502\n\u2502 at AgentRegistry.initialize \u2502\n\u2502 (file:///home/kamil/.node_modules/lib/node_modules/@google/gemini-cli/node_modules/@google/gemini-cli-core/dist/src/agents/registry. \u2502\n\u2502 js:46:20) \u2502\n\u2502 at Config._initialize \u2502\n\u2502 (file:///home/kamil/.node_modules/lib/node_modules/@google/gemini-cli/node_modules/@google/gemini-cli-core/dist/src/config/config.js \u2502\n\u2502 :670:34) \u2502\n\u2502 at async file:///home/kamil/.node_modules/lib/node_modules/@google/gemini-cli/dist/src/ui/AppContainer.js:254:17 \n```\n\n### What did you expect to happen?\n\nI expected no exception.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n > /about\n\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\n\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 \u2502\n\u2502 About Gemini CLI \u2502\n\u2502 \u2502\n\u2502 CLI Version 0.35.1 \u2502\n\u2502 Git Commit 8804fb770 \u2502\n\u2502 Model gemini-2.0-flash-lite \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS linux \u2502\n\u2502 Auth Method gemini-api-key \u2502\n\u2502 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\n\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 23934,
"title": "bug: \"Reason: TypeError: resolved.startsWith is not a function\"",
"url": "https://github.com/google-gemini/gemini-cli/issues/23934",
"analysis": "The error `TypeError: resolved.startsWith is not a function` indicates that a variable named `resolved` is expected to be a string but is actually an object, undefined, or null at runtime. This typically occurs during model name resolution or path handling when the CLI processes the `--model` flag. The code likely attempts to check if a model identifier starts with a specific prefix (e.g., 'models/') without verifying the type of the resolved value.",
"effort_level": "small",
"reasoning": "The error 'resolved.startsWith is not a function' is a classic type mismatch occurring during model name resolution. This is a highly localized fix requiring a simple type check or ensuring the resolver returns a string, fitting the criteria for a small effort task constrained to 1-2 files.",
"validated": true,
"recommended_implementation": "In the model resolution logic, ensure the `resolved` variable is cast to a string using `String(resolved)` or verify its type before calling `.startsWith()` to handle cases where the resolver might return an object or undefined."
},
{
"body": "### What happened?\n\nWhen initializing the Gemini CLI, the update flow creates a highly confusing user experience on Windows. The process spawns a completely separate, secondary terminal window that only displays a loading spinner with no context. Meanwhile, the primary terminal appears to be finished and ready for inference.\n\nBecause the secondary terminal provides no instructions it looks like a hung background process. Closing this secondary terminal silently aborts the setup/auth process, completely breaking the CLI and making it appear as though it uninstalled itself.\n\nSteps to Reproduce:\n\nRun the Gemini CLI startup command on Windows.\n\nObserve that a secondary terminal window automatically opens, displaying only a loading spinner.\n\nObserve that the primary terminal appears ready for input.\n\nClose the secondary (spinner) terminal.\n\nAttempt to use the CLI in the primary terminal.\n\nActual Behavior:\nClosing the unexplained secondary terminal kills the setup script mid-execution, leaving the CLI in a broken, unusable state without throwing a clear error to the user in the primary terminal.\n\n### What did you expect to happen?\n\nAll setup, configuration, and authentication should be handled within the primary terminal context. If an OAuth browser window needs to be triggered, the primary terminal should display a clear message (e.g., \"Opening browser for authentication...\"). It should not spawn ambiguous secondary terminal windows that break the application when closed.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n# paste output here\n```\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 23926,
"title": "Confusing Windows Auth/Setup UX spawns secondary terminal, closing it breaks installation",
"url": "https://github.com/google-gemini/gemini-cli/issues/23926",
"analysis": "The issue is caused by the Windows-specific execution of setup or authentication sub-processes (likely via child_process.spawn) using configurations that trigger a new console window (e.g., detached: true or shell: true without stdio inheritance). This disconnects the UI from the main terminal, leading to a 'hung' appearance in the secondary window and allowing the user to break the installation by closing it, as the primary process does not wait or handle the lifecycle of the secondary window correctly.",
"effort_level": "large",
"reasoning": "The issue involves platform-specific child process management and terminal behavior on Windows, specifically regarding how sub-processes are spawned and their interaction with the parent TTY. This falls under 'Platform-Specific Complexities' as it requires handling Windows-specific shell execution and ensuring UI synchronization across different terminal environments (CMD, PowerShell, Windows Terminal) to prevent secondary window spawning.",
"validated": true
},
{
"body": "### What happened?\n\nStandard block characters (\u2580/\u2584) used in `HalfLinePaddedBox` do not align perfectly or have visible gaps in macOS Terminal.app (Apple Terminal). This results in an inaccurate \"half-line\" padding effect where the background color doesn't appear as a solid block.\n\n### What did you expect to happen?\n\nThe background of the `HalfLinePaddedBox` should be rendered seamlessly across lines with consistent padding, providing a solid block effect even on Apple Terminal.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nPlatform: macOS (Terminal.app)\nVersion: 0.36.0-nightly.20260317\n\n</details>\n\n### Login information\n\nN/A (UI rendering issue)\n\n### Anything else we need to know?\n\nThis issue is being addressed in PR #23918. The fix involves using '\u2585' (Lower five eighths block) for top padding and '\u2584' (Lower half block) for bottom padding specifically for Apple Terminal.\n",
"number": 23919,
"title": "fix(cli): improve HalfLinePaddedBox rendering for Apple Terminal",
"url": "https://github.com/google-gemini/gemini-cli/issues/23919",
"analysis": "The rendering issue in Apple Terminal is caused by font-specific spacing gaps when using standard half-block characters (\u2580/\u2584). The fix involves detecting the terminal environment via the TERM_PROGRAM environment variable and using alternative block characters ('\u2585' for top, '\u2584' for bottom) to achieve a seamless visual effect in that specific terminal emulator.",
"effort_level": "small",
"reasoning": "The fix is a highly localized UI adjustment within a single component. It involves a simple environment variable check (TERM_PROGRAM) and conditional string selection for block characters. This falls under the 'UI/Aesthetic Adjustments' and 'Trivial Logic' categories for Small effort, as it does not require complex state management, async flows, or deep architectural changes.",
"validated": true,
"recommended_implementation": "In the `HalfLinePaddedBox` component, detect Apple Terminal by checking if `process.env.TERM_PROGRAM` equals 'Apple_Terminal'. When true, use '\u2585' (Lower five eighths block) for top padding and '\u2584' (Lower half block) for bottom padding to eliminate rendering gaps."
},
{
"body": "### What happened?\n\nThe `GitIgnoreParser` and `IgnoreFileParser` classes do not correctly handle different line endings (LF `\\n`, CRLF `\\r\\n`, CR `\\r`) in ignore files like .gitignore and .geminiignore. This can lead to incorrect pattern parsing, especially on Windows.\n\n### What did you expect to happen?\n\nIgnore files with any line endings are parsed correctly, ignoring line ending differences.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n\u2502 About Gemini CLI \u2502\n\u2502 \u2502\n\u2502 CLI Version 0.35.1 \u2502\n\u2502 Git Commit 8804fb770 \u2502\n\u2502 Model Auto (Gemini 3) \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS win32 \u2502\n\u2502 Auth Method Signed in with Google (@gmail.com) \u2502\n\u2502 Tier Gemini Code Assist in Google One AI Pro \n```\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 23891,
"title": "Incorrect handling of line endings in ignore file parsers",
"url": "https://github.com/google-gemini/gemini-cli/issues/23891",
"analysis": "The GitIgnoreParser and IgnoreFileParser classes likely use a simple string split method (e.g., .split('\\n')) which fails to account for carriage returns (\\r) found in CRLF (Windows) or legacy CR line endings. This results in trailing \\r characters being included in the parsed patterns, causing glob matching to fail.",
"effort_level": "small",
"reasoning": "The issue involves a localized fix in the string-splitting logic of the ignore file parsers to correctly handle CRLF and CR line endings. This is a standard string manipulation task that typically affects 1-2 files and does not involve deep platform-specific architectural complexities like PTY or child process management, making it a Small effort task.",
"validated": true,
"recommended_implementation": "In GitIgnoreParser.ts and IgnoreFileParser.ts, replace the line splitting logic .split('\\n') with .split(/\\r?\\n|\\r/). This ensures that CRLF and CR line endings are correctly handled, preventing trailing carriage returns from being included in the parsed patterns."
},
{
"body": "### What happened?\n\nGemini CLI crashes when running a command inside a Strapi plugin workspace.\n\nAfter executing a command, the debug console shows a stack trace related to path resolution and permission checking.\n\nError Stack:\n\nat robustRealpath \nat resolveToRealPath \nat checkPermissions \nat atCommandProcessor.js \nat AppContainer.js \nat InputPrompt.js \n\nThis happens when running Gemini CLI inside:\n\n~/eksaq/cms/strapicms/src/plugins/image-generation-plugin\n\nThe CLI stops working and shows debug console instead of processing the command.\n\n### What did you expect to happen?\n\nGemini CLI should process the command normally without crashing and without showing debug console errors.\n\n### Client information\n\n\n* **CLI Version:** 0.35.1\n* **Git Commit:** 8804fb770\n* **Session ID:** 6e364b44-31b1-4921-af4d-f4115062f0e3\n* **Operating System:** darwin v22.16.0\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto-gemini-3\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 233.2 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** #1e1e1e\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\nLogged in using Google Account (OAuth personal)\n\n### Anything else we need to know?\n\nEnvironment:\n\nNode Version: v22.16.0 \nmacOS: darwin \nGemini CLI Version: 0.35.1 \n\nThis issue happens consistently inside Strapi plugin workspace.\n\nThis may be related to Node v22 compatibility or workspace path resolution.",
"number": 23867,
"title": "Gemini CLI crashes during path permission check when running command in Strapi plugin",
"url": "https://github.com/google-gemini/gemini-cli/issues/23867",
"analysis": "The crash occurs during path resolution and permission checking, specifically within a 'robustRealpath' function. This is likely triggered by complex directory structures or symlinks common in Strapi plugin environments. The stack trace points to logic that attempts to resolve absolute paths to verify access permissions before processing commands. The failure suggests that `fs.realpathSync` or a similar call is throwing an unhandled exception when encountering specific filesystem configurations (e.g., broken symlinks or restricted parent directories).",
"effort_level": "medium",
"reasoning": "The crash occurs during path resolution and permission checking, specifically within the 'resolveToRealPath' utility called by 'atCommandProcessor.js'. Fixing this requires adding robust error handling to the filesystem logic to handle edge cases like broken symlinks or restricted directories common in complex environments like Strapi. This falls under the 'standard filesystem/path resolution bugs' category for Medium effort, as it requires careful validation across different directory structures.",
"validated": true
},
{
"body": "### What happened?\n\nPedi uma varredura nas pastas do projeto e sincroniza\u00e7\u00e3o, deu tela preta.\n\n### What did you expect to happen?\n\nEra apenas para visualizar se o que tinha no github estava de acordo com as pastas locais\n\n### Client information\n\n\n* **CLI Version:** 0.35.0\n* **Git Commit:** 9804bd696\n* **Session ID:** 3b7350f4-fc7c-4107-8712-fb9dd36e52a5\n* **Operating System:** win32 v24.14.0\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto-gemini-3\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 285.4 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** #0c0c0c\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\nconta google\n\n### Anything else we need to know?\n\n_No response_",
"number": 23806,
"title": "Tela preta",
"url": "https://github.com/google-gemini/gemini-cli/issues/23806",
"analysis": "The 'black screen' (tela preta) reported in the CLI suggests a crash or hang in the React/Ink rendering loop. This typically occurs when a heavy operation, such as the requested project folder scan and synchronization, blocks the Node.js event loop or throws an unhandled exception that the UI layer cannot recover from. On Windows (win32), this is often triggered by long file paths, permission issues, or memory exhaustion when processing large directory trees.",
"effort_level": "large",
"reasoning": "The 'black screen' indicates a total hang or crash of the React/Ink rendering loop, likely caused by the event loop being blocked during a recursive file system scan or a flood of state updates. Resolving this on Windows requires addressing platform-specific I/O bottlenecks, implementing throttled state synchronization, and potentially moving heavy scanning logic to a worker thread to maintain UI responsiveness, which falls under performance and platform-specific architectural complexities.",
"validated": true
},
{
"body": "### What happened?\n\nproje i\u00e7ine yeni bir dosya ekleyince @ i\u015fareti ile se\u00e7emiyorum \u00f6nceden se\u00e7ebiliyordum\n\n[ACTION REQUIRED] \ud83d\udcce PLEASE ATTACH THE EXPORTED CHAT HISTORY JSON FILE TO THIS ISSUE IF YOU FEEL COMFORTABLE SHARING IT.\n\n### What did you expect to happen?\n\n@ i\u015fareti ile dosya listesinde yeni dosyalar\u0131nda \u00e7\u0131kmas\u0131 gerekiyour\n\n### Client information\n\n\n* **CLI Version:** 0.34.0\n* **Git Commit:** 49a86550c\n* **Session ID:** 93f2f067-80e0-4884-8702-62e02d3da266\n* **Operating System:** win32 v25.6.0\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto-gemini-3\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 510.5 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** Unknown\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 23650,
"title": "proje i\u00e7ine yeni bir dosya ekleyince @ i\u015fareti ile se\u00e7emiyorum \u00f6nceden se\u00e7ebiliyordum",
"url": "https://github.com/google-gemini/gemini-cli/issues/23650",
"analysis": "The issue is caused by the file autocomplete list in the interactive CLI not being updated when new files are added to the workspace. The system likely performs an initial scan at startup but lacks a reactive file watcher or fails to trigger a state update in the UI component when the file system changes. This is a regression as the user mentions it worked previously.",
"effort_level": "medium",
"reasoning": "The issue involves state synchronization between the file system and the interactive CLI UI (Ink). Fixing this requires investigating the file-watching logic and ensuring that the React state responsible for the '@' mention list is correctly updated when new files are added. This falls under 'React/Ink State Management' and 'Asynchronous Flow' in the Medium category, as it requires logic tracing and state validation rather than deep architectural or platform-specific PTY changes.",
"validated": true
},
{
"body": "### What happened?\n\nIt seems that the Undo function has been moved to Super+Z from Ctrl+Z. But on Windows this opens up the Snap Layouts menu. This means Undo action is not impossible on Windows\n\n### What did you expect to happen?\n\nI expected to be able to Undo an action, like typing or pasting. \n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 \u2502\n\u2502 About Gemini CLI \u2502\n\u2502 \u2502\n\u2502 CLI Version 0.34.0 \u2502\n\u2502 Git Commit 49a86550c \u2502\n\u2502 Model Auto (Gemini 3) \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS linux \u2502\n\u2502 Auth Method Signed in with Google (abhinashjrt22@gmail.com) \u2502\n\u2502 Tier Gemini Code Assist in Google One AI Pro \u2502\n\u2502 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n```\n\n</details>\n\n### Login information\n\nGoogle Account\n\n### Anything else we need to know?\n\nI am on a Windows Machine running WSL-Ubuntu.\n\n<img width=\"1614\" height=\"755\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/61a51735-4e10-487c-9af2-f11a482232ef\" />",
"number": 23648,
"title": "Undo function not working",
"url": "https://github.com/google-gemini/gemini-cli/issues/23648",
"analysis": "The Undo keyboard shortcut was changed to use the 'Super' (Meta/Windows) key, which conflicts with the Windows Snap Layouts system shortcut (Win+Z). This prevents the CLI from capturing the input. The fix involves reverting the shortcut to 'Ctrl+Z' or providing platform-specific keybindings within the interactive CLI component.",
"effort_level": "small",
"reasoning": "This is a localized fix involving a keyboard shortcut mapping. It requires changing a key-event listener or configuration value from 'Super+Z' to 'Ctrl+Z' or adding a platform check. It does not involve deep terminal/PTY complexities or architectural changes, fitting the criteria for a trivial logic/config adjustment.",
"validated": true,
"recommended_implementation": "In the keybinding handler for the interactive CLI, change the shortcut mapping for the undo action from 'meta+z' (or 'super+z') back to 'ctrl+z' to avoid conflicts with the Windows Snap Layouts system shortcut."
},
{
"body": "### URL of the page with the issue\n\nhttps://geminicli.com/\n\n### What is the problem?\n\n Bug Report\n\n Subject: Gemini CLI Crashes Frequently in YOLO Mode with .js Files; File I/O Tools Unreliable\n\n Environment:\n * Operating System: Windows 11\n * Gemini CLI Version: 0.34 (Reported as latest)\n\n Issue Description:\n The Gemini CLI is experiencing critical and frequent crashes, particularly when operating in autonomous (\"YOLO\") mode and interacting with JavaScript\n (.js) files. These crashes result in a trace being displayed and a return to the console, rendering the CLI unusable for extended periods.\n\n Furthermore, file manipulation capabilities appear to be compromised. The user reports that even using the write_file tool, which involves reading file\n content into memory and then writing it back, is not functioning correctly.\n\n Observed Symptoms & Potential Triggers:\n * Crashes: Occur frequently in YOLO mode when .js files are involved.\n * File Editing: General file editing is not possible. The write_file tool, specifically, is reported as failing or not behaving as expected.\n * User Action: User is unable to provide specific commands leading to the crash or exact write_file usage that is failing, stating they \"don't know\n anymore.\"\n\n Impact:\n The CLI is largely unusable due to frequent crashes and unreliable file manipulation, preventing development tasks.\n\n Additional Context:\n The user is operating on Windows 11. Due to the disruptive nature of the crashes, precise error messages, specific command sequences, or detailed steps\n for reproducing the write_file failures could not be obtained.\n\n### What did you expect to happen?\n\n Bug Report\n\n Subject: Gemini CLI Crashes Frequently in YOLO Mode with .js Files; File I/O Tools Unreliable\n\n Environment:\n * Operating System: Windows 11\n * Gemini CLI Version: 0.34 (Reported as latest)\n\n Issue Description:\n The Gemini CLI is experiencing critical and frequent crashes, particularly when operating in autonomous (\"YOLO\") mode and interacting with JavaScript\n (.js) files. These crashes result in a trace being displayed and a return to the console, rendering the CLI unusable for extended periods.\n\n Furthermore, file manipulation capabilities appear to be compromised. The user reports that even using the write_file tool, which involves reading file\n content into memory and then writing it back, is not functioning correctly.\n\n Observed Symptoms & Potential Triggers:\n * Crashes: Occur frequently in YOLO mode when .js files are involved.\n * File Editing: General file editing is not possible. The write_file tool, specifically, is reported as failing or not behaving as expected.\n * User Action: User is unable to provide specific commands leading to the crash or exact write_file usage that is failing, stating they \"don't know\n anymore.\"\n\n Impact:\n The CLI is largely unusable due to frequent crashes and unreliable file manipulation, preventing development tasks.\n\n Additional Context:\n The user is operating on Windows 11. Due to the disruptive nature of the crashes, precise error messages, specific command sequences, or detailed steps\n for reproducing the write_file failures could not be obtained.\n\n### Additional context\n\n_No response_",
"number": 23643,
"title": "Bug Report Subject: Gemini CLI Crashes Frequently in YOLO Mode with .js Files; File I/O Tools Unreliable",
"url": "https://github.com/google-gemini/gemini-cli/issues/23643",
"analysis": "YOLO mode performs rapid sequential tool calls. On Windows, `fs.writeFile` in `StandardFileSystemService` (packages/core/src/services/fileSystemService.ts) frequently fails due to file locks from IDE watchers or indexing services that trigger on the first write.",
"effort_level": "medium",
"reasoning": "Implementing a retry-with-backoff mechanism for file I/O to handle Windows-specific file locking issues involves modifying asynchronous control flow within a core service. While it addresses a platform-specific behavior, the fix is localized to the FileSystemService and falls under standard async flow management and robust error handling rather than deep architectural or PTY-level complexity.",
"validated": true
},
{
"body": "### What happened?\n\nEnvironment: \n* OS: Windows (win32) \n* Gemini CLI Version: 0.34.0 \nDescription: \nStarting with version 0.34.0, using tab autocomplete for subcommands results in the main command name being duplicated instead of the subcommand being inserted. This happens with multiple commands that have subcommands. \nSteps to Reproduce: \n1. Type /ch in the CLI. \n2. Press Tab to autocomplete. The input correctly becomes /chat . \n3. Type r (intending to autocomplete the resume subcommand). \n4. Press Tab. \nExpected Behavior: \nThe autocomplete should complete the subcommand, resulting in /chat resume. \nActual Behavior: \nThe autocomplete duplicates the main command, resulting in /chat chat. \nAdditional Context: \nThis issue is not limited to /chat resume. It also happens with other commands and their subcommands, for example resulting in /save save instead of the expected subcommand. \n\n\n[ACTION REQUIRED] \ud83d\udcce PLEASE ATTACH THE EXPORTED CHAT HISTORY JSON FILE TO THIS ISSUE IF YOU FEEL COMFORTABLE SHARING IT.\n\n### What did you expect to happen?\n\n/chat resume\n\n### Client information\n\n\n* **CLI Version:** 0.34.0\n* **Git Commit:** 49a86550c\n* **Session ID:** 964a2664-37c3-44d2-bbc8-324ca03052c2\n* **Operating System:** win32 v25.8.1\n* **Sandbox Environment:** no sandbox\n* **Model Version:** gemini-3.1-pro-preview\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 313.1 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** #0c0c0c\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\nOauth web\n\n### Anything else we need to know?\n\n_No response_",
"number": 23541,
"title": "Autocomplete for subcommands duplicates the main command name",
"url": "https://github.com/google-gemini/gemini-cli/issues/23541",
"analysis": "Autocomplete for subcommands (e.g. `/directory `) incorrectly prepends the main command name again, resulting in strings like `/directory /directory list`. This is caused by the completion logic in `useCommandCompletion.tsx` not correctly identifying that the command prefix is already present in the input buffer.",
"effort_level": "medium",
"reasoning": "The issue involves logic tracing and state synchronization within the CLI's input buffer, specifically how the completion 'delta' is calculated and applied to the existing string. While the previous analysis flagged this as 'Large' due to the 'Windows' keyword, the criteria for 'Large' require deep terminal/PTY or POSIX signal complexities. This bug is a logic error in string manipulation and React/Ink state management (input buffers), which fits the 'Medium' criteria.",
"validated": true
},
{
"body": "### What happened?\n\n\"\ud604\uc7ac \ud658\uacbd \ubb38\uc81c\ub85c write_file / replace\uac00 \ubaa8\ub450 \uc2e4\ud328\ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4. PowerShell\uacfc .NET \uba54\uc11c\ub4dc\uac00 \uc131\uacf5\uc744 \ubc18\ud658\ud558\uc9c0\ub9cc \uc2e4\uc81c \ud30c\uc77c\uc774 \ubcc0\uacbd\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. \ucd5c\uc2e0 \ubc84\uc804 + \uc0cc\ub4dc\ubc15\uc2a4 off + \uad00\ub9ac\uc790 \uad8c\ud55c\uc73c\ub85c\ub3c4 \uc548 \ub429\ub2c8\ub2e4.\"\n\n### What did you expect to happen?\n\n\uc218\uc815 \ubc14\ub78d\ub2c8\ub2e4.\n\n### Client information\n\n\n* **CLI Version:** 0.34.0\n* **Git Commit:** 49a86550c\n* **Session ID:** 747ae2a9-4e02-4d20-8275-d1c1ddfcba33\n* **Operating System:** win32 v24.12.0\n* **Sandbox Environment:** no sandbox\n* **Model Version:** gemini-2.5-flash\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 488.0 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** #0c0c0c\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 23528,
"title": "\"\ud604\uc7ac \ud658\uacbd \ubb38\uc81c\ub85c write_file / replace\uac00 \ubaa8\ub450 \uc2e4\ud328\ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4. PowerShell\uacfc .NET \uba54\uc11c\ub4dc\uac00 \uc131\uacf5\uc744 \ubc18\ud658\ud558\uc9c0\ub9cc \uc2e4\uc81c \ud30c\uc77c\uc774 \ubcc0\uacbd\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. \ucd5c\uc2e0 \ubc84\uc804 + \uc0cc\ub4dc\ubc15\uc2a4 off + \uad00\ub9ac\uc790 \uad8c\ud55c\uc73c\ub85c\ub3c4 \uc548 \ub429\ub2c8\ub2e4.\"",
"url": "https://github.com/google-gemini/gemini-cli/issues/23528",
"analysis": "A variant of the file lock issue where the Node.js `fs` layer fails while native tools might succeed. It can also be caused by path normalization issues in `packages/core/src/tools/write-file.ts` where `getTargetDir()` doesn't align with the environment's path expectations.",
"effort_level": "large",
"reasoning": "The issue involves silent file write failures on Windows where the system reports success but no changes occur. This indicates deep platform-specific complexities such as Windows File Virtualization (UAC), path normalization discrepancies between Node.js and the OS, or complex file locking mechanisms. Debugging and fixing this requires extensive validation across different Windows environments and potentially modifying the core filesystem service layer.",
"validated": true
},
{
"body": "## Description\nWhen using Gemini CLI via ACP protocol (spawned by Alma app), the `run_shell_command` tool consistently fails to return results, causing the AI SDK to throw `AI_MissingToolResultsError`.\n\n## Steps to Reproduce\n1. Run Gemini CLI with ACP flags: `gemini --acp --experimental-acp`\n2. Ask for a shell command execution (e.g., 'run `ls` command')\n3. Observe the error\n\n## Expected Behavior\nThe `run_shell_command` tool should execute successfully and return results to the ACP client.\n\n## Actual Behavior\n- `run_shell_command` tool call is initiated but never returns a result\n- ACP client receives no tool result\n- Error: `AI_MissingToolResultsError: Tool results are missing for tool calls run_shell_command-xxx`\n\n## Environment\n- Gemini CLI version: 0.34.0\n- macOS Sonnet\n- ACP Client: Alma v0.0.723\n- Flags used: `--acp --experimental-acp`\n\n## Additional Context\nThis appears to be related to existing issues #14561 and #5382. The issue is that in ACP/non-interactive mode, the `run_shell_command` tool cannot render user confirmation prompts and fails silently without returning a result to the ACP stream.\n\n## Suggested Fix\n- Handle ACP/non-interactive mode for `run_shell_command` tool\n- Either auto-approve commands in ACP mode or return an error result instead of hanging indefinitely\n- Ensure tool results are always returned to the ACP stream, even on failure",
"number": 23507,
"title": "Gemini CLI run_shell_command tool fails in ACP mode, missing tool results",
"url": "https://github.com/google-gemini/gemini-cli/issues/23507",
"analysis": "In ACP mode (non-interactive), the shell tool (packages/core/src/tools/shell.ts) attempts to solicit user confirmation. Since no TTY is available, the request hangs or fails to return a result to the ACP stream.",
"effort_level": "medium",
"reasoning": "The issue involves resolving an asynchronous flow hang where the shell tool waits for user confirmation in a non-interactive ACP environment. This requires logic tracing across the tool invocation, the confirmation message bus, and the ACP protocol handler to ensure the tool execution either auto-fails or bypasses confirmation when no TTY is available. It fits the Medium criteria of state synchronization and service integration logic.",
"validated": true
},
{
"body": "### What happened?\n\nWhen the DevTools feature is enabled (`general.devtools: true` in settings), the update check (and potentially other HTTP requests) fails because the `ActivityLogger.patchGlobalFetch()` interceptor strips headers from `Request` objects.\n\nThe `patchGlobalFetch` method in `packages/cli/src/utils/activityLogger.ts` replaces `global.fetch` with an interceptor. The interceptor reconstructs headers from `init?.headers`, but when the caller passes headers inside a `Request` object (the first argument) rather than in the `init` parameter, those headers are lost:\n\n```typescript\n// activityLogger.ts, patchGlobalFetch()\nglobal.fetch = async (input: RequestInfo | URL, init?: RequestInit) => {\n // ...\n const newInit = { ...init };\n const headers = new Headers(init?.headers || {}); // \u2190 Bug: ignores input.headers\n headers.set(ACTIVITY_ID_HEADER, id);\n newInit.headers = headers;\n // ...\n const response = await originalFetch(input, newInit); // \u2190 headers from Request object are overridden\n};\n```\n\nThe `ky` HTTP library (used by `package-json` \u2192 `latest-version` \u2192 `checkForUpdates`) calls `fetch(requestObject, {})`, placing `Authorization` and `Accept` headers on the `Request` object. The interceptor creates `new Headers({})`, adds only the activity ID header, and passes that as `newInit.headers` \u2014 which overrides the `Request` object's headers when `originalFetch` is called.\n\nThis causes the update check to fail with a 403 when the npm registry requires authentication (e.g., private registries configured via `.npmrc`). It could also silently affect any other code path that uses `globalThis.fetch` with a `Request` object while devtools is enabled.\n\n### Reproduction steps\n\n1. Configure a private npm registry that requires authentication in `~/.npmrc`\n2. Publish a package to that registry (or use any authenticated registry)\n3. Enable devtools: set `\"general\": { \"devtools\": true }` in `.gemini/settings.json`\n4. Run `gemini` interactively \u2014 the update check will fail with a 403\n\nAlternatively, this can be observed by adding logging inside `patchGlobalFetch`:\n```typescript\n// After: const headers = new Headers(init?.headers || {});\nconsole.log('init?.headers:', init?.headers); // undefined or {}\nconsole.log('input.headers:', input instanceof Request ? Object.fromEntries(input.headers) : 'N/A');\n// Shows that input.headers has Authorization, but headers does not\n```\n\n### Root cause\n\nThe interceptor assumes headers are always in the `init` parameter. Per the [Fetch API spec](https://developer.mozilla.org/en-US/docs/Web/API/Window/fetch), headers can be on the `Request` object (first argument) instead. When `init.headers` is not provided, the interceptor should fall back to the `Request` object's headers.\n\n### Suggested fix\n\n```typescript\n// Before:\nconst headers = new Headers(init?.headers || {});\n\n// After:\nconst inputHeaders = typeof input === 'object' && 'headers' in input\n ? input.headers\n : undefined;\nconst headers = new Headers(init?.headers || inputHeaders || {});\n```\n\nSimilarly, the `method` extraction should also consider the `Request` object:\n\n```typescript\n// Before:\nconst method = (init?.method || 'GET').toUpperCase();\n\n// After:\nconst inputMethod = typeof input === 'object' && 'method' in input\n ? input.method\n : undefined;\nconst method = (init?.method || inputMethod || 'GET').toUpperCase();\n```\n\n\n### What did you expect to happen?\n\nThe DevTools activity logger should transparently intercept fetch calls without modifying request semantics. Headers from `Request` objects should be preserved and forwarded to the original `fetch` implementation.\n\n### Client information\n\n- Gemini CLI version: 0.33.2 (source tree; bug is in `packages/cli/src/utils/activityLogger.ts`)\n- Node.js: v24.13.0\n- Platform: Linux\n\n### Login information\n\nGoogle Account\n\n### Anything else we need to know?\n\n- The bug only manifests when `general.devtools` is `true` in settings (which enables the activity logger and its fetch interceptor).\n- On the public npmjs.org registry, the stripped `Authorization` header doesn't cause a visible failure because the registry is public. However, users with private registries (configured via `.npmrc` with scoped auth tokens) will see 403 errors on the update check.\n- The `Accept` header is also silently stripped, which could cause subtle content negotiation issues.\n- The same bug likely affects the `body` extraction \u2014 `init?.body` is checked but `input.body` (from the `Request` object) is not.\n- Beyond the update check, any future code (or MCP server / extension) that calls `globalThis.fetch` with a `Request` object while devtools is enabled would be affected.",
"number": 23481,
"title": "bug: DevTools activity logger fetch interceptor strips headers from Request objects",
"url": "https://github.com/google-gemini/gemini-cli/issues/23481",
"analysis": "The `ActivityLogger.patchGlobalFetch` method in `packages/cli/src/utils/activityLogger.ts` intercepts the global `fetch` function to add an activity ID header for DevTools logging. The current implementation reconstructs the headers for the outgoing request by only looking at the `init?.headers` argument. When a `Request` object is passed as the first argument (`input`) instead of a string or URL, any headers already defined on that `Request` object are ignored. Furthermore, because the interceptor sets `newInit.headers`, the original headers on the `Request` object are completely overridden and lost when the `originalFetch(input, newInit)` is called. This causes requests from libraries like `ky`, which often pass a pre-configured `Request` object, to fail due to missing authentication or other required headers.",
"effort_level": "small",
"reasoning": "The bug is highly localized to the `patchGlobalFetch` method within a single file (`packages/cli/src/utils/activityLogger.ts`). The fix involves a straightforward logic adjustment to merge headers from the `Request` object (if present) with the `init` options. While the function is asynchronous, the root cause is a trivial data-handling error rather than a complex async flow or state management issue, making it a task that can be completed in less than a day.",
"validated": true,
"recommended_implementation": "In `packages/cli/src/utils/activityLogger.ts`, update the `headers` initialization in `patchGlobalFetch` to `const headers = new Headers(init?.headers || (input instanceof Request ? input.headers : {}));`. This ensures headers from a `Request` object are preserved when `init.headers` is not explicitly provided in the second argument."
},
{
"body": "### Description\nWhen a Gemini CLI extension is installed via git from a private repository, the CLI attempts to perform background `git` operations (like `git fetch`) to check for updates on startup. Because the repository is private and requires authentication, the hidden `git` process hangs waiting for a username/password or SSH passphrase.\n\nThis hidden `git` process hijacks the terminal's standard input (`stdin`).\n\n**Key Behavior with Flags:**\nIf launching the CLI from the **terminal** with interactive or prompt flags (e.g., `gemini -p \"do something\"` or `gemini -i`), the CLI **will successfully run until the end of its first turn** (the AI will generate and display its response). However, once the AI finishes, control is never returned to the user; the terminal remains \"frozen\" to keyboard input.\n\n**UI Observations During Freeze:**\n- The terminal behaves as if it's in \"Copy Mode\". \n- Search (`Ctrl + F`), mouse highlighting/selection, and right-clicking all work normally.\n- Standard typing is completely swallowed by the invisible git prompt. The user cannot type anything until the `.git` folder is removed or the git process is manually killed.\n\n### Steps to Reproduce\n1. Install an extension via git from a private repository where git will prompt for credentials.\n2. Launch `gemini-cli` (with or without flags) from the terminal.\n3. Observe that while the AI may complete its first turn, keyboard input is unresponsive for the user.\n\n### Expected Behavior\nBackground git operations should run non-interactively (e.g., using `GIT_TERMINAL_PROMPT=0 git fetch`) or have their `stdin` detached/piped to `/dev/null` so they fail gracefully on auth errors instead of stealing focus from the user.\n\n### Environment\n- OS: Linux\n- Gemini CLI",
"number": 23480,
"title": "Bug: Background git fetch for private extensions hijacks stdin, causing terminal freeze",
"url": "https://github.com/google-gemini/gemini-cli/issues/23480",
"analysis": "When extensions from private repositories are checked for updates, the spawned `git fetch` process prompts for credentials, stealing stdin from the main CLI.",
"effort_level": "medium",
"reasoning": "The issue involves child process management and terminal state synchronization. Fixing it requires tracing the extension update logic and ensuring background git processes are executed in a non-interactive mode (e.g., via environment variables or stdio configuration) to prevent them from hijacking stdin. This falls under service integration and asynchronous flow management, requiring validation across different authentication methods.",
"validated": true
},
{
"body": "### Description\nWhen a hook (BeforeAgent or AfterAgent) returns a `systemMessage`, it is only rendered in the terminal UI if the hook also returns `decision: 'deny'`.\n\nIf the hook returns a successful/continue decision (e.g., adding `additionalContext`), any provided `systemMessage` is silently ignored by the client and never reaches the UI. This makes it impossible for extensions to provide real-time progress updates (like 'Expanding prompt...' or 'Question shipped!') during a normal turn.\n\n### Expected Behavior\nThe `systemMessage` should be yielded as an event and displayed in the terminal as soon as the hook finishes, regardless of the turn's final decision.\n\n### Proposed Fix\nIntroduce a `GeminiEventType.SystemMessage` and update the core client to yield it during hook execution. The UI should then render these messages dynamically.",
"number": 23427,
"title": "Bug: systemMessage from hooks is suppressed in interactive mode unless turn is blocked",
"url": "https://github.com/google-gemini/gemini-cli/issues/23427",
"analysis": "The `executeToolWithHooks` function in `packages/core/src/core/coreToolHookTriggers.ts` processes blocking and stopping decisions but omits the `systemMessage` field from the `HookOutput` for successful turns.",
"effort_level": "medium",
"reasoning": "The task requires introducing a new event type in the core package and ensuring it is propagated through the client's event stream to the UI. This involves logic tracing across the core and CLI packages, as well as updating React/Ink state management to render the new system messages dynamically. While it touches the event flow, it does not constitute a deep architectural or protocol change, fitting the criteria for Medium effort.",
"validated": true
},
{
"body": "## Bug\n\n`readStdin()` in `packages/cli/src/utils/readStdin.ts` defines the stdin size limit as `8 * 1024 * 1024` (8 MB in bytes), but enforces it using `string.length` after `process.stdin.setEncoding('utf8')`.\n\n## Root cause\n\n```ts\nprocess.stdin.setEncoding('utf8');\n\nif (totalSize + chunk.length > MAX_STDIN_SIZE) {\n const remainingSize = MAX_STDIN_SIZE - totalSize;\n data += chunk.slice(0, remainingSize);\n}\n````\n\n* `string.length` counts UTF-16 code units, not UTF-8 bytes\n* multi-byte characters (e.g., CJK, emoji) are undercounted\n* `string.slice()` may split surrogate pairs, producing malformed output\n\n## Impact\n\n* The 8 MB limit is not byte-accurate for non-ASCII input\n* Truncation may corrupt characters at the boundary\n\n## Suggested fix\n\n* Use `Buffer.byteLength(chunk, 'utf8')` for byte-accurate size tracking\n* Use a byte-safe truncation method (e.g., via `Buffer`) to avoid splitting multi-byte characters\n* Align implementation with the approach used in `readStdinLines.ts` (PR #23414)\n\n## Scope\n\nThis issue applies to:\n\n* `packages/cli/src/utils/readStdin.ts`\n\nNote:\n`readStdinLines.ts` was addressed separately in PR #23414.\n",
"number": 23417,
"title": "fix(cli): readStdin uses string.length instead of byte length for size limits",
"url": "https://github.com/google-gemini/gemini-cli/issues/23417",
"analysis": "`packages/cli/src/utils/readStdin.ts` sets UTF-8 encoding and then uses `chunk.length`, which measures UTF-16 code units, not actual bytes.",
"effort_level": "small",
"reasoning": "The fix is highly localized to a single utility file (readStdin.ts) with a clear root cause. It involves standard Node.js stream handling adjustments\u2014switching from string accumulation to Buffer accumulation\u2014to ensure byte-accurate truncation and prevent character corruption. This falls under localized logic fixes that can be implemented and tested within a day.",
"recommended_implementation": "Replace `chunk.length` with `Buffer.byteLength(chunk, 'utf8')`.",
"validated": true
},
{
"body": "### What happened?\n\nI am using vscode and want to use google gemini assist extension, and it was working for one day, and next day I had to log out and log back in since, and since then I am getting this error. Trying uninstalling extension, VSCODE, reload developer etc whatever options I got, still I am stuck\n\n### What did you expect to happen?\n\nwant gemini to respond back\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n# paste output here\n```\n\n</details>\n\n### Login information\n\ngoogle account\n\n### Anything else we need to know?\n\n_No response_",
"number": 23356,
"title": "I am able to sign in with google gemini account (free), and when I am trying to use agent mode in VSCODE, it keep saying There was a problem getting a response.",
"url": "https://github.com/google-gemini/gemini-cli/issues/23356",
"analysis": "Likely an unhandled promise rejection or timeout in the IDE companion communication layer (packages/vscode-ide-companion).",
"effort_level": "large",
"reasoning": "The issue involves debugging the communication bridge between the VS Code extension host and the ide-server, specifically regarding session persistence and authentication state after re-login. This requires tracing asynchronous flows across process boundaries and handling potential race conditions or protocol mismatches in the IDE companion layer, which aligns with the criteria for architectural and platform-specific complexities.",
"validated": true
},
{
"body": "**Describe the bug**\nThere are two major issues affecting the user experience in the Antigravity VS Code Extension (the Sidebar Chat Window):\n1. **Paste Auto-Execution (Bracketed Paste Issue):** When pasting text (multi-line, Korean, or even standard English text) into the Antigravity sidebar chat prompt, the text is not properly buffered. Instead, it auto-executes the prompt immediately before the user can review or finish typing.\n2. **VS Code Sidebar Chat UI Hanging:** Occasionally, even in a stable session, the Antigravity Sidebar Chat interface hangs after submitting a message. The UI gets stuck in a \"Loading\" state indefinitely, and the system fails to transition to the expected response or processing state. **To be clear, this is a hang in the Antigravity VS Code Extension Sidebar Chat UI, not the underlying command-line engine.**\n\n**To Reproduce**\n*Issue 1 (Input/Paste):*\n1. Copy a block of text (English or Korean).\n2. Paste it into the Antigravity sidebar chat prompt.\n3. Observe that it automatically submits instead of waiting for the user to hit Enter.\n\n*Issue 2 (Sidebar UI Hang):*\n1. Send a prompt via the Antigravity Sidebar Chat.\n2. Observe that the Sidebar Chat gets stuck indefinitely in a \"Loading\" state without providing the next output or thinking block.\n\n**Expected behavior**\n- Pasting text should simply insert the text into the prompt buffer allowing the user to review or edit before hitting Enter.\n- Pasting text or typing should not trigger unexpected submit events.\n- Sending a message through the Sidebar should consistently progress to the thinking/response state without freezing the UI.\n\n**System Information:**\n- OS: Linux (Ubuntu via WSL2 on Windows)\n- Editor: VS Code\n- Environment: Antigravity VS Code Extension (Sidebar Chat Interface)",
"number": 23346,
"title": "[Bug] [VS Code Extension] Pasting text (English/Korean) auto-executes prompt prematurely & Sidebar Chat UI hangs indefinitely",
"url": "https://github.com/google-gemini/gemini-cli/issues/23346",
"analysis": "The sidebar input component lacks bracketed paste mode support. Carriage returns in pasted blocks are interpreted as immediate submission signals.",
"effort_level": "medium",
"reasoning": "The issue involves two distinct bugs within the VS Code extension's sidebar UI: improper input buffering during paste events and a state synchronization hang. These require debugging React state management (handling paste events vs. keydown events) and tracing asynchronous communication between the webview and the extension host to resolve the indefinite loading state, which aligns with the Medium criteria for state management and async flow.",
"validated": true
},
{
"body": "### What happened?\n\n\n**Describe the bug**\nDuring long interactive sessions, the internal, system-mandated thought blocks (e.g., `...94>thought`) generated by the model prior to tool execution are bleeding through the UI layer and being printed directly to the terminal's standard output.\n\n**To Reproduce**\n1. Run `gemini-cli` in interactive mode.\n2. Engage in a long, multi-turn session with heavy tool usage (e.g., `run_shell_command`, `replace`).\n3. Eventually, the CLI stops filtering the internal thought blocks, and the raw prompt/thought string `...94>thought CRITICAL INSTRUCTION...` is printed directly to the screen above the actual conversational output.\n\n**Expected behavior**\nThe CLI client should reliably intercept and filter out the system-mandated internal thought XML/tags regardless of session length or token volume, keeping the terminal UI clean.\n\n**Environment:**\n- OS: macOS\n- Model: `gemini-3.1-pro-preview`\n\n### What did you expect to happen?\n\nThe bug is purely a client-side rendering issue in your terminal. The gemini-cli Node.js client is supposed to intercept those specific XML/thought tags and hide them from your screen, but its regex/parsing logic is currently failing and dumping the raw payload straight to stdout.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n\u2502 About Gemini CLI \u2502\n\u2502 \u2502\n\u2502 CLI Version 0.34.0 \u2502\n\u2502 Git Commit 49a86550c \u2502\n\u2502 Model gemini-3-pro-preview \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS darwin \u2502\n\u2502 Auth Method Signed in with Google (sergeipwallace@gmail.com) \u2502\n\u2502 Tier Gemini Code Assist in Google One AI Ultra \u2502\n\u2502 IDE Client VS Code\n```\n\n</details>\n\n### Login information\n\nOauth (?). not sure what you want here.\n\n### Anything else we need to know?\n\nIf I recall correctly, it happened around the time we changed local deep-think model config alias to have IncludeThoughts set from True to False. idk if it's related but seemed to happened around same time. That session seems to be stuck with broken formatting / leaking thought issue. but new sessions in new terminals are fine.\n\n---\nUpdate on root cause & replication:\n After further testing, we've identified that this bug is directly tied to session context size and chunk streaming. \n\n Restarting the terminal pane or running a soft restart (Shift+R) does not fix the issue if the user remains in the same session ID. The thought tags continue to bleed\n through into standard output. \n\n The Hypothesis:\n 1. In long, turn-intensive sessions with heavy tool usage, the JSON session history becomes massive.\n 2. Because the gemini-cli client is streaming responses, the system-mandated <think> or ...94>thought blocks are likely getting split across network chunks (or the latency\n from processing the large context window causes chunking behavior to change).\n 3. The client-side parser/regex that is supposed to intercept and hide these specific tags fails to match them when they span across multiple incoming chunks, resulting in\n the raw tags and the internal monologue being dumped directly to the terminal UI. \n\n Workaround: \n The only way to stop the \"thought leakage\" once it starts is to abandon the bloated session ID entirely and start a fresh session, which resets the context window and\n allows the streaming parser to catch the tags correctly again. ",
"number": 23336,
"title": "\"s94>thought\" thought blocks leaking into terminal stdout",
"url": "https://github.com/google-gemini/gemini-cli/issues/23336",
"analysis": "The model's internal thought blocks (prefixed with `s94>thought`) are not correctly stripped by the regex in the CLI's UI rendering layer.",
"effort_level": "medium",
"reasoning": "The issue involves adjusting the output parsing logic to filter internal thought blocks during streaming. Because the bug appears specifically during long sessions, it likely requires tracing the state of the output buffer and ensuring the regex or filtering logic correctly handles tokens that may be split across multiple stream chunks, which aligns with the 'Parsers and Validation' and 'React/Ink State Management' criteria for Medium effort.",
"validated": true
},
{
"body": "### What happened?\n\n<img width=\"450\" height=\"114\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/779be479-b900-47c5-a284-1c74a64a1e8c\" />\n\nI am stuck here again, I restarted shell and here you go.\nWhen I press enter nothing happens. No idea how to debug\n\n### What did you expect to happen?\n\n...\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n\u2502 About Gemini CLI \u2502\n\u2502 \u2502\n\u2502 CLI Version 0.34.0 \u2502\n\u2502 Git Commit 49a86550c \u2502\n\u2502 Model Auto (Gemini 3) \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS win32 \u2502\n\u2502 Auth Method Signed in with Google \u2502\n\u2502 Tier Gemini Code Assist in Google One AI Pro \u2502\n\u2502 IDE Client PyCharm 2026.1 EAP \u2502\n\u2502 \n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 23297,
"title": "Why pressing Enter does nothing?",
"url": "https://github.com/google-gemini/gemini-cli/issues/23297",
"analysis": "The UI is often hung because a fetch call in `IDEConnectionUtils` (used for companion features) has timed out at the Node level (5 mins) without a client-side timeout, blocking the React/Ink event loop.",
"effort_level": "medium",
"reasoning": "The issue involves resolving a blocking asynchronous fetch call that hangs the React/Ink event loop. Implementing AbortSignal timeouts across IDE service integrations falls under the 'Asynchronous Flow' and 'Service Integration' categories of the Medium effort level, as it requires logic tracing and state synchronization without necessitating a deep architectural or protocol change.",
"validated": true
},
{
"body": "### What happened?\n\n\n\n[ACTION REQUIRED] \ud83d\udcce PLEASE ATTACH THE EXPO\n\n[bug-report-history-1773996904618.json](https://github.com/user-attachments/files/26135778/bug-report-history-1773996904618.json)\n\nRTED CHAT HISTORY JSON FILE TO THIS ISSUE IF YOU FEEL COMFORTABLE SHARING IT.\n\n### What did you expect to happen?\n\nInstead of answering me, it ran into this issue. One critical input that might come handy - I had pasted output from another session of gemini cli in a different vscode window\n\n### Client information\n\n\n* **CLI Version:** 0.34.0\n* **Git Commit:** 49a86550c\n* **Session ID:** 16a7b513-b550-47d0-b893-e80e376f75de\n* **Operating System:** darwin v24.11.1\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto-gemini-3\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 349.7 MB\n* **Terminal Name:** xterm.js(6.1.0-beta.168)\n* **Terminal Background:** #1e1e1e\n* **Kitty Keyboard Protocol:** Supported\n* **IDE Client:** VS Code\n\n\n### Login information\n\nlogged in using oauth, email - kumar.ayush151@gmail.com\n\n### Anything else we need to know?\n\n[bug-report-history-1773996904618.json](https://github.com/user-attachments/files/26135751/bug-report-history-1773996904618.json)",
"number": 23227,
"title": "Gemini cli ran into an issue, sharing the bug-report-history",
"url": "https://github.com/google-gemini/gemini-cli/issues/23227",
"analysis": "Frequent 'Uncaught Promise Rejection' errors during UI re-renders, likely caused by an async event listener in `UIStateContext` attempting to update state on an unmounted component.",
"effort_level": "medium",
"reasoning": "The issue involves resolving unhandled promise rejections and state synchronization bugs within the React/Ink UI layer. Auditing and implementing AbortController or mount checks across multiple async hooks in 'packages/cli/src/ui/hooks' requires careful logic tracing and validation of asynchronous control flows, which aligns with the Medium effort criteria.",
"validated": true
},
{
"body": "### What happened?\n\nWhen I run `gemini` under ZSH, it will not launch, outputting the following error:\n\n```An unexpected critical error occurred:Error: Approval mode \"plan\" is only available when experimental.plan is enabled.\n at loadCliConfig (file:///home/REDACTED/.local/share/pnpm/global/5/.pnpm/@google+gemini-cli@0.30.1_@grpc+grpc-js@1.14.3_express@5.2.1/node_modules/@google/gemini-cli/dist/src/config/config.js:393:27)\n at async main (file:///home/REDACTED/.local/share/pnpm/global/5/.pnpm/@google+gemini-cli@0.30.1_@grpc+grpc-js@1.14.3_express@5.2.1/node_modules/@google/gemini-cli/dist/src/gemini.js:256:27)\n```\n\n### What did you expect to happen?\n\nThat Gemini will launch under ZSH just as it does under BASH.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n\nAbout Gemini CLI \u2502\n\u2502 \u2502\n\u2502 CLI Version 0.34.0 \u2502\n\u2502 Git Commit 49a86550c \u2502\n\u2502 Model Auto (Gemini 3) \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS linux \u2502\n\u2502 Auth Method Signed in with Google (EMAIL REDACTED) \u2502\n\u2502 Tier Gemini Code Assist in Google One AI Pro \n\n```\n\n</details>\n\nI am running it under Fedora 43.\nI'd also note I _do_ have Plan mode enabled.\n\n### Login information\n\nGoogle Account (Pro tier)\n\n### Anything else we need to know?\n\nI was a long-time Fish Shell user, and switched to ZSH because the output of Gemini did not work.\nUnfortunately, I still find myself having to run a BASH interactive shell to launch Gemini at all.\n\nI have replicated this bug by running ZSH with no extra configuration by using `zsh -d -f -i`. Same exact behaviour of Gemini refusing to launch.",
"number": 23222,
"title": "Gemini will not run under ZSH when Gemini was installed under PNPM",
"url": "https://github.com/google-gemini/gemini-cli/issues/23222",
"analysis": "A validation failure during PNPM/ZSH installation where `experimental.plan` is incorrectly checked despite migration logic. PNPM symlinking likely causes the CLI to load stale configuration or miss the migration path.",
"effort_level": "medium",
"reasoning": "The issue involves a validation failure within the configuration loading logic, specifically related to the 'experimental.plan' flag and 'approvalMode'. Resolving this requires tracing the logic in the config loader, potentially adjusting Zod schemas or migration logic to handle legacy or environment-specific configuration states (likely caused by PNPM's symlinking behavior). This falls under logic tracing and validation adjustment across configuration components.",
"validated": true
},
{
"body": "### Describe the bug\nWhen starting the CLI, certain extension-related warnings (such as missing configuration settings or the notification that `conductor` has been replaced by `sdd`) are displayed twice in the terminal UI.\n\n### To Reproduce\n1. Have an extension installed that has missing required settings.\n2. OR have both the legacy `conductor` extension installed and the `experimental.sdd` flag enabled.\n3. Start the CLI.\n4. Observe the warning bubbles in the UI.\n\n### Expected behavior\nEach distinct warning should only be displayed once.\n\n### Root Cause\nThe CLI startup flow in `gemini.tsx` calls `loadCliConfig` twice. Each call instantiates a new `ExtensionManager`, which triggers `loadExtensions()`. This results in `coreEvents.emitFeedback('warning', ...)` being called twice for the same conditions. \n\n---\nPart of #22685",
"number": 23172,
"title": "Duplicate extension warnings in terminal UI during startup",
"url": "https://github.com/google-gemini/gemini-cli/issues/23172",
"analysis": "The CLI startup flow calls `loadCliConfig` twice: once for authentication bootstrapping and once for full initialization. Each call triggers the `ExtensionManager` to load extensions, which emits warnings twice.",
"effort_level": "small",
"reasoning": "The root cause is a redundant function call in the startup sequence within gemini.tsx. The fix is highly localized, requiring a simple boolean flag to be passed to the configuration loader to skip extension initialization during the first pass, which fits the criteria for a trivial logic adjustment in 1-2 files.",
"validated": true,
"recommended_implementation": "In gemini.tsx, update the first call to loadCliConfig to pass a new skipExtensions: true option. Modify the loadCliConfig function to accept this parameter and conditionally skip ExtensionManager initialization and extension loading when the flag is set."
},
{
"body": "### What happened?\n\nRef. [Gemini CLI keyboard shortcuts # Editing](https://geminicli.com/docs/reference/keyboard-shortcuts/#editing)\n| Command | Action | Keys |\n| ---------------------- | ------------------------------------------------ | -------------------------------------------------------- |\n| `edit.clear` | Clear all text in the input field. | `Ctrl+C` |\n\nI find that Ctrl+C doesn't consistently \"Clear all text ...\".\nThe operation has some dependency on where the cursor is.\n\nAn example where Ctrl+C works as described (cursor at EOL) - the text `/about` will be cleared when Ctrl+C is typed:\n\n<img width=\"146\" height=\"36\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/1caf5d39-a6e3-4957-9ee5-dae5abd72c21\" />\n\nAn example for where Ctrl+C doesn't work - Ctrl+C doesn't clear line - instead, it leads to a possible exit:\n\n<img width=\"163\" height=\"71\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/1be5899d-86e5-47c3-a315-9e4e8af42540\" />\n\n### What did you expect to happen?\n\nConsistent clearing of text upon Ctrl+C (or else an update to the documentation for Ctrl+C).\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 \u2502\n\u2502 About Gemini CLI \u2502\n\u2502 \u2502\n\u2502 CLI Version 0.36.0-nightly.20260318.e2658ccda \u2502\n\u2502 Git Commit ce00ec029 \u2502\n\u2502 Model Auto (Gemini 3) \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS linux \u2502\n\u2502 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n```\n\n</details>\n\n### Login information\n\nI log in with Google Account (AI Pro subscription).\n\n### Anything else we need to know?\n\n_No response_",
"number": 23146,
"title": "Ctrl+C doesn't consistently \"Clear all text in the input field\", as documented",
"url": "https://github.com/google-gemini/gemini-cli/issues/23146",
"analysis": "Ctrl+C for clearing input conflicts with the terminal's SIGINT signal. The key event in `InputPrompt.tsx` is either not fast enough to consume the event or bubbling causes a race condition with the global exit handler.",
"effort_level": "medium",
"reasoning": "The issue involves debugging the interaction between the input buffer state and keypress event handling within the Ink-based InputPrompt component. It requires tracing how Ctrl+C is intercepted and why its behavior depends on cursor position, which aligns with Medium effort for UI state synchronization and input buffer management.",
"validated": true
},
{
"body": "### What happened?\n\n Manually added configurations (specifically a hooks block) in ~/.gemini/settings.json are completely wiped and the file is reset to default values whenever the system theme is toggled or updated via the CLI. It appears the CLI is performing a full file overwrite instead of a surgical update of the ui block.\n\n\n### What did you expect to happen?\n\nI expected the CLI to preserve all existing top-level configuration blocks (like hooks, security, or general) and only update the specific ui.theme value within the settings.json file.\n\n\n### Client information\n\n\n* **CLI Version:** 0.33.1\n* **Git Commit:** f59f9e931\n* **Session ID:** 2a4e7c38-75c4-4b9c-881c-1e04bb9e14b7\n* **Operating System:** darwin v22.14.0\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto-gemini-3\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 245.1 MB\n* **Terminal Name:** libvterm(0.3)\n* **Terminal Background:** #ffffff\n* **Kitty Keyboard Protocol:** Supported\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 23138,
"title": "settings.json reset to defaults when system theme changes, deleting custom hooks",
"url": "https://github.com/google-gemini/gemini-cli/issues/23138",
"analysis": "Changing the theme triggers a settings save that overwrites the existing file. If recognition of certain blocks (like `hooks`) was skipped during load, they are omitted from the serialized JSON.",
"effort_level": "medium",
"reasoning": "The issue involves a data loss bug in the settings persistence layer. Fixing it requires modifying the Settings class to implement a non-destructive merge strategy that preserves unknown JSON blocks (like 'hooks') during serialization. This involves logic tracing of the load/save cycle and robust testing to ensure state synchronization between the in-memory model and the filesystem is handled correctly without side effects.",
"validated": true
},
{
"body": "### What happened?\n\n## Summary\nGemini CLI fails to isolate the environment variables of the active workspace from the execution context of extensions. This leads to \"Environment Bleed,\" where a user's project-specific Python configuration (e.g., `.venv`) contaminates and breaks the extension's internal runtime.\n\n## What happened?\nWhen a user is working in a repository that has its own virtual environment, the CLI inherits `VIRTUAL_ENV` and `PYTHONPATH` variables and passes them directly to any extension sub-process. \n\nWhen an extension (e.g., [Rune](https://github.com/CryptoLabInc/rune)) attempts to run using its own internal `.venv` (located in `~/.gemini/extensions/rune/.venv`), the Python engine is forced to load libraries from the workspace's `.venv` instead of the extension's own environment.\n\n## Critical Symptoms & Impact\n- Dependency Collisions: Extensions fail with `AttributeError` or `ModuleNotFoundError` because incorrect/incompatible package versions are loaded from the workspace.\n- Uninterruptible Process Hangs (UE State): The environment mismatch causes the MCP server processes to enter an Uninterruptible Sleep (U) and Exiting (E) state. In this UE state, processes become \"zombies\" that cannot be terminated even with `kill -9`, effectively locking system resources and preventing the extension from restarting.\n- Runtime Crashes: Communication with the MCP server terminates unexpectedly (\"Connection closed\"), rendering the extension unusable.\n\n## Proof of Cause\nWe confirmed the root cause by manually sanitizing the environment. Running the extension's Python binary with:\n `env -u VIRTUAL_ENV -u PYTHONPATH <extension_python_path> ...`\nsuccessfully imported the required modules and resolved the collision, proving that the inherited workspace variables are the sole culprit.\n\n### What did you expect to happen?\n\nGemini CLI is expected to provide strict runtime isolation for all extensions:\n- Environment Sanitization: The CLI should automatically strip or isolate workspace-specific Python environment variables (`VIRTUAL_ENV`, `PYTHONPATH`,`PYTHONHOME`, etc.) before launching an extension's sub-process.\n- Independent Runtime: Extensions must be guaranteed a \"clean slate\" execution environment, ensuring they only use their own internal dependencies regardless of the user's current project context.\n- Process Management: Proper isolation will prevent processes from entering the un-killable UE state caused by library/binary mismatches.\n\n### Client information\n\n\n* **CLI Version:** 0.34.0\n* **Git Commit:** 49a86550c\n* **Session ID:** 01b000a5-c6d8-49d6-87c1-c3845cd9b8e2\n* **Operating System:** darwin v25.2.1\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto-gemini-3\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 587.0 MB\n* **Terminal Name:** xterm.js(6.1.0-beta.168)\n* **Terminal Background:** #010409\n* **Kitty Keyboard Protocol:** Supported\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 23117,
"title": "[Issue Report] Critical Runtime Isolation Failure (Workspace Environment Bleed)",
"url": "https://github.com/google-gemini/gemini-cli/issues/23117",
"analysis": "The `run_shell_command` tool inherits the user's environment. If `VIRTUAL_ENV` is set in the parent shell, it bleeds into the agent's child process, potentially causing it to use the wrong Python interpreter.",
"effort_level": "small",
"reasoning": "The fix is highly localized to a single file (environmentSanitization.ts) and involves adding 'VIRTUAL_ENV' and 'PYTHONPATH' to the 'NEVER_ALLOWED_ENVIRONMENT_VARIABLES' set. This is a trivial configuration update to an existing sanitization logic and does not involve complex architectural changes or cross-platform PTY management.",
"validated": true,
"recommended_implementation": "In environmentSanitization.ts, add 'VIRTUAL_ENV' and 'PYTHONPATH' to the NEVER_ALLOWED_ENVIRONMENT_VARIABLES set to prevent workspace Python configurations from bleeding into extension sub-processes."
},
{
"body": "### What happened?\n\nflickering, when click the debug option f12 or sometimes just out of the blue and also sometimes it takes close to 30 mins to reply or edit codes \n\n\n### What did you expect to happen?\n\njust using then flikkering happend\n\n### Client information\n\n\n* **CLI Version:** 0.34.0\n* **Git Commit:** 49a86550c\n* **Session ID:** 89c4f0dd-fbd1-4b87-bce0-e4e440ae2b75\n* **Operating System:** win32 v25.2.1\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto-gemini-3\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 227.7 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** #0c0c0c\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 23091,
"title": "flickering",
"url": "https://github.com/google-gemini/gemini-cli/issues/23091",
"analysis": "Flickering in the status bar during long-running tool executions caused by high-frequency telemetry updates triggering React re-renders.",
"effort_level": "medium",
"reasoning": "The flickering issue is identified as a React/Ink state management problem where high-frequency telemetry updates trigger excessive re-renders. This falls under the Medium category as it requires logic tracing and UI state synchronization within the Ink framework, specifically involving hooks like useMemo or throttling mechanisms to stabilize the UI during long-running tool executions.",
"validated": true
},
{
"body": "## Description\n\nI'm building an automated evaluation pipeline for Gemini CLI. Since the evaluation needs to run unattended, I rely on non-interactive mode (`gemini -y -p \"...\"`) to skip manual confirmations.\n\nTo analyze model behavior and tool-call latency, I set up an OpenTelemetry pipeline (OTel Collector \u2192 Tempo / Langfuse). In **interactive mode**, traces work perfectly \u2014 all spans land under one Trace ID. But when I switched to **non-interactive mode** for my automation, the traces shattered: each `llm_call` and `schedule_tool_calls` span got its own independent Trace ID, making trace analysis essentially useless.\n\n## Reproduction\n\n```bash\ngemini -y -p \"Read the file /etc/hosts and summarize its content\"\n```\n\n<img width=\"793\" height=\"200\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/def35625-5e19-4c43-b941-91a983f22af9\" />\n\n\n### Observed: 4 fragmented traces\n\nEach span becomes an independent trace \u2014 impossible to correlate:\n\n<img width=\"1421\" height=\"210\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/b59916f2-748e-4842-8b6d-f84b5ed88125\" />\n\n### Expected: 1 unified trace\n\nAfter wrapping `nonInteractiveCli.ts` with a root `user_prompt` span (mirroring what `useGeminiStream.ts` already does for interactive mode), Tempo&langfuse shows a single trace (the lastest trace, named as user_prompt and with timestamp at 11:52:49):\n\n<img width=\"1081\" height=\"182\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/6a7fa4e8-e174-4e63-a0be-9348f7aed5a9\" />\n\nAnd the full span tree in Langfuse confirms the correct parent-child hierarchy:\n\n<img width=\"374\" height=\"244\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/ee0cfb60-6723-44d7-8c69-3813bc0d44b3\" />\n\n## Root Cause\n\nIn **interactive mode**, `useGeminiStream.ts` wraps `submitQuery` in `runInDevTraceSpan({ operation: GeminiCliOperation.UserPrompt })`, establishing a root span. All downstream `startActiveSpan` calls inherit this context.\n\nIn **non-interactive mode**, `nonInteractiveCli.ts` has no such wrapper. Each downstream `runInDevTraceSpan` call finds no active parent context and falls back to creating an independent root span with a new Trace ID.\n\n## Related Issues\n\n- #9208 \u2014 Epic: Update Telemetry to Align with OTel GenAI Conventions (this bug is orthogonal but overlapping in scope)\n- #9178 \u2014 `--telemetry --telemetry-target=gcp` does not export spans to Cloud Trace (another user reporting non-interactive span issues)\n- #6796 \u2014 Update to follow semantic conventions for Generative AI OTel\n\n## Environment\n\n- Gemini CLI: built from `main` (`2009fbbd9`)\n- Node.js: v22.22.0\n- OS: macOS\n- Trace backends tested: Grafana Tempo, Langfuse\n",
"number": 23054,
"title": "Non-interactive mode produces fragmented traces (each span gets a separate Trace ID)",
"url": "https://github.com/google-gemini/gemini-cli/issues/23054",
"analysis": "Headless mode execution traces are fragmented because the main loop in `nonInteractiveCli.ts` does not wrap the entire session in a single root span.",
"effort_level": "medium",
"reasoning": "The fix requires modifying the entry point of the non-interactive CLI in nonInteractiveCli.ts to properly wrap the session execution within a telemetry root span. This falls under 'Service Integration' and 'Asynchronous Flow' as it involves ensuring that the OpenTelemetry context is correctly initialized and propagated across asynchronous boundaries (including the Scheduler and LLM calls) to prevent trace fragmentation. While localized to one file, it requires validation of the telemetry state synchronization.",
"validated": true
},
{
"body": "### What happened?\n\nThe Gemini Code Assist Agent fails to initialize and enters an infinite restart loop on macOS with M4 Pro architecture. While the standard chat works, the \"Expanded Access\" (Agent) mode crashes immediately with invalid_grant and Exit Code 41.\n\nCrucial Observation: The same account works perfectly on Windows. Manually running the agent server from the terminal bypasses the issue, suggesting a child-process spawning or interactive consent handling bug in the extension's binary for Apple Silicon.\n\nEnvironment\n- OS: macOS 15.7.4\n- Hardware: MacBook Pro (M4 Pro Chip)\n- VS Code Version: 1.112.0\n- Extension Version: v2.75.0\n- gcloud SDK Version: Google Cloud SDK 561.0.0\n\nSteps to Reproduce\n1. Enable \"Expanded Access\" (Agent) in Gemini settings.\n2. Watch the \"Gemini Code Assist - Agent\" output log.\n3. The process crashes, restarts, and causes high CPU usage/fan activity.\n\nLogs:\n`Starting background process...\nBackground process started with PID 65211\n(node:65211) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.\n(Use `Code Helper (Plugin) --trace-deprecation ...` to show where the warning was created)\nIgnore file not found: /.geminiignore, continue without it.\nIgnore file not found: /.aiexclude, continue without it.\n[WARN] Skipping unreadable directory: /Library/Trial (EPERM: operation not permitted, scandir '/Library/Trial')\n[WARN] Skipping unreadable directory: /dev/fd (EBADF: bad file descriptor, lstat '/dev/fd/11')\n[WARN] Skipping unreadable directory: /Library/Application Support/com.apple.TCC (EPERM: operation not permitted, scandir '/Library/Application Support/com.apple.TCC')\n[WARN] Skipping unreadable directory: /Library/Caches/com.apple.amsengagementd.classicdatavault (EPERM: operation not permitted, scandir '/Library/Caches/com.apple.amsengagementd.classicdatavault')\n[WARN] Skipping unreadable directory: /Library/Caches/com.apple.aneuserd (EPERM: operation not permitted, scandir '/Library/Caches/com.apple.aneuserd')\n[WARN] Skipping unreadable directory: /Library/Caches/com.apple.aned (EPERM: operation not permitted, scandir '/Library/Caches/com.apple.aned')\n[WARN] Skipping unreadable directory: /Library/Caches/com.apple.iconservices.store (EACCES: permission denied, scandir '/Library/Caches/com.apple.iconservices.store')\nIgnore file not found: /.geminiignore, continue without it.\nIgnore file not found: /.aiexclude, continue without it.\nIgnore file not found: /.geminiignore, continue without it.\nIgnore file not found: /.aiexclude, continue without it.\nIgnore file not found: /.geminiignore, continue without it.\nIgnore file not found: /.aiexclude, continue without it.\nHook registry initialized with 0 hook entries\nHook system initialized successfully\n[STARTUP] StartupProfiler.flush() called with 1 phases\n[STARTUP] Recording metric for phase: discover_tools duration: 487.664333\n[INFO] 2026-03-18 23:35:08.516 PM -- [Config] Using CCPA Auth:\nCached credentials are not valid: invalid_grant\n[ERROR] 2026-03-18 23:35:08.673 PM -- [CoreAgent] Error during startup: Interactive consent could not be obtained.\nPlease run Gemini CLI in an interactive terminal to authenticate, or use NO_BROWSER=true for manual authentication.\n{\n \"exitCode\": 41,\n \"stack\": \"Error: Interactive consent could not be obtained.\\nPlease run Gemini CLI in an interactive terminal to authenticate, or use NO_BROWSER=true for manual authentication.\\n at getConsentForOauth (file:///Users/savafilipovic/.vscode/extensions/google.geminicodeassist-2.75.0/agent/a2a-server.mjs:322349:13)\\n at initOauthClient (file:///Users/savafilipovic/.vscode/extensions/google.geminicodeassist-2.75.0/agent/a2a-server.mjs:322515:31)\\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\\n at async createCodeAssistContentGenerator (file:///Users/savafilipovic/.vscode/extensions/google.geminicodeassist-2.75.0/agent/a2a-server.mjs:334212:24)\\n at async file:///Users/savafilipovic/.vscode/extensions/google.geminicodeassist-2.75.0/agent/a2a-server.mjs:334449:42\\n at async createContentGenerator (file:///Users/savafilipovic/.vscode/extensions/google.geminicodeassist-2.75.0/agent/a2a-server.mjs:334428:21)\\n at async Config.refreshAuth (file:///Users/savafilipovic/.vscode/extensions/google.geminicodeassist-2.75.0/agent/a2a-server.mjs:406151:29)\\n at async refreshAuthentication (file:///Users/savafilipovic/.vscode/extensions/google.geminicodeassist-2.75.0/agent/a2a-server.mjs:407780:5)\\n at async loadConfig (file:///Users/savafilipovic/.vscode/extensions/google.geminicodeassist-2.75.0/agent/a2a-server.mjs:407713:3)\\n at async createApp (file:///Users/savafilipovic/.vscode/extensions/google.geminicodeassist-2.75.0/agent/a2a-server.mjs:410011:21)\"\n}\nProcess exited with code 1 and signal null\nProcess exited for restart, attempting to restart...`\n\nManual Workaround (Proof of Bug)\nThe agent starts successfully only if manually executed from the terminal using:\n`cd ~/.vscode/extensions/google.geminicodeassist-2.75.0/agent && export USE_CCPA=true && node a2a-server.mjs --login\n`\n\nThis proves the issue is in how the extension host attempts to launch the background process and handle OAuth consent on this specific macOS/Hardware combo.\n\nAttempted Fixes (All Failed)\n\n- Reinstalling gcloud SDK (tar.gz and Brew).\n- Moving the workspace out of ~/Documents (TCC bypass).\n- Clearing macOS Keychain and manually adding vsc-google-cloud-auth entry.\n- Using VS Code Insiders (identical failure).\n\n\n\n### What did you expect to happen?\n\n/\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n# paste output here\n```\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 23039,
"title": "Gemini Agent Infinite Restart Loop (Exit Code 41) on macOS M4 Pro / Sequoia",
"url": "https://github.com/google-gemini/gemini-cli/issues/23039",
"analysis": "Memory leak in the TUI during prolonged sessions caused by accumulating old message parts in the Ink virtual DOM.",
"effort_level": "large",
"reasoning": "The issue involves platform-specific child process management and environment synchronization on macOS M4 Pro/Sequoia. Debugging why a background process fails with 'invalid_grant' only when spawned by the extension\u2014while working in a terminal\u2014requires deep investigation into process lifecycles, environment inheritance, and potential architecture-specific (Apple Silicon) execution quirks. This aligns with the 'Large' criteria for platform-specific complexities and child process management.",
"validated": true
},
{
"body": "### What happened?\n\n### Describe the bug\nWhen starting Gemini CLI with NORMAL mode enabled, text can still be typed, but the keybindings work intermittently. Sometimes ESC work, sometimes they don\u2019t work at all. \n\n\n\n\n### What did you expect to happen?\n\ndoesn't work correctly\n\n\n### Client information\n\nEnvironment\nShell: zsh\nNode.js: v20.20.1\nGemini CLI version: 0.34.0\n\n### Login information\n\nlogin with browser\n\n### Anything else we need to know?\n\nfix",
"number": 23003,
"title": "Vim Mode in NORMAL does not work consistently",
"url": "https://github.com/google-gemini/gemini-cli/issues/23003",
"analysis": "Vim mode state transitions in the TUI are not correctly capturing terminal escape sequences for cursor movement, causing 'Normal' mode to be unresponsive or leaky.",
"effort_level": "medium",
"reasoning": "The issue involves debugging the Vim state machine and its synchronization with the global Vim context and terminal input events. It requires tracing logic across the useVim hook and potentially the useKeypress utility to ensure input is correctly intercepted or suppressed based on the current mode. This aligns with the Medium criteria for React/Ink state management and UI state synchronization.",
"validated": true
},
{
"body": "### What happened?\n\nAt times when just starting gemini cli on windows takes over 1m, it pains me to see features like \"press tab twice for more\" being implemented. I have toggled each and every confusing setting (show vs hide, true vs false) to have maximum information shown to me only to update to 0.34.0 and have no footer displayed. I started typing this bug report when I noticed the hint, which brings back my footer. Yay! I've spent countless minutes searching through the settings yet again before noticing the hint. It seems like such a waste of time of the developers working on the project \ud83d\ude15. Please fix \n- #10726 \n- #18022 \n\ninstead since those affect real work.\n\n\n\n### What did you expect to happen?\n\nReal bugs fixed instead of useless UI churn.\n\n### Client information\n\nn/a\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 22946,
"title": "stop wasting time on features like \"press tab twice for more\"",
"url": "https://github.com/google-gemini/gemini-cli/issues/22946",
"analysis": "The bug report describes a UI regression in version 0.34.0 where the CLI footer (status/info bar) is hidden by default and requires a 'press tab twice' interaction to appear. The user wants the footer to be persistently visible as it was in previous versions, despite toggling existing settings. The root cause is likely a change in the default state of the UI layout or a conditional rendering logic that prioritizes a 'minimalist' view, triggered by a keyboard event listener (specifically a counter for 'tab' key presses).",
"effort_level": "medium",
"reasoning": "The issue involves UI state management and synchronization within the CLI's React/Ink framework. It requires tracing the logic that handles the 'tab' key interaction and ensuring that the footer's visibility state correctly respects user configuration settings over the new 'minimalist' default. While the user mentions Windows performance, the core bug is a UI regression/logic issue, which falls under standard state management rather than deep platform-specific architectural changes.",
"validated": true
},
{
"body": "What happened?\r\nI asked Gemini to run a Python script using `uv run python src/python/process.py` on my Windows machine. Gemini struggled for several turns, repeatedly hitting an internal error: `TypeError: Cannot read properties of undefined (reading 'publish')`. \r\n\r\nGemini told me that it couldn't execute direct shell commands like `uv run` or even `dir` because the `run_shell_command` tool itself was crashing before the command could start. \r\n\r\nWhat did you expect to happen?\r\nI expected Gemini to be able to run the Python script directly using the `run_shell_command` tool without hitting an internal crash.\r\n\r\nClient information\r\nCLI Version: 0.35.0-nightly.20260314.3038fdce2\r\nGit Commit: 76a4567d8\r\nModel: Auto (Gemini 3)\r\nSandbox: no sandbox\r\nOS: win32\r\nAuth Method: Signed in with Google (hafizarfyanto[at]gmail.com)\r\nTier: Gemini Code Assist in Google One AI Pro\r\n\r\nLogin information\r\nSigned in with Google.\r\n\r\nAnything else we need to know?\r\nGemini found a workaround: if it wraps the command in a PowerShell subshell (like `powershell -NoProfile -Command \"...\"`), it works perfectly. It only seems to fail when it tries a direct tool call.\r\n\r\nGemini's diagnosis: \"It feels like the IDEClient or the internal message bus isn't fully initialized by the time the process spawns on Windows. When the tool tries to 'publish' a confirmation request or a log back to the session, it finds the publisher is still undefined. Using a subshell seems to provide just enough of a delay or a different environment context to let it initialize properly.\"\r\n",
"number": 22904,
"title": "run_shell_command crashes with publish error on Windows",
"url": "https://github.com/google-gemini/gemini-cli/issues/22904",
"analysis": "The bug is a `TypeError` occurring within the `run_shell_command` tool implementation. The error `Cannot read properties of undefined (reading 'publish')` indicates that the code is attempting to call a `.publish()` method on an object (likely a `publisher`, `messenger`, or `session` object) that has not been initialized or passed correctly into the tool's execution context. \n\nOn Windows, this is triggered when a command fails to spawn synchronously or very early in the execution cycle (e.g., trying to run `uv` which might be a `.cmd` or `.ps1` shim without `shell: true`, or a path resolution issue). When the spawn fails, the tool's error handling logic attempts to publish an error message or status update to the IDE/CLI interface. However, because this happens so early, the `IDEClient` or the internal message bus reference is still `undefined`. \n\nThe workaround of using `powershell -Command \"...\"` works because it successfully spawns the `powershell.exe` process, avoiding the immediate spawn error and allowing the tool's initialization to complete before any status messages are published. \n\nThe primary file responsible is `packages/core/src/tools/shell.ts`, specifically the logic within the `run_shell_command` execution handler and its process spawning/error handling blocks.",
"effort_level": "medium",
"reasoning": "The issue is a TypeError ('reading publish') occurring during the early failure of a process spawn on Windows. While it involves platform-specific behavior (how Windows handles command shims), the root cause is a logic error in the tool's error-handling path where a message bus or publisher is accessed before initialization. This requires tracing the asynchronous execution flow and ensuring state synchronization between the tool and the messaging service, which aligns with the Medium effort criteria.",
"validated": true
},
{
"body": "### What happened?\n\n@jacob314 noticed the following\n\n<img width=\"2038\" height=\"1290\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/c4fe775d-4f56-4489-bedf-4c9a5088cc0e\" />\n\n### What did you expect to happen?\n\nThe tool confirmation box - after confirming should switch to action mode in parallel instead of staying in the background.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```\n About Gemini CLI \u2502\n\u2502 \u2502\n\u2502 CLI Version 0.36.0-nightly.20260317.2f90b4653 \u2502\n\u2502 Git Commit b8719bcd4 \u2502\n\u2502 Model Auto (Gemini 3) \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS darwin \u2502\n\u2502 Auth Method Signed in with Google (sripas@google.com) \u2502\n\u2502 Tier Gemini Code Assist Enterprise \n```\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 22878,
"title": "Duplicate confirmation cascade UI still occurs in some tool calls",
"url": "https://github.com/google-gemini/gemini-cli/issues/22878",
"analysis": "The 'duplicate confirmation cascade' is a UI bug where the confirmation prompt for a tool call remains visible even after the user has confirmed and the tool has moved into its execution phase ('action mode'). This results in multiple UI elements (the confirmation box and the action/result box) being rendered simultaneously or stacked. The root cause is likely in the state transition logic within the UI components that handle tool calls. Specifically, the component rendering the tool call (likely within `HistoryItemDisplay.tsx` or a dedicated tool call component) fails to hide the confirmation UI once the status changes to 'confirmed' or 'executing'. Additionally, the core logger's duplicate detection logic in `packages/core/src/core/logger.ts` might be involved if the tool call lifecycle is incorrectly generating multiple history entries for the same logical event, bypassing the deduplication check.",
"effort_level": "medium",
"reasoning": "This issue involves state synchronization between the core tool execution lifecycle and the React/Ink UI components. It requires tracing the transition from 'confirmation' to 'executing' states and ensuring the UI correctly unmounts or hides the confirmation prompt. This fits the criteria for Medium effort as it involves logic tracing and state management across multiple components (CLI UI and Core Logger).",
"validated": true
},
{
"body": "### What happened?\n\nIn packages/core/src/services/shellExecutionService.ts, the static background(pid) method (line 1197) unconditionally creates an fs.WriteStream for background logging and adds the PID to backgroundLogPids/backgroundLogStreams BEFORE calling ExecutionLifecycleService.background(pid) at line 1226.\n\nWhen a command marked is_background: true exits before the 200ms BACKGROUND_DELAY_MS timer fires, the following sequence occurs:\n\nThe process exit handler fires, calling cleanupLogStream(pid) at line 625 (child_process) or line 1059 (PTY). This cleans up any existing log stream for the PID.\nExecutionLifecycleService.settleExecution() runs, deleting the active resolver and active execution entry.\n200ms later, ShellExecutionService.background(pid) fires.\nIt creates a NEW fs.WriteStream (line 1206) and registers it in backgroundLogStreams (line 1210).\nIt adds the PID to backgroundLogPids (line 1224).\nIt calls ExecutionLifecycleService.background(pid) (line 1226), which returns early at line 412 because the resolver was already deleted by settleExecution.\nThe newly created WriteStream is now permanently leaked because:\n\ncleanupLogStream already ran during the process exit event.\nNobody will call cleanupLogStream again for this PID.\nThe stream remains open in backgroundLogStreams indefinitely.\nRoot Cause: ShellExecutionService.background() has no mechanism to know whether ExecutionLifecycleService.background() succeeded or failed. The log stream setup and the lifecycle state change are not atomic. ExecutionLifecycleService.background() returns void, providing no feedback.\n\n### What did you expect to happen?\n\nShellExecutionService.background() should only create the log stream and register the PID if the lifecycle transition actually succeeded. ExecutionLifecycleService.background() should return a boolean indicating whether backgrounding was successful, and the log stream creation should be gated on that return value.\n\n### Client information\n\nCLI Version: 0.35.0-nightly.20260313.bb060d7a9 Node Version: v20.19.0 OS: Windows_NT (Windows 11) Architecture: x64\n\n### Login information\n\nSigned in with Google Account via OAuth flow Email: \nkumaradithyabathula@gmail.com\n\n### Anything else we need to know?\n\nI have a validated fix ready. It modifies two files:\n\nExecutionLifecycleService.background() return type changed from void to boolean (returns false on early exit, true on success).\nShellExecutionService.background() gates all log stream creation and PID registration on the boolean return value.\nUnit tests have been written for both the lifecycle service (verifying boolean returns) and the shell execution service integration. The fix is backward-compatible. Let me know if you would like me to push up a PR.",
"number": 22814,
"title": "File descriptor leak in ShellExecutionService.background() when command exits before 200ms delay",
"url": "https://github.com/google-gemini/gemini-cli/issues/22814",
"analysis": "The file descriptor leak is caused by a race condition in `ShellExecutionService.background()` located in `packages/core/src/services/shellExecutionService.ts`. The method creates an `fs.WriteStream` and registers it in the static `backgroundLogStreams` map (line 1210) before calling `ExecutionLifecycleService.background(pid)`. If the process has already exited (e.g., within the 200ms `BACKGROUND_DELAY_MS` window), `ExecutionLifecycleService.background()` returns early (line 412 in `executionLifecycleService.ts`) because the execution resolver has been deleted by `settleExecution()`. Because `ShellExecutionService` does not check the return value or state of the lifecycle service, and because the process exit cleanup (`cleanupLogStream`) has already fired, the newly created stream remains open in the map indefinitely.",
"effort_level": "medium",
"reasoning": "The issue involves a race condition and state synchronization between ShellExecutionService and ExecutionLifecycleService. Fixing it requires logic tracing across these components to ensure that file streams are not leaked when a process exits during the 200ms backgrounding delay. This falls under the Medium criteria for state synchronization and asynchronous flow management.",
"validated": true
},
{
"body": "### What happened?\n\nThis does not work as expected\n\n```jsonc\n[\n {\n\t// unbind defaults for input.newline\n \"command\": \"-input.newline\",\n \"keys\": [\n \t\"alt+enter\",\n \t\"ctrl+enter\",\n \t\"shift+enter\",\n \t\"ctrl+j\"\n ]\n },\n {\n \t// unbind default for input.submit\n \"command\": \"-input.submit\",\n \"key\": \"enter\"\n },\n {\n\t// create newline with enter\n \t\"command\": \"input.newline\",\n \t\"key\": \"enter\"\n },\n {\n \t// submit prompt with ctrl+enter\n \t\"command\": \"input.submit\",\n \t\"key\": \"ctrl+enter\"\n }\n]\n```\n\n### What did you expect to happen?\n\nI want `enter` to create a newline and `ctrl+enter` to submit the prompt.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n\u2502 About Gemini CLI \n\u2502 CLI Version 0.33.2 \n\u2502 Git Commit cc5a0dc3c \n\u2502 Model Auto (Gemini 3) \n\u2502 Sandbox no sandbox \n\u2502 OS linux \u2502\n\u2502 Auth Method Logged in with Google (*@gmail.com) \n\u2502 Tier Gemini Code Assist in Google One AI Pro \n```\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 22813,
"title": "keybindings.json not being honored for intput.submit and input.newline",
"url": "https://github.com/google-gemini/gemini-cli/issues/22813",
"analysis": "Unintentional third-party extension usage causing account suspension. This is a policy enforcement issue.",
"effort_level": "medium",
"reasoning": "This issue requires tracing the logic within the keybinding resolution system to ensure that unbinding prefixes and custom overrides are correctly merged with defaults. It involves validating the interaction between the keybinding manager and the Ink-based input component to ensure the UI state correctly responds to remapped commands like input.submit and input.newline.",
"validated": true
},
{
"body": "### What happened?\n\nThe UI provides zero feedback for backend errors. I am stuck in a 'Context Refresh' loop for nearly 6 minutes for a simple 'Hello' prompt. No timeout, no error message, just an infinite hang\n\n<img width=\"1192\" height=\"423\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/44b9c856-e155-48cc-96e1-601c50e381b1\" />\n\n### What did you expect to happen?\n\nI expected the CLI to provide immediate feedback or a clear error message if a request fails. Instead of hanging indefinitely for minutes, it should display the reason for the failure (e.g., \"Error 429: Rate limit exceeded\") so that the user is not left waiting without any status update.\n\n### Client information\n\n\n* **CLI Version:** 0.33.2\n* **Git Commit:** cc5a0dc3c\n* **Session ID:** 7bef512f-1aca-4520-b1ea-a2e4623fea2e\n* **Operating System:** darwin v24.5.0\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto-gemini-3\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 358.4 MB\n* **Terminal Name:** iTerm2 3.5.14\n* **Terminal Background:** #000000\n* **Kitty Keyboard Protocol:** Supported\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 22779,
"title": "Gemini CLI is unresponsive",
"url": "https://github.com/google-gemini/gemini-cli/issues/22779",
"analysis": "The bug is located in `packages/core/src/tools/mcp-client-manager.ts`. The 'Context Refresh' message seen in the UI corresponds to the logic in this file, specifically around the `scheduleMcpContextRefresh` method and the `pendingRefreshPromise` state. The hang occurs because the MCP (Model Context Protocol) client manager likely lacks a timeout mechanism when communicating with external MCP servers or when resolving the refresh promise. If a server becomes unresponsive or a network error occurs that isn't properly caught and propagated, the `pendingRefreshPromise` remains unresolved, causing the CLI to wait indefinitely. Furthermore, the UI feedback loop is caused by the lack of error handling in the refresh cycle, which prevents the CLI from informing the user of the failure (e.g., a 429 or connection timeout).",
"effort_level": "medium",
"reasoning": "The issue involves resolving an infinite hang in an asynchronous flow within the McpClientManager. Fixing this requires implementing a timeout mechanism for the 'Context Refresh' promise and ensuring that errors are correctly propagated to the UI via event emitters. This aligns with the Medium criteria for handling asynchronous control flow and state synchronization across components.",
"validated": true
},
{
"body": "### What happened?\n\nSince yesterday, I have been unable to have a conversation, and uninstalling and reinstalling also didn't help.\nIt was working fine the day before, but after a Windows update and restart, it can no longer be used.\n[ACTION REQUIRED] \ud83d\udcce PLEASE ATTACH THE EXPORTED CHAT HISTORY JSON FILE TO THIS ISSUE IF YOU FEEL COMFORTABLE SHARING IT.\n\n### What did you expect to happen?\n\nMany of my project's historical conversations still need to be used\n\n### Client information\n\n\n* **CLI Version:** 0.33.1\n* **Git Commit:** f59f9e931\n* **Session ID:** 0a0e7bf9-9c73-49b7-8434-e74173dfd9c9\n* **Operating System:** win32 v20.11.1\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto-gemini-3\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 216.4 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** #0c0c0c\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 22596,
"title": "Since yesterday, I have been unable to have a conversation, and uninstalling and reinstalling also didn't help.",
"url": "https://github.com/google-gemini/gemini-cli/issues/22596",
"analysis": "Crash in YOLO mode when multiple file edits are pending, caused by a race condition in the `TaskDisplay` component trying to access a tool result that was cleared.",
"effort_level": "medium",
"reasoning": "The identified root cause is a race condition in the TaskDisplay component's state management (accessing tool results that may have been cleared). According to the criteria, fixing bugs involving React/Ink state synchronization and logic tracing across components falls under the Medium effort level. The previous Large classification based on the 'windows' keyword is likely an overestimation, as the technical fix is localized to UI logic rather than deep platform-specific subsystems like PTY or POSIX signal handling.",
"validated": true
},
{
"body": "## Bug Description\n\n `MessageBus.request()` contains a floating promise that causes two failure modes when `publish()`\n rejects:\n\n 1. The rejection is routed to `this.emit('error', error)` on the EventEmitter. If no `error`\n listener is registered at call time, Node.js throws an uncaught exception and **crashes the\n process**.\n 2. Even with an error listener, the `Promise` returned by `request()` silently hangs for the full\n 60-second timeout instead of failing fast \u2014 the caller gets no immediate signal that the publish\n failed.\n\n ## Root Cause\n\n In `packages/core/src/confirmation-bus/message-bus.ts`, inside the `new Promise()` constructor\n callback, `this.publish()` is not awaited and has no `.catch()` chain:\n\n ```typescript\n // eslint-disable-next-line @typescript-eslint/no-floating-promises,\n @typescript-eslint/no-unsafe-type-assertion\n this.publish({ ...request, correlationId } as TRequest);\n ```\n\n## Fix\n\nChain .catch(reject) on the publish call so any publish failure immediately cancels the timeout and rejects the caller. This affects any code path that calls messageBus.request() \u2014 including the planned STEP_THROUGH_REQUEST/RESPONSE flow in step-through mode, where a malformed message would deadlock the scheduler for 60 seconds.\n\n",
"number": 22588,
"title": "fix(core): MessageBus.request() silently hangs 60s when publish() fails",
"url": "https://github.com/google-gemini/gemini-cli/issues/22588",
"analysis": "In `packages/core/src/confirmation-bus/message-bus.ts`, the `MessageBus.request()` method creates a Promise but calls `this.publish()` without awaiting it or attaching a `.catch()`. If publish fails (e.g. due to policy engine rejection or validation error), the error is emitted on the bus but the Promise hangs until the 60s timeout.",
"effort_level": "small",
"reasoning": "The fix is highly localized to a single file (message-bus.ts) and addresses a clear root cause by adding a .catch(reject) handler to a floating promise. This falls under the criteria for a small effort task as it is a trivial logic adjustment with no complex state or architectural implications.",
"recommended_implementation": "In `packages/core/src/confirmation-bus/message-bus.ts`, change `this.publish({ ...request, correlationId } as TRequest);` to `this.publish({ ...request, correlationId } as TRequest).catch(reject);`.",
"validated": true
},
{
"body": "## Description\n\nGemini CLI 0.33.0 has a race condition where two concurrent startup tasks both create separate `ProjectRegistry` instances that write to the same `projects.json.tmp` file without locking, causing an ENOENT error on `rename`.\n\n## Error\n\n```\nFailed to save project registry to /home/runner/.gemini/projects.json: Error: ENOENT: no such file or directory, rename '/home/runner/.gemini/projects.json.tmp' -> '/home/runner/.gemini/projects.json'\n at async Object.rename (node:internal/fs/promises:777:10)\n at async ProjectRegistry.save (projectRegistry.js:73:13)\n at async ProjectRegistry.getShortId (projectRegistry.js:95:13)\n at async storage.js:167:38\n at async cleanupToolOutputFiles (sessionCleanup.js:268:13)\n at async Promise.all (index 1)\n at async main (gemini.js:215:5) {\n errno: -2,\n code: 'ENOENT',\n syscall: 'rename',\n path: '/home/runner/.gemini/projects.json.tmp',\n dest: '/home/runner/.gemini/projects.json'\n}\n```\n\n## Root Cause\n\nIn `gemini.tsx`, `main()` runs two cleanup functions concurrently:\n\n```js\nawait Promise.all([\n cleanupCheckpoints(), // index 0\n cleanupToolOutputFiles(settings), // index 1\n]);\n```\n\nBoth create separate `Storage` \u2192 `ProjectRegistry` instances targeting the same `~/.gemini/projects.json`. When the registry file doesn't exist (fresh install, CI environment), both enter the unguarded `save()` path in `getShortId()`:\n\n```ts\n// getShortId() \u2014 line 115-117\nif (!fs.existsSync(this.registryPath)) {\n await this.save({ projects: {} }); // No lock held yet!\n}\n\n// The proper-lockfile lock only engages AFTER this initial save:\nconst release = await lock(this.registryPath, { ... });\n```\n\nBoth `save()` calls write to the same `projects.json.tmp` path:\n\n1. **A**: `writeFile('projects.json.tmp')` \u2192 succeeds\n2. **B**: `writeFile('projects.json.tmp')` \u2192 overwrites A's file\n3. **A**: `rename('projects.json.tmp', 'projects.json')` \u2192 succeeds, tmp file gone\n4. **B**: `rename('projects.json.tmp', 'projects.json')` \u2192 **ENOENT** \u2014 A already renamed it\n\n## Reproduction\n\nThis reliably reproduces in CI (GitHub Actions) on a fresh runner where `~/.gemini/projects.json` doesn't exist. Run any gemini command including `gemini --version`.\n\n## Suggested Fixes\n\nAny of these would resolve it:\n\n1. **Share a single `Storage`/`ProjectRegistry` instance** across both cleanup calls instead of creating two independent ones\n2. **Use a unique tmp file name** in `ProjectRegistry.save()` (e.g., `projects.json.${process.pid}.${Date.now()}.tmp`) to avoid collisions\n3. **Acquire the lock before the initial save** in `getShortId()`, not after\n\n## Current Workaround\n\nPre-seed the file before invoking any gemini command:\n\n```bash\nmkdir -p \"${HOME}/.gemini\"\necho '{\"projects\":{}}' > \"${HOME}/.gemini/projects.json\"\n```\n\n## Environment\n\n- Gemini CLI version: 0.33.0\n- Node.js: 20.20.0\n- OS: Ubuntu 24.04 (GitHub Actions runner)\n",
"number": 22583,
"title": "Race condition in ProjectRegistry.save() causes ENOENT during concurrent startup cleanup",
"url": "https://github.com/google-gemini/gemini-cli/issues/22583",
"analysis": "PTY Master Device exhaustion on macOS caused by unclosed file descriptors after shell tool execution.",
"effort_level": "medium",
"reasoning": "The issue involves a race condition in file I/O where concurrent processes or tasks collide while writing to the project registry. Resolving this requires implementing state synchronization or file-locking mechanisms to coordinate asynchronous flows, which aligns with the Medium effort criteria for logic tracing and async control flow resolution.",
"validated": true
},
{
"body": "### What happened?\n\nI ask the AI to write the content of the .md file the AI generated itself, that i didn't modified, into the console. It wrote the content of the file, flickered a whole lot then stop and display the last line twice. I had it read the file again and it did it again.\n\n[bug-report-history-1773605747449.json](https://github.com/user-attachments/files/26008555/bug-report-history-1773605747449.json)\n\n<img width=\"2440\" height=\"1422\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/7f9f649e-2836-49eb-8fce-6aa477b024e3\" />\n\n### What did you expect to happen?\n\nI was expecting the CLI to not display duped lines.\n\n### Client information\n\n\n* **CLI Version:** 0.33.1\n* **Git Commit:** f59f9e931\n* **Session ID:** 3ebcdbd6-346f-4b94-8daf-cbb2a8f67811\n* **Operating System:** win32 v24.14.0\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto-gemini-3\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 652.6 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** #0c0c0c\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\nI'm using google account as login.\n\n### Anything else we need to know?\n\n_No response_",
"number": 22566,
"title": "Last line is displayed two in the console.",
"url": "https://github.com/google-gemini/gemini-cli/issues/22566",
"analysis": "When displaying large blocks of text (like file contents) in the console on Windows, the final line is duplicated. This is likely a TUI rendering bug in Ink or `packages/cli/src/ui/utils/MarkdownDisplay.tsx` related to how terminal width wrapping and CRLF (`\\r\\n`) line endings are calculated, causing the cursor to jump and draw the last line twice.",
"effort_level": "medium",
"reasoning": "This issue involves terminal rendering artifacts and state synchronization within the React/Ink framework, specifically on Windows. Debugging layout flickering and duplicated lines requires tracing the interaction between the Markdown parser, terminal width calculations, and CRLF line endings, which aligns with the Medium effort criteria for logic tracing and UI state management.",
"validated": true
},
{
"body": "### What happened?\n\n**1. MemoryTool static allowlist \u2014 silent memory writes across projects**\nThe confirmation allowlist for the `save_memory` tool is a static class property, meaning it survives the entire process lifetime. If you approve memory writes with \"Always Allow\" in one project session and then open a different project in the same terminal, the AI can silently write to your global `~/.gemini/GEMINI.md` file without asking again. That file feeds into every future Gemini CLI session, so the impact is permanent and cross-project.\n\n**2. Chat compression ignores Ctrl+C**\nWhen automatic context compression runs, both of its LLM calls (summary + verification) create a new throwaway `AbortController` internally if no signal was passed. Since nothing holds a reference to that controller, user cancellation via Ctrl+C has no effect \u2014 both calls keep running until they finish or time out on their own. The user sees the CLI appear frozen with no way to interrupt it.\n\n**3. ReadManyFiles opens all files at once**\nWhen the AI uses `read_many_files` on a large codebase with a broad glob pattern, every matched file gets opened simultaneously through an unbounded `Promise.allSettled`. On Linux the default file handle limit is 1024. If more files match, some reads silently fail and show up in the \"skipped\" list with a cryptic error, giving the AI an incomplete and misleading view of the codebase.\n\n**4. ToolOutputMasking writes files one by one and never deletes them**\nWhen the system decides to offload large tool outputs to disk to free up context, it writes each file in a sequential loop \u2014 one disk write at a time \u2014 blocking the agent loop. More importantly, there is no cleanup. Every offloaded file stays on disk indefinitely. Over a long autonomous session these files can accumulate several gigabytes silently, with no size cap or eviction policy.\n\n**5. Grep JavaScript fallback loads entire files into memory**\nOn Windows and sandboxed environments where neither `git grep` nor system `grep` is available, the tool falls back to a pure JavaScript implementation that reads every file completely into memory as a string before scanning a single line. On large generated files or bundled outputs, this causes significant unnecessary memory allocation \u2014 especially since the match might be on the first few lines of a massive file.\n\n**6. ChatRecordingService blocks the event loop on every tool call**\nThe session recording service uses synchronous `writeFileSync` to save conversation data to disk after every single tool call \u2014 not async, not debounced, not batched. On slow disks, network mounts, or Docker volumes with sluggish I/O, this directly adds latency between every tool response. There is also a full string equality check on potentially megabyte-sized JSON strings before every write, even when nothing changed.\n\n**7. EditTool is vulnerable to file changes between showing a diff and applying it**\nWhen the user is shown a confirmation diff for an edit, the file is read from disk. When the user clicks approve, the file is read from disk again. If a formatter, build tool, or parallel agent modifies the file in between \u2014 which is very common with auto-formatters in IDEs \u2014 the edit gets applied to a different version of the file than what was shown in the diff. The user approved one thing; something different gets written. There is no warning.\n\n**8. GrepTool re-checks if `git` and `grep` are installed on every single call**\nBefore every grep operation, the tool spawns a child process just to check whether `git` and `grep` exist on the system. These binaries do not change during a session, but the check happens with no cache. In an agentic session where grep is called 30\u201340 times during codebase exploration, this spawns 60\u201380 unnecessary processes purely for availability checks.\n\n\n### What did you expect to happen?\n\nHere is what should have happened for each:\n\n---\n\n**1. MemoryTool allowlist**\nApproving memory writes in one project should never carry over to another. Each session or project context should start fresh, requiring the user to approve again. The \"Always Allow\" setting should either be scoped to the current session or stored through the proper policy engine with a clear scope boundary.\n\n**2. Chat compression abort signal**\nPressing Ctrl+C should cancel everything in progress, including compression. The signal the user triggers should propagate all the way into the LLM calls so they stop immediately, not continue running invisibly in the background.\n\n**3. ReadManyFiles concurrency**\nFile reads should be processed in controlled batches so the number of open file handles stays within OS limits. Files that get skipped should have a clear reason \u2014 not a generic error that blends in with permission issues \u2014 and the user should know if the result is incomplete because of a resource limit.\n\n**4. ToolOutputMasking writes and cleanup**\nDisk writes for offloaded tool outputs should run in parallel so the agent loop is not held up waiting for each one to finish. There should also be a reasonable cap on how much disk space the offloaded files can use, with old files being cleaned up when the history entries they correspond to are no longer active.\n\n**5. Grep file reading**\nThe JavaScript fallback should read files line by line as a stream, stopping as soon as a match is found or the per-file limit is hit. It should not load entire files into memory just to check a few lines. It should also skip opening files entirely once the overall match limit has already been reached.\n\n**6. ChatRecording writes**\nSession writes should be async and debounced so that multiple rapid updates within a single agent turn get flushed to disk as one write, not one per update. The change detection before writing should use a simple dirty flag rather than comparing two potentially large strings every time.\n\n**7. EditTool confirmation race**\nIf the underlying file changes between when the diff is shown and when the user approves, the tool should detect that and warn the user before proceeding. It should either show the updated diff and ask again, or at minimum clearly state that the file was modified since the diff was generated and ask whether to continue.\n\n**8. GrepTool availability checks**\nThe result of checking whether `git` and `grep` are installed should be stored after the first check and reused for all subsequent calls in the same session. The same applies to checking whether a directory is a git repository. Neither of these facts changes mid-session, so there is no reason to re-check them on every grep invocation.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n# paste output here\n```\nAbout Gemini CLI \u2502\n\u2502 \u2502\n\u2502 CLI Version 0.35.0-nightly.20260313.bb060d7a9 \u2502\n\u2502 Git Commit 6061d8cac \u2502\n\u2502 Model Auto (Gemini 3) \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS win32 \u2502\n\u2502 Auth Method Signed in with Google \u2502\n\u2502 Tier Gemini Code Assist in Google One AI Pro \u2502\n\u2502 IDE Client Antigravity \u2502\n\u2502 \n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\nThese 8 issues collectively degrade the CLI's performance, stability, and security\u2014especially during long automated sessions, on large codebases, or in constrained environments (like Windows, sandboxes, or network drives). They include memory leaks, uncancellable background tasks, unconstrained concurrency (causing OS-level file limit crashes), cross-session memory pollution, I/O bottlenecks, and unhandled file modifications during edits. The proposed fixes are generally small and targeted (15\u201340 lines per issue) and do not require major architectural changes, but they are critical for making the tool robust and enterprise-ready.",
"number": 22560,
"title": "# Bug Report: Multiple Issues Found Across Core Services and Tools",
"url": "https://github.com/google-gemini/gemini-cli/issues/22560",
"analysis": "Two distinct bugs: 1) `MemoryToolInvocation.allowlist` is a `static` property in `packages/core/src/tools/save-memory.ts`, causing approvals to persist across different projects if the CLI process is kept alive (e.g., via ACP or a daemon). 2) Chat compression in `packages/core/src/services/summarizer.ts` instantiates a new `AbortController` but fails to link it to the user's cancellation signal (Ctrl+C).",
"effort_level": "medium",
"reasoning": "The fix requires addressing two distinct issues across core services: state management for the MemoryTool (moving a static property to a session-scoped instance to prevent cross-project leakage) and asynchronous flow control for the summarizer (ensuring AbortSignals are correctly propagated to prevent frozen CLI states). These tasks involve logic tracing and state synchronization across multiple components, fitting the Medium effort criteria.",
"validated": true
},
{
"body": "### What happened?\n\nWhen running Gemini CLI in local development mode via `npm run start`, the CLI silently hangs after displaying the ASCII art header if any environment variable with a `CI_` prefix (e.g. `CI_TOKEN`, `CI_ENVIRONMENT`) is set in the shell.\n\nThe root cause is the `is-in-ci` package used internally by the `ink` UI framework. When `is-in-ci` detects a `CI`, `CONTINUOUS_INTEGRATION`, or any `CI_*` prefixed env var, it returns `true`, and `ink` switches to non-interactive mode \u2014 suppressing all input handling and rendering.\n\nPR #4822 fixed this for the **bundled** application by patching `is-in-ci` at esbuild build time via an alias that always returns\n`false`. However, the PR description explicitly notes:\n\n> \"This patch only affects the bundled application and does not apply\n> when running in local development mode via `npm run start`.\"\n\nSo the fix is **incomplete**. Any contributor or developer working on gemini-cli locally with a `CI_TOKEN` or similar variable in their environment will still experience the exact same hang that #1563 reported \u2014 just via a different code path.\n\n**Steps to reproduce:**\n1. Clone the repo: `git clone https://github.com/google-gemini/gemini-cli`\n2. Install dependencies: `npm install && npm run build`\n3. Set a CI_ prefixed env var: `export CI_TOKEN=anything`\n4. Run in dev mode: `npm run start`\n5. Observe: the ASCII art header appears, no input prompt is shown,\n the process hangs indefinitely and must be killed with Ctrl+C.\n\nThe bundled path is **not** affected:\n```bash\nnpm run bundle && node bundle/gemini.js # works correctly\n```\nOnly `npm run start` (ts-node / tsx direct execution) is affected\nbecause the esbuild alias shim is never applied in that path.\n\n### What did you expect to happen?\n\nRunning `npm run start` with a `CI_TOKEN` (or any `CI_*` prefixed) env var present in the shell should behave identically to the bundled build \u2014 the interactive prompt should appear and accept input normally.\n\nIdeally, if CI-related vars are detected and scrubbed at startup, a clear warning should be printed to stderr explaining what was removed and why, so developers are not confused about why their `CI_TOKEN` variable is absent in child processes. For example:\n\n [gemini] Removed CI-related env vars to ensure interactive mode:\n CI_TOKEN, CI_ENVIRONMENT [gemini] These variables are still available in processes spawned by shell tools. Pass --no-interactive-check to suppress this.\n\nThis turns a completely silent, confusing hang into an actionable, debuggable message.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n> /about\nReproducible on all platforms (macOS, Windows, Linux) wherever\n`npm run start` is used. Not dependent on a specific Gemini CLI\nrelease version \u2014 affects the `main` branch directly.\n\nPlatform confirmed: macOS (zsh), Linux (bash).\n\n(Running `npm run start` in dev mode does not produce `/about` output\nsince the CLI hangs before the prompt loads. Issue is reproducible\nfrom a clean clone on Node.js >= 20.0.0.)\n\n</details>\n\n### Login information\n\nNot login-dependent. The hang occurs before any authentication prompt is shown, regardless of auth method (Google OAuth, API key, or Vertex AI). Reproducible without any credentials configured.\n\n### Anything else we need to know?\n\n_No response_",
"number": 22452,
"title": "BUG: CI_* env var scrub not applied in dev mode (`npm run start`) \u2014 interactive mode hangs",
"url": "https://github.com/google-gemini/gemini-cli/issues/22452",
"analysis": "When running in developer mode, the CLI bypasses certain CI environment scrubbing steps, potentially leaking secrets or local paths into logs.",
"effort_level": "small",
"reasoning": "The fix is highly localized to the application entry point. It requires a simple programmatic scrub of environment variables (e.g., deleting keys starting with 'CI_') from process.env before the Ink UI framework is initialized. This is a straightforward logic adjustment in a single file and does not involve complex architectural changes or deep platform-specific PTY management.",
"validated": true,
"recommended_implementation": "In `src/index.ts`, add a block at the top of the file that iterates through `Object.keys(process.env)` and deletes any keys starting with `CI_` or named `CI` or `CONTINUOUS_INTEGRATION` before the Ink UI is initialized."
},
{
"body": "### What happened?\n\nDuring an active CLI session, if the workspace configuration is hot-reloaded (for example, via the onReload callback in packages/cli/src/config/config.ts), the system silently drops changes to the model and hooks settings.\n\nThis occurs because the ReloadResult interface in packages/core/src/config/config.ts acts as an overly restrictive bottleneck. It currently only permits disabledSkills, adminSkillsEnabled, and agents to pass through the hydration path.\n\nAs a result, if a user modifies their .gemini/settings.json mid-session to change the active model or update workspace hook definitions, the CLI config parser correctly detects the file system change, but the Config class drops the payloads during the hot-reload cycle because of the constrained return type.\n\n### What did you expect to happen?\n\nI expected that modifying the model or hooks configuration in .gemini/settings.json during an active session would dynamically update the running CLI instance without requiring a hard restart. The user expects their settings to be fully atomic and dynamically applied. Dropping the model and hooks state forces the user into a silent state corruption scenario.\n\n### Client information\n\ngemini v0.30.0-nightly.20260210.a2174751d Node.js: v20.19.0 OS: Windows_NT 10.0.22631 x64\n\n### Login information\n\ngoogle account\n\n### Anything else we need to know?\n\n I have already traced the data flow and understand the fix:\n\nExpand the ReloadResult interface to include the missing top-level config fields (model and hooks).\nPlumb the new fields through the Config class hydration pipeline (similar to how reloadSkills operates) so the instance state is properly updated.\nEnsure the onReload callback in the CLI package returns the complete payload.\nI have a surgical fix prepared locally with unit tests targeting packages/core/src/config/config.test.ts that verifies the end-to-end hot-reload state persistence. I will open a Pull Request momentarily to link to this issue.\n\n",
"number": 22432,
"title": "Architectural Flaw: ReloadResult truncates model and hooks state during onReload hot-reload",
"url": "https://github.com/google-gemini/gemini-cli/issues/22432",
"analysis": "The `ReloadResult` returned by the agent configuration reload logic is too restrictive, truncating important session or state data.",
"effort_level": "medium",
"reasoning": "The issue involves state synchronization during a hot-reload cycle. While the fix involves expanding the ReloadResult interface, it requires validating the hydration path to ensure that runtime state for models and hooks is correctly updated and synchronized across the CLI session, which aligns with the Medium criteria for state management and logic tracing.",
"validated": true
},
{
"body": "### What happened?\n\nMid-session, the Gemini CLI crashed with a React error: `Maximum update depth exceeded`. \n\nBased on the stack trace, the error originates from `ScrollProvider.unregister` and `useScrollable`. This happens when a component using the `useScrollable` hook passes an unmemoized `entry` object, causing the effect in `useScrollable` to trigger on every render, leading to a re-registration loop with `ScrollProvider`.\n\n```text\nERROR Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.\n\n/home/aniket/.nvm/versions/node/v22.22.0/lib/node_modules/@google/gemini-cli/node_modules/react-reconciler/cjs/react-reconciler.development.js:2752:11\n\n2749: throw (\n2750: ((nestedPassiveUpdateCount = nestedUpdateCount = 0),\n2751: (rootWithPassiveNestedUpdates = rootWithNestedUpdates = null),\n2752: Error(\n2753: \"Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.\"\n2754: ))\n2755: );\n\n - getRootForUpdatedFiber (/home/aniket/.nvm/versions/node/v22.22.0/lib/node_modules/@google/gemini-cli/node_modules/react-reconciler/cjs/react-reconciler.development.js:2752:11)\n - enqueueConcurrentHookUpdate (/home/aniket/.nvm/versions/node/v22.22.0/lib/node_modules/@google/gemini-cli/node_modules/react-reconciler/cjs/react-reconciler.development.js:2712:14)\n - dispatchSetStateInternal (/home/aniket/.nvm/versions/node/v22.22.0/lib/node_modules/@google/gemini-cli/node_modules/react-reconciler/cjs/react-reconciler.development.js:4602:18)\n - dispatchSetState (/home/aniket/.nvm/versions/node/v22.22.0/lib/node_modules/@google/gemini-cli/node_modules/react-reconciler/cjs/react-reconciler.development.js:4563:7)\n - Object.unregister (file:///home/aniket/.nvm/versions/node/v22.22.0/lib/node_modules/@google/gemini-cli/dist/src/ui/contexts/ScrollProvider.js:34:9)\n - (file:///home/aniket/.nvm/versions/node/v22.22.0/lib/node_modules/@google/gemini-cli/dist/src/ui/contexts/ScrollProvider.js:236:25)\n - react-stack-bottom-frame (/home/aniket/.nvm/versions/node/v22.22.0/lib/node_modules/@google/gemini-cli/node_modules/react-reconciler/cjs/react-reconciler.development.js:15957:13)\n - runWithFiberInDEV (/home/aniket/.nvm/versions/node/v22.22.0/lib/node_modules/@google/gemini-cli/node_modules/react-reconciler/cjs/react-reconciler.development.js:1735:30)\n - commitHookEffectListUnmount (/home/aniket/.nvm/versions/node/v22.22.0/lib/node_modules/@google/gemini-cli/node_modules/react-reconciler/cjs/react-reconciler.development.js:9607:17)\n - commitHookPassiveUnmountEffects (/home/aniket/.nvm/versions/node/v22.22.0/lib/node_modules/@google/gemini-cli/node_modules/react-reconciler/cjs/react-reconciler.development.js:9654:11)\n```\n\n### What did you expect to happen?\n\nThe CLI should handle continuous UI updates and terminal resizing without crashing. \n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\n**OS:** Linux (Ubuntu 24.04.1 LTS, Kernel 6.17.0-14-generic)\n**Node Version:** v22.22.0\n**NPM Version:** 10.9.4\n\n</details>\n\n```console\n> /about\nAbout Gemini CLI \nCLI Version 0.33.1 \nGit Commit f59f9e931 \nModel Auto (Gemini 3) \nSandbox no sandbox \nOS linux \nAuth Method Logged in with Google \nTier Gemini Code Assist in Google One AI Pro \n```\n\n</details>\n\n### Login information\n\nGoogle Account with AI pro plan.\n\n### Anything else we need to know?\n\nThis issue happened only when I used conductor extension twice in one day. ",
"number": 22409,
"title": "CLI Crash with \"Maximum update depth exceeded\"",
"url": "https://github.com/google-gemini/gemini-cli/issues/22409",
"analysis": "An infinite re-render loop occurs in the `ScrollProvider` when new history items are added, caused by an unstable `entry` object being passed to the `useScrollable` hook.",
"effort_level": "medium",
"reasoning": "The issue involves debugging and fixing a React state synchronization loop within the Ink framework, specifically involving useEffect and useMemo hooks. According to the criteria, React/Ink state management and UI synchronization issues are classified as Medium effort.",
"validated": true
},
{
"body": "### What happened?\n\nHi,\n\nI'm getting:\n```\n\u26a0 Warning you are running Gemini CLI in your home directory.\n This warning can be disabled in /settings\n```\n\nEven when launching Gemini CLI after cd'ing into:\n/home/user/my-programming/gemini-cli/\n\n\n\n### What did you expect to happen?\n\nShould that warning be present even when running two folders deep under the home dir?\nI don't understand what else is expected, are we meant to be running gemini out of project setup below / ?\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n\u2502 About Gemini CLI \u2502\n\u2502 \u2502\n\u2502 CLI Version 0.33.1 \u2502\n\u2502 Git Commit f59f9e931 \u2502\n\u2502 Model Auto (Gemini 3) \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS linux \u2502\n\u2502 Auth Method Logged in with Google (auth@auth) \u2502\n\u2502 Tier Gemini Code Assist in Google One AI Pro \n```\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 22309,
"title": "Home Dir Warning - Even when in subfolder of home dir?",
"url": "https://github.com/google-gemini/gemini-cli/issues/22309",
"analysis": "The user receives a 'home directory' warning even when in a subfolder because they have likely set the `GEMINI_CLI_HOME` environment variable to their project directory. The `getUserStartupWarnings` function compares `process.cwd()` to `homedir()`. Since `homedir()` is imported from `@google/gemini-cli-core/paths.ts` (which respects `GEMINI_CLI_HOME`), they evaluate as equal, triggering the false positive.",
"effort_level": "small",
"reasoning": "The issue is a localized logic error in 'userStartupWarnings.ts'. The warning triggers because the 'homedir()' utility function respects the 'GEMINI_CLI_HOME' environment variable, which users often set to their project directory. Replacing the custom 'homedir()' call with the native 'os.homedir()' for this specific security check is a trivial fix constrained to a single file.",
"recommended_implementation": "In `packages/cli/src/utils/userStartupWarnings.ts`, change the import of `homedir` from `@google/gemini-cli-core` to `import * as os from 'node:os'` and use `os.homedir()` in the `homeDirectoryCheck`.",
"validated": true
},
{
"body": "### What happened?\n\n I am running Gemini CLI inside WSL2 Ubuntu on a Windows 11 host, launched from Windows Terminal.\n\n When I copy an image on Windows and press `Alt+V` inside `gemini` running in WSL2, image paste fails.\n\n After debugging, I found that in this WSL2 environment:\n\n - `XDG_SESSION_TYPE` is unset\n - `WAYLAND_DISPLAY=wayland-0`\n - `DISPLAY=:0`\n\n When an image is copied on Windows, the Linux clipboard side exposes `image/bmp` rather than `image/png`.\n\n This suggests Gemini CLI's Linux clipboard image handling is not fully compatible with this WSL2 case.\n\n### What did you expect to happen?\n\n I expected `Alt+V` image paste to work in WSL2 when the clipboard contains an image.\n\n Gemini CLI should ideally:\n\n - detect the clipboard backend even when `XDG_SESSION_TYPE` is unset\n - fall back to `WAYLAND_DISPLAY` / `DISPLAY` in WSL2-like environments\n - accept the actual image MIME type exposed by `wl-paste` / `xclip`\n - handle `image/bmp` gracefully, for example by converting it internally to PNG before attaching\n\n### Client information\n\n Client information\n\n CLI Version: 0.33.1\n Platform: Linux\n OS: Ubuntu 24.04.3 LTS\n Kernel: Linux momo 6.6.87.2-microsoft-standard-WSL2 #1 SMP PREEMPT_DYNAMIC Thu Jun 5 18:30:46 UTC 2025 x86_64 GNU/Linux\n Sandbox Environment: no sandbox\n Model Version: auto-gemini-3 (configured)\n Selected Auth Type: oauth-personal\n GCP Project: [not set]\n IDE Client: [none]\n User Email: ***@gmail.com\n\n Additional environment:\n - Host OS: Windows 11\n - Terminal: Windows Terminal\n - TERM=xterm-256color\n - XDG_SESSION_TYPE is unset\n - WAYLAND_DISPLAY=wayland-0\n - DISPLAY=:0\n\n Clipboard behavior observed during reproduction:\n - When an image is copied on Windows, the Linux clipboard side exposes `image/bmp`\n\n### Login information\n\n Google Account login (`oauth-personal`)\n\n### Anything else we need to know?\n\n### Steps to reproduce\n\n 1. Copy an image into the Windows clipboard\n 2. Open Windows Terminal\n 3. Enter WSL2 Ubuntu\n 4. Run:\n ```bash\n echo \"XDG_SESSION_TYPE=$XDG_SESSION_TYPE\"\n echo \"WAYLAND_DISPLAY=$WAYLAND_DISPLAY\"\n echo \"DISPLAY=$DISPLAY\"\n wl-paste --list-types\n\n 5. Start Gemini CLI:\n\n gemini\n 6. Press Alt+V\n\n ### Notes\n\n A local compatibility patch that:\n\n - falls back to WAYLAND_DISPLAY / DISPLAY when XDG_SESSION_TYPE is unset\n - accepts image/bmp and converts it internally to PNG\n\n made the same workflow work correctly in the same environment.\n\n The same Windows clipboard image became attachable in the same WSL2 environment after that local compatibility patch. This makes the issue look like a Gemini CLI Linux/WSL\n clipboard compatibility gap rather than a Windows clipboard bridge problem.",
"number": 22274,
"title": "Bug: image paste fails in WSL2 when clipboard exposes image/bmp and XDG_SESSION_TYPE is unset",
"url": "https://github.com/google-gemini/gemini-cli/issues/22274",
"analysis": "In WSL2, `XDG_SESSION_TYPE` is often unset, causing `getUserLinuxClipboardTool` in `packages/cli/src/ui/utils/clipboardUtils.ts` to fail to detect a clipboard. Furthermore, Windows clipboard images are exposed to WSL2 as `image/bmp`, but `saveClipboardImage` hardcodes `--type image/png` for `wl-paste`.",
"effort_level": "medium",
"reasoning": "The fix requires modifying environment variable detection logic to handle cases where XDG_SESSION_TYPE is unset (common in WSL2) and updating the clipboard tool execution logic to support 'image/bmp'. This involves logic tracing within clipboardUtils.ts and requires careful validation across different display server environments (Wayland/X11) to ensure robust cross-platform behavior.",
"validated": true
},
{
"body": "### What happened?\n\nI didn't respond to the agent's request to write a file to disk, and it crashed with a \"promise failed\" error.\n\n[bug-report-history-1773349387161.json](https://github.com/user-attachments/files/25951219/bug-report-history-1773349387161.json)\n\n\n\n### What did you expect to happen?\n\nFor the CLI app to wait for me to respond to the query. \n\n### Client information\n\n\n* **CLI Version:** 0.33.0\n* **Git Commit:** 6ee19e1f6\n* **Session ID:** eb3ff3a7-7549-4747-ae79-bf962dffe3c8\n* **Operating System:** darwin v23.9.0\n* **Sandbox Environment:** no sandbox\n* **Model Version:** gemini-3.1-pro-preview\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 326.3 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** #181818\n* **Kitty Keyboard Protocol:** Unsupported\n* **IDE Client:** Antigravity\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\nThe ability to pipe files into the CLI as the prompt has stopped working.\nThis no longer works: `% gemini -m gemini-3.1-pro-preview < MyPrompt.txt`\nThis is also not working very well: `% cat MyPrompt.txt | gemini -m gemini-3.1-pro-preview`",
"number": 22219,
"title": "failure to respond to a request for user input causes \"Promise\" crash",
"url": "https://github.com/google-gemini/gemini-cli/issues/22219",
"analysis": "When a tool request requires user confirmation (like `ask_user` or file edits) and times out or gets aborted, the resulting promise rejection is not caught within the asynchronous execution chain of the `CoreToolScheduler`, leading to a process-crashing Unhandled Promise Rejection.",
"effort_level": "medium",
"reasoning": "The issue involves resolving an unhandled promise rejection within an asynchronous control flow, specifically where the CoreToolScheduler awaits user input. According to the criteria, managing async flow and fixing unhandled rejections across service integrations (scheduler to UI) requires logic tracing and state synchronization, placing it in the Medium category.",
"validated": true
},
{
"body": "### What happened?\n\nCurrently, running `gemini extensions link <path>` returns a non-zero exit code and the message `\"is already installed. Please uninstall it first.\"` if the extension is already present.\n\nThis makes it difficult to use the command in automated setup scripts that run with `set -e`, as the script will crash unless the output/exit code is explicitly caught and parsed.\n\n### What did you expect to happen?\n\nTo make the command idempotent, `gemini extensions link` should return a `0` exit code when the desired state (the extension being linked/installed) is already met. \n\nIf it's important to notify the user that it was already installed, a warning message to `stdout` or `stderr` alongside the `0` exit code would be much more scripting-friendly than a hard failure.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n\u2502 CLI Version 0.34.0-nightly.20260304.28af4e127-git.0486a16 \u2502\n\u2502 Git Commit 0486a16 \u2502\n\u2502 Model gemini-3-flash-preview \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS linux \n```\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 22125,
"title": "`gemini extensions link` should return exit code 0 if extension is already installed",
"url": "https://github.com/google-gemini/gemini-cli/issues/22125",
"analysis": "The `extensions link` command attempts to create a symlink even if one already exists, resulting in an 'EEXIST' error and command failure.",
"effort_level": "small",
"reasoning": "This is a highly localized logic fix within the extension linking command handler. It involves adding a simple check for an existing symlink or handling the EEXIST error to ensure idempotency, which fits the criteria for trivial logic adjustments in 1-2 files.",
"validated": true,
"recommended_implementation": "In the `link` command handler within the extensions logic, check if the target extension path already exists using `fs.existsSync()`. If it exists, log a warning message stating the extension is already installed and return successfully instead of throwing an error."
},
{
"body": "## Bug Description\n\n`CoreToolScheduler.handleConfirmationResponse()` in `coreToolScheduler.ts` receives a `payload` parameter but never passes it to `originalOnConfirm()`. This means external integrations (non-TUI) that use the `onConfirm(outcome, payload)` callback to pass user answers for `ask_user` tool calls never get the answers through.\n\n## Steps to Reproduce\n\n1. Use `CoreToolScheduler` with a non-TUI confirmation handler (e.g., web UI, API)\n2. `ask_user` tool fires, `confirmationDetails.onConfirm` is wrapped by `handleConfirmationResponse`\n3. External code calls `wrappedOnConfirm(ProceedOnce, { answers: {\"0\": \"user's choice\"} })`\n4. `handleConfirmationResponse` calls `originalOnConfirm(outcome)` \u2014 drops `payload`\n5. `AskUserInvocation.userAnswers` stays `{}`, tool returns \"User submitted without answering questions\"\n\n## Root Cause\n\nIn `coreToolScheduler.ts`, `handleConfirmationResponse`:\n\n```typescript\nasync handleConfirmationResponse(callId, originalOnConfirm, outcome, signal, payload) {\n // ...\n await originalOnConfirm(outcome); // <-- payload is dropped here\n // ...\n}\n```\n\n## Fix\n\n```typescript\nawait originalOnConfirm(outcome, payload);\n```\n\n## Why it works in the TUI\n\nThe TUI's `InkConfirmationManager` sets `userAnswers` directly on the `AskUserInvocation` object via the React component state, bypassing `onConfirm`'s payload entirely. So this bug is invisible in the terminal but breaks all external integrations.\n\n## Affected versions\n\nConfirmed in 0.32.1 and 0.33.0.",
"number": 22120,
"title": "CoreToolScheduler.handleConfirmationResponse drops payload for ask_user tool",
"url": "https://github.com/google-gemini/gemini-cli/issues/22120",
"analysis": "`CoreToolScheduler` incorrectly drops the payload during `ask_user` tool confirmations. This happens because the `originalOnConfirm` callback in `packages/core/src/scheduler/confirmation.ts` is called without the necessary user-provided response object.",
"effort_level": "small",
"reasoning": "The issue is a highly localized logic fix in a single file (coreToolScheduler.ts). It involves passing an existing 'payload' parameter to a callback function that was previously omitting it. This fits the criteria for a small effort task as it has a clear root cause and requires minimal code changes.",
"validated": true,
"recommended_implementation": "In `coreToolScheduler.ts`, update the `handleConfirmationResponse` method to pass the `payload` parameter to the `originalOnConfirm` callback by changing the call from `originalOnConfirm(outcome)` to `originalOnConfirm(outcome, payload)`."
},
{
"body": "## What happened?\n\nTest suites are creating temporary directories but not cleaning them up after test completion, leading to:\n\n1. **Disk space waste**: ~6-8 temporary directories left behind per full test run (~50-100MB)\n2. **Cluttered file system**: Hundreds of directories accumulate over time in the OS temp folder\n3. **Potential test interference**: Leftover directories from previous runs could affect subsequent tests\n4. **Developer confusion**: Developers see mysterious temp directories and don't know if they're safe to delete\n\n### Root Causes Identified:\n\n**1. Missing cleanup in afterEach hooks** (3 test files affected):\n- `packages/core/src/tools/mcp-client.test.ts` - 4 describe blocks creating `testWorkspace` without cleanup\n- `packages/cli/src/config/extension-manager-scope.test.ts` - Creating 2 temp directories with no cleanup\n- `packages/cli/src/commands/extensions/configure.test.ts` - Creating workspace directory without cleanup\n\n**Note**: `packages/cli/src/config/extension-manager.test.ts` was initially flagged but is actually correct - `tempWorkspaceDir` is nested inside `tempHomeDir`, which is already deleted recursively in the existing afterEach.\n\n**2. Memory leaks**:\n- `WorkspaceContext` objects created in `beforeEach` but never cleaned up in mcp-client.test.ts\n- Event listeners and directory references held in memory across test runs\n\n**3. Misleading documentation**:\n- extension-manager-scope.test.ts had incorrect comments claiming parent/child relationship when directories are actually siblings\n\n### Example of the issue:\n\n```typescript\n// In mcp-client.test.ts\nbeforeEach(() => {\n testWorkspace = fs.mkdtempSync(path.join(os.tmpdir(), 'gemini-agent-test-'));\n workspaceContext = new WorkspaceContext(testWorkspace);\n});\n\nafterEach(async () => {\n vi.restoreAllMocks(); // Mocks restored first\n vi.useRealTimers();\n // NO CLEANUP OF testWorkspace OR workspaceContext!\n});\n```\n\nAfter running tests multiple times, the temp directory contains:\n```\n/tmp/gemini-agent-test-abc123/\n/tmp/gemini-agent-test-def456/\n/tmp/gemini-agent-test-ghi789/\n... (hundreds more)\n```\n\n### What did you expect to happen?\n\nAll temporary directories created during tests should be automatically cleaned up in `afterEach` hooks, leaving no trace after test completion.\n\nExpected behavior:\n1. Temp directories created in `beforeEach`\n2. Tests run using those directories\n3. `afterEach` cleans up ALL temp directories and object references\n4. No leftover directories in OS temp folder\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\n**Platform**: Windows 11 \n**Shell**: bash \n**Node Version**: v20.x (from .nvmrc) \n**Test Framework**: Vitest 3.2.4\n\nProject: `@google/gemini-cli@0.35.0-nightly.20260311.657f19c1f`\n\n</details>\n\n### Login information\n\nN/A - This is a test infrastructure issue, not related to authentication.\n\n### Anything else we need to know?\n\n### Impact Assessment:\n- **Severity**: Medium (doesn't break functionality but wastes resources)\n- **Frequency**: Every test run\n- **Affected Tests**: 3 test files with missing cleanup, ~50+ test files with proper cleanup\n- **Disk Space**: ~50-100MB per test run, accumulates over time\n\n### Proposed Solution:\n\nImplement proper cleanup pattern in all affected test files:\n\n```typescript\nafterEach(async () => {\n // 1. Clean up resources FIRST (before restoring mocks)\n try {\n if (testWorkspace && fs.existsSync(testWorkspace)) {\n // Windows-specific: wait for file handles to close\n if (process.platform === 'win32') {\n await new Promise((resolve) => setTimeout(resolve, 100));\n }\n fs.rmSync(testWorkspace, { recursive: true, force: true });\n }\n } catch {\n // ignore (per ESLint no-console rule)\n }\n \n // 2. Clear object references to prevent memory leaks\n workspaceContext = null as unknown as WorkspaceContext;\n \n // 3. THEN restore mocks\n vi.restoreAllMocks();\n vi.useRealTimers();\n});\n```\n\n### Files Requiring Changes:\n\n**Critical (Must Fix)**:\n1. `packages/core/src/tools/mcp-client.test.ts` - Add cleanup for `testWorkspace` and `workspaceContext` (4 locations)\n2. `packages/cli/src/config/extension-manager-scope.test.ts` - Add afterEach with cleanup for both temp directories\n3. `packages/cli/src/commands/extensions/configure.test.ts` - Add cleanup for `tempWorkspaceDir`\n\n**Already Correct (No Changes Needed)**:\n4. `packages/cli/src/config/extension-manager.test.ts` - Already correct! `tempWorkspaceDir` is nested inside `tempHomeDir`, so the recursive deletion of `tempHomeDir` already cleans it up.\n\n**Important Considerations**:\n- Cleanup should run BEFORE mock restoration\n- Windows requires 100ms delay for file handles to close\n- Error handling should be silent (per ESLint no-console rule)\n- Object references should be explicitly cleared to prevent memory leaks\n\n### Additional Context:\n\nMost test files (~90%+) already have proper cleanup. This issue affects only 3 test files that were missing cleanup. The fix is straightforward and follows existing patterns used throughout the codebase.",
"number": 22032,
"title": "Test suites leave behind temporary directories causing disk space waste",
"url": "https://github.com/google-gemini/gemini-cli/issues/22032",
"analysis": "Several test suites (notably `mcp-client.test.ts`) create temporary directories during execution but do not clean them up, leading to filesystem clutter and potential test interference.",
"effort_level": "small",
"reasoning": "The fix involves adding standard filesystem cleanup logic (e.g., fs.rmSync) to the afterEach hooks in three specific test files. This is a highly localized, trivial logic change with a clear root cause and no impact on production code or architectural complexity.",
"validated": true,
"recommended_implementation": "In `packages/cli/src/config/extension-manager-scope.test.ts`, `packages/core/src/tools/mcp-client.test.ts`, and `packages/cli/src/commands/extensions/configure.test.ts`, add `fs.rmSync(path, { recursive: true, force: true })` to the `afterEach` hooks for all temporary directories created during setup. This ensures that directories like `currentTempHome` and `tempWorkspace` are deleted after each test execution."
},
{
"body": "### What happened?\n\nDebug Console (F12 to close) \u2502\n\u2502 \u2502\n\u2502 \u2139 Loaded cached credentials. \u2502\n\u2502 \u2502\n\u2502 \u2139 Detected terminal background color: #141414 \u2502\n\u2502 \u2502\n\u2502 \u26a0 [STARTUP] Cannot start phase 'load_builtin_commands': phase is already active. Call end() before \u2502\n\u2502 starting again. (x2) \u2502\n\u2502 \u2139 \u2502\n\u2502 \u2139 Authenticated via \"oauth-personal\". \u2502\n\u2502 \u2716 ========================================= \u2502\n\u2502 This is an unexpected error. Please file a bug report using the /bug tool. \u2502\n\u2502 CRITICAL: Unhandled Promise Rejection! \u2502\n\u2502 ========================================= \u2502\n\u2502 Reason: Error: ENAMETOOLONG: name too long, lstat \u2502\n\u2502 '/Users/juanvergara/Desktop/Repos/repos-juntos/test.cl\", \u2502\n\u2502 \"municipality\": \"Comuna\" \u2502\n\u2502 }, \u2502\n\u2502 \"invoice_number\": \"54\", \u2502\n\u2502 \"local\": \"65a6c80444c7fbf3c1e5a986\", \u2502\n\u2502 \"products\": [ \u2502\n\u2502 { \u2502\n\u2502 \"code\": \"010100\", \u2502\n\u2502 \"is_exempt\": false, \u2502\n\u2502 \"name\": \"TRM' \u2502\n\u2502 Stack trace: \u2502\n\u2502 Error: ENAMETOOLONG: name too long, lstat '/Users/juanvergara/Desktop/Repos/repos-juntos/test.cl\", \u2502\n\u2502 \"municipality\": \"Comuna\" \u2502\n\u2502 }, \u2502\n\u2502 \"invoice_number\": \"54\", \u2502\n\u2502 \"local\": \"65a6c80444c7fbf3c1e5a986\", \u2502\n\u2502 \"products\": [ \u2502\n\u2502 { \u2502\n\u2502 \"code\": \"010100\", \u2502\n\u2502 \"is_exempt\": false, \u2502\n\u2502 \"name\": \"TRM' \u2502\n\u2502 at Module.realpathSync (node:fs:2776:29) \u2502\n\u2502 at robustRealpath \u2502\n\u2502 (file:///Users/juanvergara/.nvm/versions/node/v24.11.1/lib/node_modules/@google/gemini-cli/node_mo \u2502\n\u2502 dules/@google/gemini-cli-core/dist/src/utils/paths.js:320:19) \u2502\n\u2502 at resolveToRealPath \u2502\n\u2502 (file:///Users/juanvergara/.nvm/versions/node/v24.11.1/lib/node_modules/@google/gemini-cli/node_mo \u2502\n\u2502 dules/@google/gemini-cli-core/dist/src/utils/paths.js:311:12) \u2502\n\u2502 at checkPermissions \u2502\n\u2502 (file:///Users/juanvergara/.nvm/versions/node/v24.11.1/lib/node_modules/@google/gemini-cli/dist/sr \u2502\n\u2502 c/ui/hooks/atCommandProcessor.js:89:34) \u2502\n\u2502 at \u2502\n\u2502 file:///Users/juanvergara/.nvm/versions/node/v24.11.1/lib/node_modules/@google/gemini-cli/dist/src \u2502\n\u2502 /ui/AppContainer.js:812:43 \u2502\n\u2502 at \u2502\n\u2502 file:///Users/juanvergara/.nvm/versions/node/v24.11.1/lib/node_modules/@google/gemini-cli/dist/src \u2502\n\u2502 /ui/components/InputPrompt.js:187:9 \u2502\n\u2502 at Object.handleSubmit \u2502\n\u2502 (file:///Users/juanvergara/.nvm/versions/node/v24.11.1/lib/node_modules/@google/gemini-cli/dist/sr \u2502\n\u2502 c/ui/hooks/useInputHistory.js:24:13) \u2502\n\u2502 at \u2502\n\u2502 file:///Users/juanvergara/.nvm/versions/node/v24.11.1/lib/node_modules/@google/gemini-cli/dist/src \u2502\n\u2502 /ui/components/InputPrompt.js:220:22 \u2502\n\u2502 at \u2502\n\u2502 file:///Users/juanvergara/.nvm/versions/node/v24.11.1/lib/node_modules/@google/gemini-cli/dist/src \u2502\n\u2502 /ui/components/InputPrompt.js:796:21 \u2502\n\u2502 at \u2502\n\u2502 file:///Users/juanvergara/.nvm/versions/node/v24.11.1/lib/node_modules/@google/gemini-cli/dist/src \u2502\n\u2502 /ui/contexts/KeypressContext.js:674:21 \n\n### What did you expect to happen?\n\nTo read the text i has and make what i was asking\n\n### Client information\n\n\n* **CLI Version:** 0.33.0\n* **Git Commit:** 6ee19e1f6\n* **Session ID:** 51fed757-0ce3-4258-8ec0-5599c27f3762\n* **Operating System:** darwin v24.11.1\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto-gemini-3\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 372.7 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** #141414\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 22029,
"title": "Pasting something and throwing me error",
"url": "https://github.com/google-gemini/gemini-cli/issues/22029",
"analysis": "The CLI attempts to interpret pasted text as potential file paths to determine if read permissions are needed. If a user pastes a massive text block (like JSON), `robustRealpath` passes the entire block to `fs.lstat`, which throws an `ENAMETOOLONG` system error, crashing the app.",
"effort_level": "small",
"reasoning": "The issue is a localized bug in the path validation logic where pasted text is incorrectly processed as a file path. The fix involves adding a simple length check or a try-catch block for ENAMETOOLONG errors within the utility function, fitting the criteria for a small, highly localized fix.",
"recommended_implementation": "In `packages/core/src/utils/paths.ts` (inside `robustRealpath` or `resolveToRealPath`), wrap the `fs.lstatSync` call in a try/catch block and safely return or ignore errors with `e.code === 'ENAMETOOLONG'`.",
"validated": true
},
{
"body": "### What happened?\n\n\"When running gemini-cli inside a tmux session, the 'thinking' spinner (\u283c) causes severe screen flickering. Please implement Synchronized Output (DCS = 1 s ST) and optimize the terminal clear/redraw logic during spinner ticks, similar to how Claude Code handles it.\"\n\n[ACTION REQUIRED] \ud83d\udcce PLEASE ATTACH THE EXPORTED CHAT HISTORY JSON FILE TO THIS ISSUE IF YOU FEEL COMFORTABLE SHARING IT.\n\n### What did you expect to happen?\n\nscreen is not flickering, similar to Claude Code and Codex CLI.\n\n### Client information\n* **CLI Version:** 0.33.0\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 22004,
"title": "When running gemini-cli inside a tmux session, the 'thinking' spinner (\u283c) causes severe screen flickering. Please implement Synchronized Output (DCS = 1 s ST) and optimize the terminal clear/redraw logic during spinner ticks, similar to Claude Code.",
"url": "https://github.com/google-gemini/gemini-cli/issues/22004",
"analysis": "High-frequency terminal re-renders triggered by the 'Thinking' spinner component cause severe screen flickering in terminal multiplexers like tmux. The issue suggests implementing DCS Synchronized Output escape sequences to buffer the redraws.",
"effort_level": "large",
"reasoning": "Implementing Synchronized Output (DCS sequences) to prevent flickering in tmux requires low-level manipulation of the terminal output stream. Since the application relies on the Ink framework for rendering, this involves either creating a custom renderer, intercepting the raw stdout buffer to wrap frames, or deeply patching the ConsolePatcher. This falls under platform-specific terminal complexities and architectural changes to the output pipeline.",
"validated": true
},
{
"body": "### Description\nEach PTY-based shell execution creates a new `Terminal` instance from `@xterm/headless`. \nThese instances are stored in the `activePtys` map within `ShellExecutionService`.\n\nWhen a process exits or is killed, the PTY entry is removed from the map, but the corresponding `Terminal` instance is **never explicitly disposed**.\n\nAccording to the xterm.js API, terminal instances should be disposed when no longer needed to release associated resources.\n\n> \u201cDisposes of the terminal, detaching it from the DOM and removing any active listeners.\u201d \nSource: https://github.com/xtermjs/xterm.js/blob/master/typings/xterm.d.ts\n\nIn long-running CLI sessions with frequent shell command execution, this may lead to unnecessary resource retention.\n\n\n\n### Steps to Reproduce\n1. Start a Gemini CLI session.\n2. Execute several shell commands using the shell tool.\n3. Each execution creates a new `Terminal` instance internally.\n4. After the process exits, the PTY entry is removed, but the terminal instance is not disposed.\n\n\n\n### Tech part\n\n**Terminal Allocation**\n\n`shellExecutionService.ts`\n\n> const headlessTerminal = new Terminal({\n> allowProposedApi: true,\n> cols,\n> rows,\n> scrollback: shellExecutionConfig.scrollback ?? SCROLLBACK_LIMIT,\n> });\n\n#### However, when the PTY process exits or is removed from the map, the associated Terminal instance is not explicitly disposed.",
"number": 22001,
"title": "Terminal Instance Resource Retention in ShellExecutionService",
"url": "https://github.com/google-gemini/gemini-cli/issues/22001",
"analysis": "The `Terminal` instances from `@xterm/headless` created for background shell execution are stored in memory but never explicitly disposed when the process exits, leading to a memory leak.",
"effort_level": "small",
"reasoning": "The fix is highly localized to shellExecutionService.ts and involves adding a single method call to dispose of the headless terminal instance within the existing cleanup logic. This is a straightforward resource management task with a clear root cause and minimal risk.",
"recommended_implementation": "In `packages/core/src/services/shellExecutionService.ts`, update the `cleanupPtyEntry` method to call `entry.headlessTerminal.dispose()` before deleting the entry from `activePtys`.",
"validated": true
},
{
"body": "Vim mode is missing many common vim keyboard shortcuts.",
"number": 21970,
"title": "VIM mode is incomplete",
"url": "https://github.com/google-gemini/gemini-cli/issues/21970",
"analysis": "The TUI's 'vi mode' implementation lacks many standard Vim keyboard shortcuts and navigation commands, making it incomplete for power users.",
"effort_level": "large",
"reasoning": "Implementing a robust Vim emulation layer is a complex state-management task. The current implementation only supports Normal and Insert modes with basic mappings. To address the 'incomplete' status for power users, the developer must implement Visual mode (requiring selection state and UI highlighting), text objects (e.g., 'inner word'), and complex multi-key chord sequences. This involves significant architectural expansion of the state machine in packages/cli/src/ui/hooks/vim.ts and deep integration with the TextBuffer for selection logic, qualifying it as a major stateful subsystem implementation.",
"validated": true
},
{
"body": "### What happened?\n\nThe Gemini CLI takes 20 to 50 seconds to start on Windows (compared to 3 seconds for Codex CLI). Profiling and code\n review reveal that this is caused by severe synchronous blocking during the initial startup sequence.\n\n### What did you expect to happen?\n\nThe CLI should load the UI instantly (under 1-2 seconds) using cached data and lazy loading, matching the performance\n of other modern CLI tools. Please refactor these synchronous bottlenecks.\n\n### Client information\n\n\n* **CLI Version:** 0.32.1\n* **Git Commit:** e8a57c78c\n* **Session ID:** 335b00c3-d167-4d60-b872-2eb4d64535d7\n* **Operating System:** win32 v24.14.0\n* **Sandbox Environment:** no sandbox\n* **Model Version:** gemini-3.1-pro-preview\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 396.8 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** #0c0c0c\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n Specifically, the following architectural anti-patterns are blocking the main UI thread:\n\n\n 1. Synchronous Editor Path Scanning:\n In editorSettingsManager.js, hasValidEditorCommand uses execSync('where.exe ...') to check for over 10 different\n editors (VS Code, Vim, Cursor, etc.) synchronously on startup. On Windows, each where.exe call takes 1-2 seconds,\n blocking the startup for 10-20 seconds alone. This should be lazy-loaded only when the editor settings menu is opened.\n\n\n 2. Synchronous Hardware Polling:\n In clearcut-logger.js, systeminformation (si.graphics()) is imported and executed synchronously during startup to\n gather GPU info for telemetry. This causes an unnecessary 5-10 second delay before the UI is even rendered.\n\n\n 3. Synchronous Network Auth & Config Blocking:\n In useAuth.js and config.js, await config.refreshAuth(authType) halts the UI rendering completely while waiting for\n Google OAuth token refresh, user quota fetching, and experiments downloading. The UI should render immediately using\n cached credentials, and these network requests should resolve asynchronously in the background.",
"number": 21853,
"title": "Severe Startup Latency (20~50 seconds) on Windows due to Synchronous Initialization Bottlenecks",
"url": "https://github.com/google-gemini/gemini-cli/issues/21853",
"analysis": "The bug is primarily caused by synchronous blocking calls during the CLI's initialization sequence, specifically on Windows. The bug report identifies the root cause as the `hasValidEditorCommand` function within `editorSettingsManager.js` (likely located at `packages/core/src/config/editorSettingsManager.ts` or `.js`). This function executes `child_process.execSync('where.exe ...')` for a list of over 10 editors (VS Code, Vim, Cursor, etc.) every time the CLI starts. On Windows, `where.exe` has significant overhead, and calling it sequentially 10+ times results in a 10-20 second delay. Additionally, the report mentions 'Synchronous Hardware Polling', which likely occurs during the initialization of the configuration or MCP (Model Context Protocol) servers, as seen in `packages/core/src/config/config.ts` where `mcpInitializationPromise` is awaited during startup (lines 1476-1488).",
"effort_level": "large",
"reasoning": "The issue involves severe startup latency on Windows caused by synchronous child process execution (execSync) and hardware polling during the initialization sequence. Addressing this requires refactoring the core startup architecture to implement lazy loading or asynchronous initialization for major subsystems, including the EditorSettingsManager and Model Context Protocol (MCP) integrations. According to the criteria, platform-specific child process management on Windows and architectural changes to MCP integrations are classified as Large effort.",
"validated": true
},
{
"body": "### What happened?\n\nI have been running gemini cli on Raspberry pi 5, 16GB, recently I got this error twice while gemini is executing console commands.\n\n```shell\nioctl(2) failed, EBADF\n\n /home/innomon/.nvm/versions/node/v24.13.0/lib/node_modules/@google/gemini-cli/node_modules/@lydell/node-pty/unixTerminal.js:243:13\n\n 240: if (cols <= 0 || rows <= 0 || isNaN(cols) || isNaN(rows) || cols === Infinity || rows === Infinity) {\n 241: throw new Error('resizing must be done using positive cols and rows');\n 242: }\n 243: pty.resize(this._fd, cols, rows);\n 244: this._cols = cols;\n 245: this._rows = rows;\n 246: };\n\n - UnixTerminal.resize (/home/innomon/.nvm/versions/node/v24.13.0/lib/node_modules/@google/gemini-cli/node_modules/@lydell/node-pty/unixTerminal.js:243:13)\n -ShellExecutionService.resize \n ty (file:///home/innomon/.nvm/versions/node/v24.13.0/lib/node_modules/@google/gemini-cli/node_modules/@google/gemini-cli-core/dist/src/services/shellExecutionServ\n ice.js:828:38)\n - (file:///home/innomon/.nvm/versions/node/v24.13.0/lib/node_modules/@google/gemini-cli/dist/src/ui/AppContainer.js:928:39)\n - react-stack-bottom-frame (/home/innomon/.nvm/versions/node/v24.13.0/lib/node_modules/@google/gemini-cli/node_modules/react-reconciler/cjs/react-reconciler.development.js:15945:20)\n - runWithFiberInDEV (/home/innomon/.nvm/versions/node/v24.13.0/lib/node_modules/@google/gemini-cli/node_modules/react-reconciler/cjs/react-reconciler.development.js:1735:30)\n - commitHookEffectListMount (/home/innomon/.nvm/versions/node/v24.13.0/lib/node_modules/@google/gemini-cli/node_modules/react-reconciler/cjs/react-reconciler.development.js:9516:29)\n - commitHookPassiveMountEffects (/home/innomon/.nvm/versions/node/v24.13.0/lib/node_modules/@google/gemini-cli/node_modules/react-reconciler/cjs/react-reconciler.development.js:9639:11)\n - commitPassiveMountOnFiber (/home/innomon/.nvm/versions/node/v24.13.0/lib/node_modules/@google/gemini-cli/node_modules/react-reconciler/cjs/react-reconciler.development.js:11364:13)\n -recursivelyTraversePassiveMountEffect \n (/home/innomon/.nvm/versions/node/v24.13.0/lib/node_modules/@google/gemini-cli/node_modules/react-reconciler/cjs/react-reconciler.development.js:11338\n :11)\n - commitPassiveMountOnFiber (/home/innomon/.nvm/versions/node/v24.13.0/lib/node_modules/@google/gemini-cli/node_modules/react-reconciler/cjs/react-reconciler.development.js:11479:11)\n\n\n```\n\n### What did you expect to happen?\n\nexpecting the linux command to return result back to the agent\n\n### Client information\n\n\n* **CLI Version:** 0.32.1\n* **Git Commit:** e8a57c78c\n* **Session ID:** 2e5f444a-5638-4ef2-95ca-b2a0607df063\n* **Operating System:** linux v24.13.0\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto-gemini-3\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 480.0 MB\n* **Terminal Name:** VTE(8001)\n* **Terminal Background:** #0f0b0b\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\nGoogle Account\n\n### Anything else we need to know?\n\n_No response_",
"number": 21835,
"title": "ioctl error while running gemeni cli",
"url": "https://github.com/google-gemini/gemini-cli/issues/21835",
"analysis": "The error `EBADF` (Bad File Descriptor) occurs when `node-pty` attempts to execute an `ioctl` resize operation on a file descriptor that has already been closed. This is a race condition: the terminal window is resized (triggering a resize event in the UI), but the underlying shell process managed by `ShellExecutionService` has already exited or the PTY has been disposed of. The stack trace shows the flow: `AppContainer` (the React UI layer) receives a resize event and calls `ShellExecutionService.resize`, which in turn calls `pty.resize()`. If the PTY is no longer valid, `node-pty` throws the reported error.",
"effort_level": "small",
"reasoning": "The issue is a localized race condition where a resize event is triggered after the PTY process has already been disposed. The fix is straightforward and involves adding a guard clause or a try-catch block in the resize method of ShellExecutionService.ts to handle the EBADF error. This fits the 'Small' criteria as it is a highly localized fix with a clear root cause, constrained to a single file, and requires minimal logic adjustment.",
"validated": true,
"recommended_implementation": "In `src/services/ShellExecutionService.ts`, wrap the `this.pty.resize(cols, rows)` call inside a `try-catch` block to silently ignore errors. This prevents the application from crashing if a resize event occurs after the underlying PTY file descriptor has already been closed."
},
{
"body": "### What happened?\n\nAbortError: The operation was aborted. at abort (file:///Users/macbookpro/.nvm/versions/node/v23.9.0/lib/node_modules/@google/gemini-cli/node_modules/google-auth-library/node_modules/node-fetch/src/index.js:70:18) at AbortSignal.abortAndFinalize (file:///Users/macbookpro/.nvm/versions/node/v23.9.0/lib/node_modules/@google/gemini-cli/node_modules/google-auth-library/node_modules/node-fetch/src/index.js:89:4) at [nodejs.internal.kHybridDispatch] (node:internal/event_target:827:20) at AbortSignal.dispatchEvent (node:internal/event_target:762:26) at runAbort (node:internal/abort_controller:449:10) at abortSignal (node:internal/abort_controller:440:5) at AbortController.abort (node:internal/abort_controller:468:5) at GeminiClient.processTurn (file:///Users/macbookpro/.nvm/versions/node/v23.9.0/lib/node_modules/@google/gemini-cli/node_modules/@google/gemini-cli-core/dist/src/core/client.js:480:28) at processTurn.next (<anonymous>) at GeminiClient.sendMessageStream (file:///Users/macbookpro/.nvm/versions/node/v23.9.0/lib/node_modules/@google/gemini-cli/node_modules/@google/gemini-cli-core/dist/src/core/client.js:577:32)\n\n### What did you expect to happen?\n\nwhen i run gemini its auto close and stop working\n\n### Client information\n\n\n* **CLI Version:** 0.32.1\n* **Git Commit:** e8a57c78c\n* **Session ID:** eaf887e2-c3fd-456b-863c-072955c498f3\n* **Operating System:** darwin v23.9.0\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto-gemini-3\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 307.6 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** #181818\n* **Kitty Keyboard Protocol:** Unsupported\n* **IDE Client:** Antigravity\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 21752,
"title": "AbortError: The operation was aborted. at abort (file:///Users/macbookpro/.nvm/versions/node/v23.9.0/lib/node_modules/@google/gemini-cli/node_modules/google-auth-library/node_modules/node-fetch/src/index.js:70:18) at AbortSignal.abortAndFinalize (file:///U",
"url": "https://github.com/google-gemini/gemini-cli/issues/21752",
"analysis": "The bug is an unhandled `AbortError` that causes the CLI to crash. The stack trace indicates that the error originates from `GeminiClient.processTurn` calling `AbortController.abort()`, which then triggers a rejection in the underlying `node-fetch` request (used by `google-auth-library`). This rejection is not being caught or properly handled in the `processTurn` generator or the `sendMessageStream` method. Specifically, when the client decides to abort a request (e.g., due to a timeout, user interruption, or internal state change), the resulting `AbortError` bubbles up and terminates the process because the calling code in `client.ts` does not gracefully ignore or handle this specific error type during the stream processing loop.",
"effort_level": "medium",
"reasoning": "The issue involves resolving an unhandled promise rejection (AbortError) within an asynchronous stream processing loop in GeminiClient. While the fix is localized to client.ts, it requires tracing the asynchronous control flow and ensuring that the state remains synchronized when a request is aborted, which fits the criteria for Medium effort.",
"validated": true
},
{
"body": "### Goal\nAllow users to safely configure and apply security policies to MCP servers whose aliases contain underscores (e.g., `my_server`), without those policies silently failing due to string parsing ambiguities. \n\n### Background & Reasoning\nCurrently, the Gemini API requires tool names to be alphanumeric with underscores. Because we must flatten the MCP namespace into a single string (`mcp_serverAlias_toolName`), the Fully Qualified Name (FQN) uses underscores as boundaries. \n\nWhen the Policy Engine evaluates a tool call against a rule based on an FQN string or a wildcard string (e.g., `mcp_my_server_*`), it naively splits the string on the *first* underscore following the `mcp_` prefix. If the server alias itself contains an underscore (e.g. `my_server`), the parser incorrectly identifies the server name as `my` and the tool as `server_*`. This causes the policy to fail silently.\n\nWhile we introduced the `mcpName` field in our TOML policies to provide a structured way to target servers, the TOML loader currently concatenates `mcpName` and `toolName` back into a flattened FQN string before passing it to the Policy Engine. This means the `mcpName` approach still suffers from the exact same underscore parsing vulnerability as the legacy string approach.\n\nWe need to make the Policy Engine capable of evaluating structured `mcpName` rules independently of FQN string parsing, relying instead on the server metadata injected during execution.\n\n### Requirements & Acceptance Criteria\n- Policy rules defined using the `mcpName` structured field must successfully match tool calls even if the `mcpName` contains underscores.\n- Modifying how `mcpName` rules are evaluated should not break existing policies that rely on the FQN string format (which will maintain the documented limitation regarding underscores).\n- The documentation should be updated to clearly state: \n - FQN string rules do not support underscores in server names and if used, policy will not work.\n - If a user wishes or needs to use underscores in their server alias, they **should** use the structured `mcpName` configuration in their TOML policies.\n\n### Proposed Direction\nInvestigate updating the TOML loader and `PolicyEngine.check()` logic so that rules explicitly defined with `mcpName` and `toolName` are preserved as structured data and compared directly against tool metadata, bypassing the [matchesWildcard](cci:1://file:///Users/abhipatel/code/gemini-cli/mcp-prefix/packages/core/src/policy/policy-engine.ts:37:0-67:1) string parsing logic entirely.\n",
"number": 21727,
"title": "Decouple `mcpName` policy rules from FQN string parsing to support underscores in server aliases",
"url": "https://github.com/google-gemini/gemini-cli/issues/21727",
"analysis": "The bug is caused by the Policy Engine's reliance on a flattened string representation (FQN) of MCP tools, which uses underscores as delimiters (e.g., `mcp_serverAlias_toolName`). The current implementation naively splits this string at the first underscore after the `mcp_` prefix to identify the server and tool. When a server alias contains an underscore (e.g., `my_server`), this logic incorrectly identifies the server as `my` and the tool as `server_toolName`. \n\nKey locations identified:\n1. `packages/core/src/policy/toml-loader.ts`: Specifically line 475, which contains a TODO to decouple `mcpName` rules from FQN string parsing. This file is responsible for parsing TOML policies and currently flattens structured `mcpName` and `toolName` fields into a single string.\n2. `packages/core/src/tools/mcp-tool.ts`: Lines 417-423 define `getFullyQualifiedPrefix` and `getFullyQualifiedName`, which establish the `mcp_${alias}_${name}` format that the Policy Engine then tries to reverse-engineer.\n3. The Policy Engine's matching logic (likely in a file like `packages/core/src/policy/policy-engine.ts` or a similar evaluator): This is where the 'naive split' occurs. It needs to be updated to accept structured metadata (server alias and tool name) provided by the tool execution context rather than parsing the FQN string.",
"effort_level": "medium",
"reasoning": "This task requires modifying the internal data structures for policy rules and updating the matching logic across the Policy Engine and the TOML loader. It involves logic tracing to ensure that structured metadata (server alias and tool name) is correctly propagated and matched, while maintaining backward compatibility for existing string-based FQN rules. This fits the criteria for logic tracing and integration across multiple components.",
"validated": true
},
{
"body": "### What happened?\n\nMeasured on my machine with `time gemini --help`.\n- Cold start (`systemctl reboot`):\n```\nExecuted in 77.67 secs fish external\n usr time 8.04 secs 0.00 micros 8.05 secs\n sys time 1.77 secs 830.00 micros 1.88 secs\n```\n- Warm start:\n```\nExecuted in 3.62 secs fish external\n usr time 4.79 secs 1.12 millis 4.07 secs\n sys time 0.69 secs 1.06 millis 0.69 secs\n```\n\nThe more-or-less same behaviour can also be observed with `gemini` bare into alternate screen buffer.\n- Cold start (`systemctl reboot`). Note that time includes keyring unlock and navigating the prompt of untrusted `~` to exit and conclude measurement of around 4 seconds.\n```\nExecuted in 96.30 secs fish external\n usr time 14.80 secs 0.30 millis 14.80 secs\n sys time 2.54 secs 1.02 millis 2.54 secs\n``` \n- Warm start. note that time includes navigating to exit and conclude measurement of around 1-2 seconds.\n```\nExecuted in 15.19 secs fish external\n usr time 10.84 secs 1.30 millis 10.84 secs\n sys time 1.34 secs 0.00 millis 1.34 secs\n```\n\n### What did you expect to happen?\n\n- `--help` being near instantaneous whether cold start or warm start as it should not involve any business logic\n- Cold start time being not 1+ minutes\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\n```console\n> /about\nAbout Gemini CLI\nCLI Version 0.32.1\nGit Commit e8a57c78c\nModel Auto (Gemini 3)\nSandbox no sandbox\nOS linux \nAuth Method Logged in with Google ([REDACTED])\nTier Gemini Code Assist in Google One AI Pro\n```\n</details>\n\n<details>\n<summary>Machine Information</summary>\n\n- CPU: i5-5200U.\n- RAM: 8GB DDR3L RAM + 0.75x ZRAM; at testing OS has not yet swapped to disk.\n- Storage: 1TB 5400RPM platter\n- OS: openSUSE Tumbleweed; snapshot `20260226`\n- Runtime: Node 24.11.1, managed by `mise`.\n- Client: Installed with `mise use --global pnpm:@google/gemini-cli`\n</details>\n\n### Login information\n\nLogged in via Google OAuth2.\n\n### Anything else we need to know?\n\n\"Just get better storage\" is not an option",
"number": 21662,
"title": "Dreadful startup time on HDDs",
"url": "https://github.com/google-gemini/gemini-cli/issues/21662",
"analysis": "The root cause of the dreadful startup time on HDDs is the eager loading of the entire dependency graph (including heavy libraries like React, Ink, and the full Core logic) before the CLI processes basic flags like `--help` or `--version`. In Node.js applications, loading hundreds of modules from `node_modules` on an HDD involves significant disk seek latency, which explains the 77-second cold start. The high 'usr time' (8s) even on warm starts suggests that the V8 engine is spending considerable time parsing and compiling a large volume of JavaScript code that isn't required for simply displaying help text.\n\nSpecifically, the CLI entry point (likely `packages/cli/src/index.ts` or `main.ts`) is importing the main UI component or the command dispatcher immediately. This triggers a cascade of imports: `packages/cli/src/ui/components/...` (React/Ink), `packages/core/src/ide/ide-client.ts`, and `packages/core/src/tools/mcp-client-manager.ts`. These modules likely perform side-effect-heavy initialization or have large dependency trees.",
"effort_level": "small",
"reasoning": "The fix is highly localized to the CLI's entry point file. It involves implementing a lightweight argument parser (like minimist or yargs-parser) to handle basic flags such as --help and --version before any heavy dependencies are loaded. By wrapping the main application logic in a dynamic import(), the startup time for simple commands is drastically improved. This is a standard optimization for Node.js CLIs and does not require complex state management or architectural changes.",
"validated": true,
"recommended_implementation": "In the CLI entry point (e.g., `packages/cli/src/index.ts`), implement a lightweight check for `--help` and `--version` flags using `process.argv` to handle them immediately. Then, wrap the main application logic in a dynamic `import()` call to defer the loading of heavy dependencies like React, Ink, and the core logic until they are actually needed."
},
{
"body": "Note that the wrapped text has a smaller indent then the previous line.\nThe wrapped text should have the same indent of perahps a slightly larger indent.\n<img width=\"957\" height=\"238\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/ec3723df-e9d1-46dd-82aa-d86a60d6f0d6\" />",
"number": 21590,
"title": "Line wrap for selection lists needs to be polished",
"url": "https://github.com/google-gemini/gemini-cli/issues/21590",
"analysis": "The bug is caused by the terminal rendering logic for selection lists (prompts) not accounting for the 'hanging indent' when text wraps. In CLI selection lists, each item typically has a prefix (e.g., a cursor `>` or a checkbox `[ ]`). When the item text is longer than the terminal width, the wrapping utility (such as `wrap-ansi` or a custom implementation) defaults to the start of the line (column 0) instead of aligning with the start of the text on the previous line. The fix requires calculating the width of the selection prefix and applying that width as an indentation/padding for all wrapped lines of the same item.",
"effort_level": "small",
"reasoning": "This is a localized UI/aesthetic adjustment specifically related to padding and indentation in a CLI component. According to the criteria, minor tweaks to margins, padding, and structural layouts in Ink components are classified as Small. While it involves ANSI wrapping logic, it is a formatting fix rather than a complex state or protocol change.",
"validated": true,
"recommended_implementation": "In the selection list component, calculate the width of the item prefix (e.g., the cursor or checkbox) and apply it as a padding-left or indentation to the text element to ensure wrapped lines align with the start of the first line."
},
{
"body": "### What happened?\n\nWhen a session is manually deleted using `--delete-session` or the interactive session browser, the chat JSON file is removed but the corresponding tool output files remain on disk.\n\nThis appears to happen because `deleteSession()` receives the **chat filename** while tool output directories are created using the **session UUID**. \nAs a result, the cleanup code looks for the wrong directory path and the tool output folder is never removed.\n\nOver time this can cause unused tool output files to accumulate on disk.\n\n### What did you expect to happen?\n\nWhen a session is deleted, all related data should also be removed, including:\n\n- chat JSON file\n- associated `tool-outputs/session-*` directory\n\nThe cleanup should use the correct session UUID so the tool output directory is properly deleted.\n\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n# paste output here\n```\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\nWhile investigating this issue, I noticed that tool output directories are created using the **session UUID**, but `deleteSession()` appears to receive the **chat filename** instead. Because of this mismatch, the cleanup logic constructs an incorrect directory path and fails to remove the associated tool output files.\n\nThis results in unused tool output folders remaining on disk after a session is deleted manually.\n\nThe cleanup logic used in `sessionCleanup.ts` seems to correctly reference the session UUID, which might be helpful as a reference when fixing this issue.",
"number": 21568,
"title": "deleteSession() does not clean tool output directories (UUID / filename mismatch)",
"url": "https://github.com/google-gemini/gemini-cli/issues/21568",
"analysis": "The bug is caused by a mismatch between the identifier used to delete the session JSON file and the identifier used to locate the tool output directory. The `deleteSession()` function (likely located in a session management service) receives a filename (e.g., `chat_2023-10-27.json`). While it successfully deletes this file, it then attempts to delete the tool output directory by appending this filename to the `tool-outputs/session-` prefix. However, tool output directories are named using the session's internal UUID (e.g., `tool-outputs/session-abc-123-uuid`), which does not match the filename. To fix this, `deleteSession` must either: 1) Read the session JSON file to extract the `uuid` before deleting the file, or 2) Be updated to accept the UUID as a parameter from the caller (CLI or UI) which already has access to the session metadata.",
"effort_level": "small",
"reasoning": "The issue is a highly localized logic error in the session deletion routine. Fixing it requires ensuring the session UUID is retrieved (either from the file content or passed as an argument) before the JSON file is deleted, then using that UUID to target the correct tool-output directory. This is a straightforward filesystem operation fix constrained to 1-2 files.",
"validated": true,
"recommended_implementation": "In `src/services/session.ts`, update `deleteSession` to read the session JSON file and extract the `uuid` property before the file is deleted. Use this `uuid` to construct the correct path for the tool output directory (e.g., `tool-outputs/session-${uuid}`) and remove it using `fs.rmSync` with `recursive: true`."
},
{
"body": "## Description\n\nThe automatic update feature in `gemini-cli` can result in a state where the update is reported as successful (or fails silently/inaccurately) but the user continues to run the old version. This occurs on systems where multiple global installation paths exist (e.g., `/usr/local/bin` and `/usr/bin`), common in Linux/WSL environments or when switching between `npm` and `pnpm` global configurations.\n\n## Type\n\nBug\n\n## Context/Background\n\n- **OS:** Linux (Ubuntu/WSL)\n- **Installation Method:** `npm install -g @google/gemini-cli`\n- **Behavior:** The CLI detected an update from v0.31.0 to v0.32.1. The auto-update triggered `npm install -g`, which installed the new version to `/usr/bin/gemini` (the current `npm config get prefix`). However, the active binary being executed was `/usr/local/bin/gemini`, which was not updated. The user was left running v0.31.0 despite the successful update notification.\n\n## Investigation Findings\n\n### Affected Code\n\n- **File**: `src/utils/installationInfo.ts` (and its compiled JS counterpart `dist/src/utils/installationInfo.js`)\n- **Reason**: The `getInstallationInfo` function determines the `updateCommand` based on string matching against `process.argv[1]` (the path to the current binary). It assumes that running the generated `updateCommand` (e.g., `npm install -g @google/gemini-cli@latest`) will update the *specific* binary that is currently running.\n\n- **File**: `src/utils/handleAutoUpdate.ts` (and `dist/src/utils/handleAutoUpdate.js`)\n- **Reason**: The `handleAutoUpdate` function executes the update command in a detached process and reports success based on the exit code of that command, without verifying if the binary that triggered the update was actually replaced or if it remains the primary binary in the user's `PATH`.\n\n### Root Cause/Analysis\n\nThe current implementation lacks a verification step to ensure the `npm` (or other package manager) \"global\" prefix aligns with the directory containing the currently executing `gemini` binary. If a user has a legacy installation in `/usr/local/bin` that precedes the NPM prefix in their `$PATH`, the global update will target the wrong location, leading to persistent \"stale\" versions.\n\n---\n\n**Note**: This issue was generated using the `github-issue-creator` skill.",
"number": 21553,
"title": "[Bug] Automatic update fails silently or becomes ineffective due to PATH shadowing and non-standard NPM prefixes",
"url": "https://github.com/google-gemini/gemini-cli/issues/21553",
"analysis": "The root cause is that `getInstallationInfo` in `packages/cli/src/utils/installationInfo.ts` makes a blind assumption that if no other package manager is detected, it must be a global NPM install. It then provides a generic `npm install -g` update command. This command respects the current NPM prefix (`npm config get prefix`), which may differ from the prefix of the currently running binary (e.g., if the user has multiple installations in `/usr/local/bin` and `/usr/bin`, or has changed their NPM configuration). This leads to a situation where the update is 'successful' (it installs the new version to the current prefix) but the user continues to run the old version from a different prefix that is earlier in their PATH. The fix involves making the installation detection more robust by verifying the current binary's path against the package manager's configured global root (e.g., using `npm root -g`) and only offering an automatic update if they match. If a mismatch is detected, the CLI should inform the user and suggest a manual update instead of attempting an ineffective automatic one.",
"effort_level": "medium",
"reasoning": "The fix requires modifying the logic in `installationInfo.ts` to perform more rigorous path validation by executing external commands (e.g., `npm root -g`) and comparing the results with the current binary path. This involves handling asynchronous child processes and cross-platform path resolution, which aligns with the Medium criteria for 'Parsers and Validation' and 'Asynchronous Flow/path resolution bugs'. While the issue mentions WSL, the solution is a logic adjustment rather than a deep architectural or PTY-related change that would warrant a Large rating.",
"validated": true
},
{
"body": "## Description\n\nGemini CLI v0.32.1 interactive TUI hangs forever on the \"Initializing...\" spinner when launched from a bare Linux terminal (not inside any IDE). Headless mode (`gemini -p \"hello\"`) works perfectly.\n\n## Root Cause (Diagnosed)\n\nThe hang originates in `BuiltinCommandLoader.loadCommands()` which `await`s `ideCommand()`. This calls `IdeClient.getInstance()` \u2192 `getIdeProcessInfo()` \u2192 `getProcessInfo(pid)` which runs `ps -o ppid=,command= -p <pid>` in a loop, traversing up the process tree looking for a parent IDE.\n\nOn certain Linux systems running from a bare terminal, this process traversal **never completes** \u2014 the `execAsync('ps ...')` call hangs on a specific PID in the ancestor chain.\n\nBecause `BuiltinCommandLoader` never resolves, `Promise.allSettled()` in `CommandService.create()` never settles, `slashCommands` is never set, and the TUI condition `(!uiState.slashCommands || !uiState.isConfigInitialized)` keeps rendering `ConfigInitDisplay` (\"Initializing...\") forever.\n\n### Evidence from instrumentation\n\nAdded `fs.appendFileSync` logging to each loader in `CommandService.create()`:\n\n```\n[CMD] loader[0] McpPromptLoader DONE\n[CMD] loader[2] FileCommandLoader DONE\n# loader[1] BuiltinCommandLoader \u2014 NEVER completes\n\n[BUILTIN] isNightly DONE: false\n[BUILTIN] ideCommand START\n# ideCommand \u2014 NEVER completes\n```\n\n`config.initialize()` completes in ~120ms. The issue is exclusively in the slash command loading phase.\n\n## Suggested Fix\n\nAdd a timeout to `ideCommand()` in `BuiltinCommandLoader.loadCommands()`, or make `getIdeProcessInfo()` non-blocking with an `AbortSignal` / timeout. When running from a bare terminal (no IDE detected within N seconds), it should fall back gracefully instead of blocking startup indefinitely.\n\nExample:\n```js\n// Instead of:\nawait ideCommand(),\n\n// Use:\nawait Promise.race([\n ideCommand(),\n new Promise(resolve => setTimeout(() => resolve(noIdeFallbackCommand), 5000))\n]),\n```\n\n## Workaround\n\nReplace `await ideCommand(),` in `BuiltinCommandLoader.js` with a static no-IDE object:\n\n```bash\nGEMINI_PATH=$(dirname $(readlink -f $(which gemini)))/../lib/node_modules/@google/gemini-cli\nsed -i \"s|await ideCommand(),|{ name: 'ide', description: 'Manage IDE integration (disabled)', kind: 'built-in', autoExecute: false, action: () => ({ type: 'message', messageType: 'info', content: 'IDE integration is not available.' }) },|\" \\\n \"$GEMINI_PATH/dist/src/services/BuiltinCommandLoader.js\"\n```\n\n## Environment\n\n- **OS**: Ubuntu 24.04+ (Linux 6.17.0-14-generic, x86_64)\n- **Gemini CLI**: v0.32.1\n- **Node.js**: v24.14.0\n- **Terminal**: GNOME Terminal / bare terminal (NOT inside VS Code, Cursor, or any IDE)\n- **Shell**: bash\n\n## Steps to Reproduce\n\n1. Install Gemini CLI on Ubuntu Linux: `npm install -g @google/gemini-cli`\n2. Authenticate: `gemini -p \"hello\"` (works fine in headless)\n3. Launch interactive TUI from a bare terminal: `gemini`\n4. Observe: TUI shows logo, briefly flashes \"Waiting for auth...\", then stays on \"Initializing...\" forever\n5. Confirm headless works: `gemini -p \"hello\"` responds normally\n\n## Related Issues\n\n- #13986 (TUI stuck at Initializing \u2014 attributed to MCP, but may also be this bug)\n- #20433 (Initializing hang due to ripgrep \u2014 different root cause, same symptom)",
"number": 21477,
"title": "bug: TUI hangs indefinitely on \"Initializing...\" \u2014 IdeClient.getInstance() blocks BuiltinCommandLoader in bare terminal",
"url": "https://github.com/google-gemini/gemini-cli/issues/21477",
"analysis": "The hang occurs because `BuiltinCommandLoader.loadCommands()` awaits `ideCommand()`, which in turn awaits `IdeClient.getInstance()`. The `IdeClient` initialization performs a process tree traversal to detect if it's running inside an IDE. On Linux, this is done in `getIdeProcessInfoForUnix` by repeatedly calling `ps -o ppid=,command= -p <pid>` via `execAsync`. On certain systems, the `ps` command can hang indefinitely for specific PIDs (e.g., due to zombie processes or /proc filesystem issues). Since `execAsync` is called without a timeout, the promise never settles, blocking the `BuiltinCommandLoader`. This prevents `CommandService.create()` from resolving, which in turn prevents the TUI from moving past the 'Initializing...' state as it waits for slash commands to be loaded. The fix involves adding a timeout to the `exec` calls in the process utility functions.",
"effort_level": "small",
"reasoning": "The issue is a highly localized bug within a single file (process-utils.ts). The root cause is a missing timeout on an external process execution (execAsync), which is a trivial logic fix. It does not involve complex state management, architectural changes, or deep platform-specific PTY/signal handling, fitting the criteria for a small effort level.",
"validated": true,
"recommended_implementation": "In `process-utils.ts`, add a `timeout: 2000` property to the options object of all `execAsync` calls within `getProcessInfo` and `getProcessTableWindows` to prevent the process tree traversal from hanging indefinitely."
},
{
"body": "### What happened?\n\nI can run `gws` on the terminal but I can't run it in Gemini CLI `!gws` it gives\n\n`gws : File C:\\Users\\ray.bell\\AppData\\Local\\fnm_multishells\\XXXXXXXXXXXXXXXX\\gws.ps1 cannot be loaded`\n\nI have tried changing my execution policy but it still exists.\n\nI use npm from fnm\n\n### What did you expect to happen?\n\n`!gws` works ok\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n\u2502 CLI Version 0.32.1 \u2502\n\u2502 Git Commit e8a57c78c \u2502\n\u2502 Model Auto (Gemini 3) \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS win32 \u2502\n\u2502 Auth Method gemini-api-key \u2502\n\u2502 GCP Project XXXXXXXXXX\n```\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 21399,
"title": "Powershell execution policy can't run shell command",
"url": "https://github.com/google-gemini/gemini-cli/issues/21399",
"analysis": "The bug is caused by the Gemini CLI's shell execution logic on Windows. When a user runs a command with the `!` prefix (e.g., `!gws`), the CLI likely spawns a shell process to execute the command. On Windows, if this process defaults to PowerShell or is used to execute a `.ps1` script (like the one provided by `fnm`), it is subject to the PowerShell Execution Policy. The error message `File ... cannot be loaded` confirms that PowerShell is blocking the script execution. Even if the user changes their global policy, spawned processes often require an explicit bypass flag to ensure compatibility with local scripts in non-interactive environments.",
"effort_level": "small",
"reasoning": "The issue is a localized platform-specific configuration fix. It requires identifying the shell execution logic for the '!' command prefix and ensuring that PowerShell is invoked with the '-ExecutionPolicy Bypass' flag on Windows. This is a standard, straightforward fix for Node.js CLI tools and does not involve deep architectural changes or complex PTY/terminal management.",
"validated": true,
"recommended_implementation": "In the shell execution logic (likely in `src/repl/index.ts` or a shell utility), update the Windows command handler to invoke PowerShell with the `-ExecutionPolicy Bypass` flag when executing commands prefixed with `!` to ensure local scripts can run."
},
{
"body": "### What happened?\nWhen the CLI receives a message payload containing large `inlineData` (such as base64-encoded image Buffers), the UI thread completely freezes and becomes unresponsive. This leads to integration test timeouts and a degraded user experience, as the application hangs while trying to process the massive `imageBuffer` through the `escapeAnsiCtrlCodes` utility.\n\nThe root cause is that `escapeAnsiCtrlCodes` recursively iterates over every property of the `Buffer` byte-by-byte, which blocks the Node.js event loop indefinitely for large binary attachments.\n\n### What did you expect to happen?\nThe CLI should gracefully handle large `Buffer` payloads without freezing the UI. Specifically, `escapeAnsiCtrlCodes` should skip deep iteration over `Buffer` and `Uint8Array` instances, as ANSI escape characters are not relevant within raw binary data buffers.\n\nAdditionally, since these image buffers are being passed through the application state, the UI should implement a generic terminal fallback to decode and render the images directly in the terminal so users can see the attached context safely.\n\n### Client information\n<details>\n<summary>Client Information</summary>\n\n```console\n> /about\nGemini CLI: 0.33.0-nightly\nOS: macOS\n```\n\n</details>\n\n### Login information\nAPI Key\n\n### Anything else we need to know?\nI have analyzed the event-loop trace via inspector and found the bottleneck directly inside `packages/cli/src/ui/utils/textUtils.ts`. I will open a PR with the performance fix and a generic terminal image renderer to safely consume these parsed buffers without crashing the app.\n",
"number": 21343,
"title": "Event-loop freeze from large base64 buffers + CLI media renderer missing",
"url": "https://github.com/google-gemini/gemini-cli/issues/21343",
"analysis": "The event-loop freeze is caused by the `escapeAnsiCtrlCodes` utility in `packages/cli/src/ui/utils/textUtils.ts`. This function likely performs a recursive deep-walk of message payloads to sanitize strings from ANSI escape sequences. When it encounters `inlineData` containing a Node.js `Buffer` or `Uint8Array`, the recursive logic treats the binary data as a standard object and iterates over every byte/index. For large images (multi-megabyte buffers), this synchronous iteration blocks the Node.js event loop, causing the UI to hang and tests to timeout. The secondary issue is that the CLI UI lacks a specific renderer for binary media, allowing these raw buffers to be passed into text-processing utilities instead of being intercepted by a media-specific component.",
"effort_level": "medium",
"reasoning": "The fix for the event-loop freeze is a localized type-guard in a utility function, which is a small task. However, the issue also requires implementing a new media renderer component within the Ink-based CLI UI to handle binary buffers. This involves UI state management and component integration across the rendering pipeline, which aligns with the Medium effort criteria.",
"validated": true
},
{
"body": " ## Problem\n\nThe VSCode IDE companion extension fails to connect when using `GEMINI_SANDBOX=runsc` (gVisor), while it works correctly with `GEMINI_SANDBOX=docker`. This prevents all IDE integration features (`/ide status`, `/ide enable`, IDE-aware tools) from functioning when using gVisor sandboxing.\n\n ## Root Cause\n\nThe IDE companion uses **HTTP over TCP** to communicate between the container and the host VSCode instance. \n\n ## Additional Context\n\n - gVisor is designed for stronger isolation, so this limitation is somewhat expected\n - The issue affects all IDE integration features, not just connection status\n - STDIO-based connection would be the most elegant solution as it works regardless of isolation level\n - This should be documented in sandbox capability matrix\n",
"number": 21331,
"title": "IDE companion extension fails to connect with gVisor (runsc) sandbox",
"url": "https://github.com/google-gemini/gemini-cli/issues/21331",
"analysis": "The root cause is that the IDE companion extension relies on HTTP over TCP for communication between the sandboxed environment and the host VSCode instance. While Docker's default networking often allows this, gVisor (runsc) implements a much stricter network stack that isolates the sandbox from the host's network namespace, breaking the TCP connection. The codebase already contains references to a STDIO-based connection mechanism in `packages/core/src/ide/ide-connection-utils.ts` (lines 83-103) via environment variables like `GEMINI_CLI_IDE_SERVER_STDIO_COMMAND`, but this is likely not the default or is not being automatically configured when `GEMINI_SANDBOX=runsc` is detected. The fix involves migrating the IDE communication layer to use standard I/O streams, which are preserved by the container runtime (runsc/docker) regardless of network isolation levels.",
"effort_level": "medium",
"reasoning": "The codebase already contains the infrastructure for STDIO-based communication, including StdioClientTransport and helper functions like getStdioConfigFromEnv. The fix involves logic tracing to detect the gVisor sandbox environment and ensuring the transport selection in ide-client.ts prioritizes STDIO over HTTP when runsc is active. This requires integration testing across different container runtimes and state synchronization between the environment detection and the connection logic, fitting the Medium criteria.",
"validated": true
},
{
"body": "### What happened?\n\nFooter is gone despite being enabled. I tried toggling hide footer in /settings on and off, with no effect.\n\nI have most options enabled (full setting attached)\n```\n \"footer\": {\n \"hideContextPercentage\": false,\n \"hideModelInfo\": false,\n \"hideSandboxStatus\": false,\n \"hideCWD\": false\n },\n \"hideFooter\": false\n```\n\n### What did you expect to happen?\n\nSee the footer stats. Cwd, Model in use, Context %, Memory usage...\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n\u2502 CLI Version 0.32.1 \u2502\n\u2502 Git Commit e8a57c78c \u2502\n\u2502 Model Auto (Gemini 3) \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS darwin \u2502\n\u2502 Auth Method Logged in with Google (REDACTED@gmail.com) \u2502\n\u2502 Tier Gemini Code Assist in Google One AI Pro```\n```\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\nThese are my settings.json\n[settings.json](https://github.com/user-attachments/files/25744046/settings.json)",
"number": 21113,
"title": "Footer is gone after update",
"url": "https://github.com/google-gemini/gemini-cli/issues/21113",
"analysis": "The bug is likely a regression in version 0.32.1 where the footer component's visibility logic in the CLI UI is disconnected from the configuration settings. The user reports that toggling 'hideFooter' in settings has no effect, which suggests the rendering condition in the main UI layout (likely `packages/cli/src/ui/App.tsx` or `packages/cli/src/ui/components/Footer.tsx`) is either using an incorrect configuration path (e.g., looking for `config.footer.hideFooter` instead of `config.hideFooter`) or is being suppressed by a hardcoded condition or a layout bug that prevents the component from being rendered in the Ink tree. Given the 'Code Assist' tier mentioned in the client info, there might also be logic that incorrectly hides the footer for specific account types or tiers introduced in the latest update.",
"effort_level": "medium",
"reasoning": "The issue involves a regression in UI state synchronization where the footer visibility does not respond to configuration changes. This requires tracing the logic between the settings management and the React/Ink rendering tree to ensure the 'hideFooter' state is correctly propagated and handled in the UI components, which fits the criteria for Medium effort involving state management and logic tracing.",
"validated": true
},
{
"body": "### What happened?\n\nWhen using `gemini-cli` in ACP mode (`--experimental-acp`), the `AgentThoughtChunk` session update is **never emitted** during streaming responses. Only `AgentMessageChunk` updates are received, even though thinking is clearly happening (the model takes time before responding, and the response quality indicates thinking occurred).\n\n### Expected behavior\n\nWhen `includeThoughts: true` is set in `thinkingConfig` (which is the default in `chat-base` alias), streaming responses should include parts with `part.thought = true`, which would cause `zedIntegration.ts` line 578 to emit `agent_thought_chunk` updates.\n\n### Reproduction\n\nMinimal ACP client test:\n\n```python\nimport asyncio, json, os, tempfile\nfrom pathlib import Path\nfrom acp import PROTOCOL_VERSION, connect_to_agent, text_block\nfrom acp.schema import ClientCapabilities\n\nsettings = {\n \"admin\": {\"mcp\": {\"enabled\": False}, \"extensions\": {\"enabled\": False}, \"skills\": {\"enabled\": False}},\n \"modelConfigs\": {\n \"customOverrides\": [{\n \"match\": {\"model\": \"gemini-3-pro-preview\"},\n \"modelConfig\": {\n \"generateContentConfig\": {\n \"temperature\": 1.0,\n \"thinkingConfig\": {\"thinkingLevel\": \"HIGH\", \"includeThoughts\": True},\n \"thinkingSummaries\": \"auto\",\n }\n }\n }]\n }\n}\n\ntmpdir = tempfile.mkdtemp()\nsettings_path = Path(tmpdir) / \"settings.json\"\nsettings_path.write_text(json.dumps(settings))\n\nenv = os.environ.copy()\nenv[\"GEMINI_CLI_SYSTEM_SETTINGS_PATH\"] = str(settings_path)\n\nclass Client:\n async def session_update(self, session_id, update, **kwargs):\n print(f\" {type(update).__name__}\") # Always AgentMessageChunk, never AgentThoughtChunk\n async def approve_tool_call(self, session_id, tool_call):\n return True\n\nproc = await asyncio.create_subprocess_exec(\n \"gemini\", \"--experimental-acp\", \"--yolo\",\n stdin=asyncio.subprocess.PIPE, stdout=asyncio.subprocess.PIPE,\n stderr=asyncio.subprocess.PIPE, env=env, limit=50*1024*1024,\n)\nconn = connect_to_agent(Client(), proc.stdin, proc.stdout)\nawait conn.initialize(protocol_version=PROTOCOL_VERSION, client_capabilities=ClientCapabilities())\nresp = await conn.new_session(cwd=os.getcwd(), mcp_servers=[])\nawait conn.prompt([text_block(\"What is 15*17? Think step by step.\")], resp.session_id)\n# Result: only AgentMessageChunk, zero AgentThoughtChunk\n```\n\n### Analysis\n\nThe code path in `zedIntegration.ts` (line ~578) correctly checks `part.thought` to decide between `agent_thought_chunk` and `agent_message_chunk`:\n\n```typescript\nthis.sendUpdate({\n sessionUpdate: part.thought\n ? 'agent_thought_chunk'\n : 'agent_message_chunk',\n content,\n});\n```\n\nThe issue appears to be that the **Gemini API does not return `part.thought = true`** in streaming responses for Gemini 3 / 3.1 models, even when `includeThoughts: true` is configured. The default `chat-base` alias already sets `includeThoughts: true`, and we also tried `thinkingSummaries: \"auto\"` \u2014 neither produces thought-tagged parts.\n\nThis affects all ACP clients (Zed editor, avatar-engine, custom clients) that rely on `AgentThoughtChunk` to show a thinking indicator in their UI.\n\n### Environment\n\n- gemini-cli: 0.31.0\n- OS: Linux (Arch)\n- Models tested: gemini-3-pro-preview, gemini-3.1-pro\n- ACP SDK: agent-client-protocol 0.8.x\n- Also tested with gemini-cli 0.33.0-nightly \u2014 same result\n\n### Additional context\n\n- The `defaultModelConfigs.ts` `chat-base` alias includes `includeThoughts: true` \u2014 this is the CLI's own default, yet it has no effect\n- Gemini confirmed (via direct prompt) that gemini-3.1-pro supports `thought: true` in streaming, suggesting this may be a server-side regression\n- `thinkingSummaries: \"auto\"` (Interactions API field) was also tested \u2014 no effect\n- The `streamHistory` path (line 462) correctly handles `msg.thoughts` for session resume, but live streaming never produces thought parts",
"number": 20977,
"title": "ACP: AgentThoughtChunk never emitted despite includeThoughts: true in streaming",
"url": "https://github.com/google-gemini/gemini-cli/issues/20977",
"analysis": "The bug occurs because the ACP (Agent Client Protocol) implementation in `zedIntegration.ts` does not correctly handle or forward 'thought' parts from the LLM stream. While the `thinkingConfig` is correctly passed to the model (as evidenced by the model's behavior), the resulting stream chunks containing thinking process data are either not being flagged with the `thought: true` property by the core LLM client, or the stream handler in `zedIntegration.ts` (specifically around line 578) is failing to catch and emit them as `agent_thought_chunk` updates. The logic likely only iterates over `text` parts and ignores parts designated as `thought` in the Gemini API response.",
"effort_level": "medium",
"reasoning": "The issue requires tracing the data flow of streaming response chunks from the Gemini API through the internal LLM client and into the ACP bridge (zedIntegration.ts). It involves identifying how the 'thought' property is represented in the Gemini stream and ensuring it is correctly mapped to the ACP 'agent_thought_chunk' message. This falls under service integration and asynchronous flow management, as it requires validating intermediate API response processing within a streaming context.",
"validated": true
},
{
"body": "### What happened?\n\nProblem:\n The Gemini CLI was exhibiting redundant vertical empty lines between UI elements, making the interface look cluttered and\n unprofessional. This occurred specifically between agent messages, user prompts, and within the tool execution/confirmation boxes.\n\n\n Root Causes:\n * Unintended Margins: Several components (GeminiMessage, GeminiMessageContent, and UserMessage) were applying default top or vertical\n margins that created gaps between consecutive history items.\n * Header Padding: The StickyHeader component used for tool calls and \"Action Required\" boxes had internal padding and a hardcoded\n separator line that added excessive visual weight.\n * Empty Containers: Confirmation dialogs were reserving space for a \"question\" line even when no question text was present (e.g., in\n AskUser dialogs).\n\n<img width=\"1688\" height=\"214\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/a37e834a-f830-48a3-b50d-1d7d6e396b78\" />\n\n<img width=\"1350\" height=\"238\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/4ce099da-79e4-4ae2-8f8f-99e59c2cb51c\" />\n\n<img width=\"1282\" height=\"322\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/33c658db-438a-4a65-8822-4988117f8c6f\" />\n\n### What did you expect to happen?\n\nNo extra empty lines at the end\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\nClient information\nCLI Version: 0.31.0\nGit Commit: https://github.com/google-gemini/gemini-cli/commit/72c6533542cd03dad44f7baf6d4d1fddad3539a4\nSession ID: 60af87be-95c3-405f-ae9b-d67c749945d2\nOperating System: darwin v20.13.1\nSandbox Environment: no sandbox\nModel Version: gemini-3-flash-preview\nAuth Type: gemini-api-key\nMemory Usage: 280.1 MB\nTerminal Name: xterm.js(6.1.0-beta.109)\nTerminal Background: #1e1e1e\nKitty Keyboard Protocol: Unsupported\nIDE Client: VS Code\nLogin information\nLogin information\nReproduced with both Google Account and API Key authentication.\n```\n\n</details>\n\n\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 20949,
"title": "Redundant Trailing Empty Lines in CLI Containers",
"url": "https://github.com/google-gemini/gemini-cli/issues/20949",
"analysis": "The bug is caused by hardcoded layout properties (margins and paddings) within the React/Ink components used for the CLI's user interface. Specifically:\n1. **Margins**: `GeminiMessage`, `GeminiMessageContent`, and `UserMessage` components likely have `marginTop` or `paddingY` attributes on their root `<Box>` elements, causing gaps between consecutive messages in the history.\n2. **StickyHeader**: The `StickyHeader` component (used in `ToolMessage` and `ShellToolMessage`) contains internal padding and a hardcoded separator (likely a `<Text>` or `<Box>` with a border/dashes) that adds vertical height regardless of content.\n3. **Conditional Rendering**: Confirmation dialogs (like `AskUser`) are rendering a line for the 'question' prop even when it is an empty string, instead of conditionally rendering the element only when content exists.",
"effort_level": "small",
"reasoning": "The issue involves minor aesthetic adjustments to padding, margins, and layout within Ink components, as well as trivial conditional rendering logic for empty strings. These tasks are highly localized to the UI presentation layer and align directly with the 'Small' effort criteria for UI/Aesthetic adjustments and trivial logic.",
"validated": true,
"recommended_implementation": "Remove 'marginTop' and 'marginY' props from the root Box elements in GeminiMessage.tsx, GeminiMessageContent.tsx, and UserMessage.tsx. In StickyHeader.tsx, remove internal padding and the hardcoded separator line. Update confirmation dialogs like AskUser.tsx to conditionally render the question text only when it is a non-empty string."
},
{
"body": "### What happened?\n\nWhen attempting to expand a large tool output (e.g., a write_file call with ~300 lines of code) using the Ctrl+O shortcut, the terminal UI enters an infinite recursion loop.\n\n### What did you expect to happen?\n\nThe content should expand, allowing the user to scroll through the diff normally.\n\n### Client information\n\n\n* **CLI Version:** 0.31.0\n* **Git Commit:** 72c653354\n* **Session ID:** d1336d8a-7620-48d7-99f2-1a3b74b0ed18\n* **Operating System:** darwin v24.13.1\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto-gemini-3\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 435.9 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** #1e1e1e\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\nGoogle Account\n\n### Anything else we need to know?\n\nThe terminal starts scrolling upward indefinitely. The entire conversation history begins to duplicate and repeat itself with every \"frame\" of the UI update, filling the terminal buffer with redundant text. The UI becomes unresponsive to further scrolling, and the only way to stop the loop is to collapse the view back (using the toggle shortcut).",
"number": 20885,
"title": "UI recursion/infinite scrolling when expanding large diffs via Ctrl+O (macOS/Zed)",
"url": "https://github.com/google-gemini/gemini-cli/issues/20885",
"analysis": "The bug is likely caused by a render loop in the React/Ink-based UI when a large tool output (like a 300-line diff) is expanded. When 'Ctrl+O' is pressed, it toggles an expansion state. If the resulting rendered content exceeds the terminal's height, it can trigger a terminal scroll or resize event. If the UI has a listener for terminal dimensions (e.g., a 'useTerminalSize' hook or a resize event handler) that updates state to re-calculate text wrapping or layout, this creates a feedback loop: Expand -> Render Large Content -> Terminal Scrolls/Resizes -> State Update -> Re-render -> Terminal Scrolls/Resizes. The 'duplication' of history is a known behavior of the 'ink' library when the terminal buffer is flooded or when it loses track of the 'Static' component's position due to excessive scrolling, causing it to re-print the entire component tree to the terminal.",
"effort_level": "medium",
"reasoning": "The issue involves a complex interaction between React state management (Ink) and terminal rendering logic. Fixing the infinite recursion loop requires tracing state updates across components, handling terminal dimension synchronization, and potentially implementing debouncing or height constraints to prevent the feedback loop. This aligns with the Medium criteria for React/Ink state management and UI synchronization.",
"validated": true
},
{
"body": "## Bug Description\n\nIn non-interactive mode, the `AgentExecutionBlocked` event handler in `nonInteractiveCli.ts` only outputs a warning in **TEXT** format. Programmatic consumers using **STREAM_JSON** receive **no notification** when the agent is blocked by a safety filter or policy.\n\n### Current behavior\n\n| Output Format | `AgentExecutionBlocked` Output |\n|---|---|\n| TEXT | \u2705 `[WARNING] Agent execution blocked: ...` written to stderr |\n| STREAM_JSON | \u274c **Silently swallowed** \u2014 no event emitted |\n| JSON | \u274c **Silently swallowed** |\n\n### Expected behavior\n\nSTREAM_JSON should emit a `JsonStreamEventType.ERROR` event with `severity: 'warning'` \u2014 the same pattern used by `LoopDetected` and other diagnostic events.\n\n### Affected file\n\n`packages/cli/src/nonInteractiveCli.ts` \u2014 lines 387-392\n",
"number": 20859,
"title": "bug: AgentExecutionBlocked produces no output in non-interactive STREAM_JSON mode",
"url": "https://github.com/google-gemini/gemini-cli/issues/20859",
"analysis": "The bug is located in the event handling logic within `nonInteractiveCli.ts`. When the agent emits an `AgentExecutionBlocked` event (typically triggered by safety filters or policy violations), the CLI's non-interactive runner only checks if the output format is `TEXT`. If so, it logs a warning to `stderr`. However, it lacks corresponding logic for `STREAM_JSON` and `JSON` formats, causing these programmatic output modes to omit the event entirely. To fix this, the handler for `GeminiEventType.AgentExecutionBlocked` must be updated to call the JSON streaming output utility (likely `writeJsonStreamEvent` or similar) with a payload containing `type: 'error'`, `severity: 'warning'`, and the blocking reason, matching the implementation of the `LoopDetected` event.",
"effort_level": "small",
"reasoning": "The fix is highly localized to a single event handler within nonInteractiveCli.ts. It involves adding a conditional check for the output format and calling an existing formatter method, following a pattern already established for other diagnostic events. This qualifies as a trivial logic adjustment with a clear root cause.",
"validated": true,
"recommended_implementation": "In `packages/cli/src/nonInteractiveCli.ts`, update the `GeminiEventType.AgentExecutionBlocked` event handler to include an `else if (streamFormatter)` block. This block should call `streamFormatter.writeEvent` with `type: JsonStreamEventType.ERROR`, `severity: 'warning'`, and a message containing the blocking reason."
},
{
"body": "### What happened?\n\nis there some bizarre indexing that has a hard limit per project?\n\nsome random percentage of the files in my project are simply not visible to gemini cli. My project directory definitely has less than 10 million files, probably far less than 500k. however, I am unable to tag many of them, and gemini is unable to read them without using bash tools (which obviously works just fine)\n\nevery time I gitignore another broad swath of unimportant files, it unlocks another large set of files I am then able to tag. this leads me to think that there is a piece of logic that is explicitly hiding broad fractions of my project (including critical code and documentation)\n\n### What did you expect to happen?\n\nfor gemini to be able to... *read a file* at a path unless it is gitignored or geminiignored\n\nI would advise, if you are unable to implement ReadFile to a rough MVP level, to essentially just delete the feature and have gemini use cat/sed etc because these work just fine. I am fine with manually pointing gemini at files without tagging, but it is harmful to tell gemini that files do not exist when they are the crux of a refactor.\n\n### Client information\n\n0.31 darwin on gemini ultra, m3 max 32gb\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\nif there's a limit can you just disable it with MAX_INT_32 or something? my codebase is not big at all, less than 10gb. or if your concern is that enterprise-scale codebases will not load on, like, low-end mobile devices, can you make it a setting?",
"number": 20730,
"title": "gemini is not able to view files that exist, and I am not able to tag them (despite not being gitignored/geminiignored)",
"url": "https://github.com/google-gemini/gemini-cli/issues/20730",
"analysis": "The bug is caused by a hardcoded limit on the number of files indexed or tracked by the gemini-cli workspace. The user's observation that 'gitignoring another broad swath... unlocks another large set of files' is a definitive indicator of a fixed-size buffer or a 'max files' constant in the file discovery logic. This limit prevents the CLI from 'seeing' or 'tagging' files once the threshold is reached, even if they are not ignored. The `ReadFile` tool likely validates requested paths against this truncated index, leading to the reported failure where Gemini claims files do not exist despite being present on disk.",
"effort_level": "small",
"reasoning": "The issue is identified as a hardcoded limit in the file discovery or indexing logic, likely within the FileDiscoveryService. Fixing this involves locating and increasing a constant or configuration value, which is a highly localized change with a clear root cause, fitting the criteria for a Small effort level.",
"validated": true,
"recommended_implementation": "In the file discovery service (likely `src/services/file-discovery.ts`), locate the hardcoded constant limiting the number of indexed files, such as `MAX_FILES`, and increase it to a significantly higher value or remove the limit to ensure all non-ignored files are tracked."
},
{
"body": "## What happened?\nWhen running Gemini CLI in non-interactive mode with `--output-format json`, if an `AgentExecutionStopped` event occurs (triggered by hooks, policies, or the agent framework), **no JSON output is produced**. The CLI exits silently with zero output to stdout.\nThis affects any consumer parsing JSON output from `gemini -p \"...\" --output-format json` \u2014 they receive nothing when the agent is stopped.\n### Root Cause\nIn `packages/cli/src/nonInteractiveCli.ts`, the `AgentExecutionStopped` event handler (line ~367-386) handles:\n- \u2705 **TEXT mode**: writes stop message to stderr\n- \u2705 **STREAM_JSON mode**: emits a `RESULT` event via `streamFormatter`\n- \u274c **JSON mode**: missing \u2014 returns silently with no output\nThe identical handler for `STOP_EXECUTION` tool errors (line ~464-492) correctly handles all three output formats, confirming this is an oversight rather than intentional behavior.\n## What did you expect to happen?\nWhen `--output-format json` is used and `AgentExecutionStopped` occurs, the CLI should produce valid JSON output containing the session ID, any partial response text, and session stats \u2014 the same behavior as the `STOP_EXECUTION` tool handler.\n## Client information\nVerified on latest `main` branch (commit `3db35812b`).\n## Anything else we need to know?\nThe existing test at `nonInteractiveCli.test.ts` only covers TEXT mode for this event. There are no tests for JSON or STREAM_JSON output when `AgentExecutionStopped` is received.\nFor comparison, the `STOP_EXECUTION` tool error path has dedicated tests for all three formats:\n- `should stop agent execution immediately when a tool call returns STOP_EXECUTION error` (TEXT)\n- `should write JSON output when a tool call returns STOP_EXECUTION error` (JSON)\n- `should emit result event when a tool call returns STOP_EXECUTION error in streaming JSON mode` (STREAM_JSON)\n",
"number": 20453,
"title": "Bug: AgentExecutionStopped produces no output in non-interactive JSON mode",
"url": "https://github.com/google-gemini/gemini-cli/issues/20453",
"analysis": "The bug is located in `packages/cli/src/nonInteractiveCli.ts`. The event handler for `GeminiEventType.AgentExecutionStopped` (around lines 367-386) lacks logic for the `JSON` output format. While it correctly handles `TEXT` (writing to stderr) and `STREAM_JSON` (emitting via `streamFormatter`), it returns silently when `outputFormat` is set to `JSON`. This contrasts with the `STOP_EXECUTION` tool error handler in the same file, which correctly implements all three formats. The fix involves adding a branch for `OutputFormat.JSON` that aggregates the current session state (ID, partial text, and stats) and prints it to stdout before exiting.",
"effort_level": "small",
"reasoning": "The issue is a localized logic gap in a single file (nonInteractiveCli.ts). The fix involves implementing a missing branch for JSON output by following an existing pattern used for other event handlers in the same file. Given the clear root cause and the availability of existing testing patterns, this task is estimated to take less than one day.",
"validated": true,
"recommended_implementation": "In `packages/cli/src/nonInteractiveCli.ts`, update the `GeminiEventType.AgentExecutionStopped` event handler to include a branch for `OutputFormat.JSON` that instantiates a `JsonFormatter` and writes the formatted session ID, partial text, and stats to `process.stdout` before returning."
},
{
"body": "### What happened?\n\nWhen the changes are displayed, if you press CTRL + O to extend them, the screen goes black for a few seconds, turning the interface completely black. After a few seconds, the content of the GEMINI CLI returns, scrolling strangely and flickering. This happens every time I press CTRL + O to view the changes.\n\n### What did you expect to happen?\n\nnot flick, black screen and scroll crazy\n\n### Client information\n\nCLI Version 0.30.0-nightly.20260210.a2174751d\nModel Auto (Gemini 3)\nSandbox no sandbox\nOS win32\nAuth Method Logged in with Google\nTier Gemini Code Assist for individuals\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 20356,
"title": "When there is a visualization of the changes, if you press CTRL + O to extend the changes, the screen turns black for a few seconds.",
"url": "https://github.com/google-gemini/gemini-cli/issues/20356",
"analysis": "The bug is a terminal rendering issue specific to the Windows (win32) environment when toggling UI states in the CLI. When `CTRL + O` is pressed, the application likely triggers a state change to 'extend' or expand the view of proposed changes. This causes a full-screen re-render. On Windows, the terminal's handling of ANSI escape codes for clearing the screen (e.g., `\\u001b[2J`) or switching to the alternate screen buffer can cause a 'black screen' if the redraw is not atomic or if the buffer size is miscalculated. The 'strange scrolling and flickering' suggests that the cursor position is not being correctly restored or that the terminal's scrollback buffer is being corrupted during the transition from a condensed to an expanded view. This is a classic issue in Node.js CLI frameworks (like Ink or Blessed) when dealing with the Windows Console API.",
"effort_level": "large",
"reasoning": "The issue involves platform-specific terminal rendering bugs on Windows (win32), specifically related to screen buffer management and ANSI escape sequence handling during UI state transitions. According to the criteria, deep terminal/PTY issues on Windows are classified as Large effort due to the complexity of debugging cross-platform terminal inconsistencies and ensuring atomic redraws in the Windows Console API.",
"validated": true
},
{
"body": "### What happened?\n\nWhen attempting to reference a specific line or range of a file using the syntax `@filename:line` (e.g., `@app.js:10`) or `@filename:start-end` (e.g., `@app.js:10-20`), the CLI becomes unresponsive (hangs) and requires a force quit.\n\nIt seems the CLI might be trying to resolve the entire string (including the colon and numbers) as a file path, or it gets stuck in an infinite loop trying to parse the syntax.\n\n**Steps to Reproduce:**\n1. Start `gemini-cli`.\n2. Type a prompt including a file reference with line numbers.\n - Example: `Explain this function @src/main.js:15-25`, `@src/main.js#L10-#L25`, `@src/main.js:10` or `@src/main.js#L10`.\n3. Press **Enter**.\n4. The CLI freezes (cursor might blink, but no output or response occurs, and input is blocked).\n5. `Ctrl+C` often fails to interrupt the process immediately.\n\n### What did you expect to happen?\n\n- **Ideal:** The CLI should read only the specified lines of the file, similar to other AI CLI tools (e.g., Claude Code).\n I initially thought range reading was supported, but later realized it is not.\n- **Fallback:** If this syntax is not supported, it should return a clear error message (e.g., \"File not found\" or \"Line number syntax not supported\") instead of hanging indefinitely.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\nAbout Gemini CLI\nCLI Version 0.29.5\nGit Commit 2ef872e73\nModel gemini-3-pro-preview\nSandbox no sandbox\nOS darwin\nAuth Method Logged in with Google\nTier Gemini Code Assist in Google One AI Pro\n```\n\n</details>\n\n### Login information\n\nGoogle Account\n\n### Anything else we need to know?\n\nI noticed this syntax (`@filename:line`) works seamlessly in other AI CLI tools (like Claude Code), which led to the confusion. If this feature is not supported in `gemini-cli`, a graceful failure with an informative error message would be much better than a freeze. This issue significantly disrupts the workflow as it forces a restart of the CLI session.\n\n\n### Vedio\n\nhttps://github.com/user-attachments/assets/1fb2d5ab-d16a-4020-9e2b-aa3644086a4f",
"number": 19985,
"title": "CLI hangs/freezes when using `@filename:line` or `@filename:range` syntax",
"url": "https://github.com/google-gemini/gemini-cli/issues/19985",
"analysis": "The bug is caused by a synchronous infinite loop in the prompt parsing logic when it encounters the '@' symbol followed by a colon or range syntax (e.g., '@filename:10'). The CLI's prompt pre-processor likely uses a regex to identify file references starting with '@'. When it matches a string like '@app.js:10', but the subsequent logic (which might be expecting just a filename) fails to correctly consume or replace this match in the prompt string, the parsing loop continues to find the same match indefinitely. This blocks the Node.js event loop, explaining why the UI freezes and 'Ctrl+C' fails to interrupt the process immediately. The 'Synchronous Pressure Barrier' mentioned in 'packages/core/src/context/graph/render.ts' suggests the system has mechanisms for handling context synchronously, which is where such a loop would likely reside during the context gathering phase after Enter is pressed.",
"effort_level": "medium",
"reasoning": "The issue involves a synchronous infinite loop in the prompt parsing logic, specifically where the CLI identifies and resolves file references using the '@' symbol. Fixing this requires logic tracing within the parser to identify why the loop fails to advance when encountering colons or range syntax. This falls under the 'Parsers and Validation' category of the Medium criteria, as it requires adjusting parsing logic and ensuring robust validation across multiple syntax variations (@file:line, @file:range, @file#L) to prevent event loop blockage.",
"validated": true
},
{
"body": "### What happened?\n\nText completion for files and directories no longer work when typing `@` after having [context.fileFiltering.customIgnoreFilePaths](https://geminicli.com/docs/reference/configuration/#the-gemini-directory-in-your-project:~:text=context.fileFiltering.customIgnoreFilePaths) setting added to settings.json\n\n<img width=\"1040\" height=\"842\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/dee92d78-fbf4-40df-bdd2-7c0d84dc33cd\" />\n\nRelated to https://github.com/google-gemini/gemini-cli/pull/16487 ?\n\n### What did you expect to happen?\n\nPath completion to work after typing @\n\n<img width=\"372\" height=\"248\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/23bc401c-3384-4511-b177-c1654e47e94c\" />\n\n(works after removing fileFiltering from setting)\n\nRemoving this fixes the issue:\n```\n \"context\": {\n \"fileFiltering\": {\n \"customIgnoreFilePaths\": [\n \"node_modules/\"\n```\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n\u2502 About Gemini CLI \u2502\n\u2502 \u2502\n\u2502 CLI Version 0.29.5 \u2502\n\u2502 Git Commit 2ef872e73 \u2502\n\u2502 Model Auto (Gemini 3) \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS darwin \u2502\n\u2502 Auth Method Logged in with Google (REDACTED @gmail.com) \u2502\n\u2502 Tier Gemini Code Assist in Google One AI Pro\n```\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n\nHere is my full settings\n\n<details>\n<summary>settings.json</summary>\n\n```json\n{\n \"security\": {\n \"auth\": {\n \"selectedType\": \"oauth-personal\"\n },\n \"enablePermanentToolApproval\": true\n },\n \"ui\": {\n \"showStatusInTitle\": true,\n \"showModelInfoInChat\": true,\n \"inlineThinkingMode\": \"full\",\n \"showMemoryUsage\": true,\n \"loadingPhrases\": \"off\",\n \"showCitations\": true,\n \"accessibility\": {\n \"enableLoadingPhrases\": false\n }\n },\n \"general\": {\n \"enableNotifications\": true,\n \"previewFeatures\": true,\n \"preferredEditor\": \"vscode\",\n \"vimMode\": false,\n \"checkpointing\": {\n \"enabled\": true\n }\n },\n \"context\": {\n \"fileName\": [\"GEMINI.md\", \"AGENTS.md\"],\n \"fileFiltering\": {\n \"respectGitIgnore\": false,\n \"customIgnoreFilePaths\": [\n \"node_modules/\",\n \"temp/\",\n \"cache/\"\n ]\n }\n },\n \"skills\": {\n \"enabled\": true\n },\n \"experimental\": {\n \"modelSteering\": true\n },\n \"privacy\": {\n \"usageStatisticsEnabled\": false\n }\n}\n```\n\n</details>",
"number": 19868,
"title": "\"context.fileFiltering.customIgnoreFilePaths\" setting breaks file completion when using @",
"url": "https://github.com/google-gemini/gemini-cli/issues/19868",
"analysis": "The bug is triggered by the `context.fileFiltering.customIgnoreFilePaths` setting in `settings.json`. When this setting is present, the file completion mechanism (triggered by `@`) fails to return results. This suggests that the logic responsible for filtering files during completion is either crashing or incorrectly excluding all files when custom ignore paths are provided. The root cause likely lies in how the `customIgnoreFilePaths` array is processed and integrated into the file search query (likely using `ripgrep` as evidenced by the vendor binaries in the context). If the paths are incorrectly formatted as glob patterns or if the exclusion logic in the file service is flawed (e.g., treating exclusions as the only allowed paths), completion will break.",
"effort_level": "medium",
"reasoning": "The issue involves tracing the integration between the configuration layer and the file search service. It requires debugging how 'customIgnoreFilePaths' are parsed and converted into ignore patterns for the underlying search tool (likely ripgrep). This falls under 'Service Integration' and 'Parsers and Validation' as it involves logic tracing across the configuration, completion provider, and file filtering subsystems to ensure robust path handling.",
"validated": true
},
{
"body": "The Action Required confirmation prompt currently repeats the same command name multiple times when executing chained commands (e.g., `git, git, git` for `git status && git diff && git log`). This should be deduplicated to just show the unique commands being executed.",
"number": 19768,
"title": "fix: Duplicate command names in Action Required confirmation",
"url": "https://github.com/google-gemini/gemini-cli/issues/19768",
"analysis": "The bug occurs in the logic that generates the list of command names for the 'Action Required' confirmation prompt. When chained commands (e.g., using `&&` or `;`) are executed, the system extracts the base command name (like 'git') for each part of the chain. However, it fails to deduplicate these names before joining them into a comma-separated string, resulting in outputs like 'git, git, git'. Based on the search context, the most relevant logic for constructing a list of actions ('Action Path') is found in `packages/core/src/context/agentHistoryProvider.ts`, which describes an 'Action Path' as a 'chronological list of tools called'. While the prompt itself is likely rendered in a UI component (hypothesized as `packages/cli/src/ui/components/ActionRequired.tsx` or similar), the underlying logic that extracts and formats these command names is the root cause.",
"effort_level": "small",
"reasoning": "The issue is a localized string formatting fix. Deduplicating a list of command names (e.g., using a Set or filter) before joining them into a display string is a trivial logic change. It falls under the 'Trivial Logic/Config' and 'String/Content Updates' criteria for a Small effort level, as it involves simple data formatting for a UI prompt and is likely constrained to a single location where the 'Action Path' is generated or rendered.",
"validated": true,
"recommended_implementation": "In the logic that generates the 'Action Required' prompt (likely in `packages/cli/src/ui/components/ActionRequired.tsx`), deduplicate the list of command names by wrapping the array in `[...new Set(commandNames)]` before joining them into a comma-separated string."
},
{
"body": "### What happened?\n\nSimilar to https://github.com/google-gemini/gemini-cli/issues/5009, but not dependent on a new message, it just continues to jump every couple of seconds. \n\nUsing Gemini-cli yesterday and today, I noticed it keeps jumping up in scroll position. Constantly every couple of seconds.\n\n\n\n### What did you expect to happen?\n\nThe scroll position to stay put rather than constantly jumping around. It's very hard to use.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n\n\u2502 About Gemini CLI \u2502\n\u2502 \u2502\n\u2502 CLI Version 0.30.0-nightly.20260210.a2174751d-git.60be42f \u2502\n\u2502 Git Commit 60be42f \u2502\n\u2502 Model gemini-3-flash-preview \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS darwin \u2502\n\u2502 Auth Method Logged in with Google (-omitted-@google.com) \u2502\n\u2502 Tier Gemini Code Assist Enterprise \u2502\n\u2502 GCP Project shared-g3-gemini-quota\n\n```\n\n</details>\n\n### Login information\n\nGoogle Account\n\n### Anything else we need to know?\n\nIf the scroll position is already at the start, the entire window flickers instead of jumping positions every couple of seconds.",
"number": 19468,
"title": "Scroll position continuously jumping to start",
"url": "https://github.com/google-gemini/gemini-cli/issues/19468",
"analysis": "The scroll jumping and flickering are caused by frequent re-renders of the `Static` history component in `MainContent.tsx`. This happens when background state updates (like telemetry or periodic model status checks) cause a context update that either increments `historyRemountKey` or forces a full component tree refresh, causing Ink to re-output the entire static history to the terminal buffer.",
"effort_level": "medium",
"reasoning": "The issue involves tracing state synchronization between background services and the React/Ink rendering loop. It requires debugging how UIStateContext updates trigger re-renders in MainContent.tsx and refining the logic for historyRemountKey. This fits the Medium criteria for React/Ink state management and logic tracing across multiple UI components.",
"validated": true
},
{
"body": "When running locally this test fails on windows. skipping so it is easier to run tests on windows.",
"number": 19387,
"title": "should trust a folder if the rule matches the realpath flakes on windows",
"url": "https://github.com/google-gemini/gemini-cli/issues/19387",
"analysis": "The failure on Windows is caused by inconsistent path normalization during the comparison between a directory's 'realpath' and the stored trust rules. On Windows, `fs.realpath` returns a canonical path that typically uses backslashes (`\\`) and specific drive letter casing (e.g., `C:\\`). If the trust rule is stored with forward slashes (`/`) or different casing, a direct string comparison (`===`) will fail even if the paths point to the same location. This is a common issue in Node.js cross-platform development where path separators and case-insensitivity on Windows are not accounted for in equality checks.",
"effort_level": "medium",
"reasoning": "The issue involves cross-platform path normalization and filesystem resolution bugs, which are explicitly categorized as Medium effort. While the fix is likely localized to the trust verification logic, it requires logic tracing and robust validation to ensure path equality works correctly across different separators and casing on Windows versus POSIX systems.",
"validated": true
},
{
"body": "### What happened?\n\n<img width=\"1918\" height=\"1042\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/8e715f91-cecf-4b6a-ba7c-85d0dd22ab00\" />\n\n### What did you expect to happen?\n\nWrites resource is busy or locked. But im not using extension workspace at the moment.\n\n### Client information\n\n\n* **CLI Version:** 0.28.2\n* **Git Commit:** da5e47ae3\n* **Session ID:** 810fbc1b-e549-426b-a296-63afa6503fa2\n* **Operating System:** win32 v24.13.0\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto-gemini-2.5\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 206.0 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** Unknown\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 19282,
"title": "Run \"/extensions update google-workspace\" failed",
"url": "https://github.com/google-gemini/gemini-cli/issues/19282",
"analysis": "The bug occurs on Windows ('win32') when running the `/extensions update google-workspace` command. The error 'resource is busy or locked' (typically EBUSY or EPERM on Windows) indicates that the CLI is attempting to modify, move, or overwrite files that are currently being held by another process. In the context of the `google-workspace` extension (which is an MCP server), this happens because the MCP server process is likely still running in the background, even if the user isn't actively 'using' it. Windows strictly prevents file modifications on active executables or files with open handles. The update logic fails to explicitly stop the running MCP client/process before attempting the update.",
"effort_level": "large",
"reasoning": "The issue involves platform-specific child process management (Windows file locking) and requires cross-component synchronization between the CLI extension commands and the Core MCP client lifecycle management. According to the criteria, platform-specific complexities involving child process management on Windows are classified as Large effort.",
"validated": true
},
{
"body": "### What happened?\n\n- used `!` to change branches\n- Noticed the UI didn't update at the bottom of the screen, even after prompting\n\n<img width=\"1207\" height=\"561\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/5ca07520-5bee-4623-a180-647a8aeefdc4\" />\n\n### What did you expect to happen?\n\nReflect the current branch?\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\nCLI Version 0.30.0-nightly.20260210.a2174751d-git.60be42f \u2502\n\u2502 Git Commit 60be42f \u2502\n\u2502 Model gemini-3-flash-preview \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS darwin \u2502\n\u2502 GCP Project shared-g3-gemini-quota \u2502\n\u2502\n```\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 19271,
"title": "If I switch git branches within the CLI, it's not reflected in the UI",
"url": "https://github.com/google-gemini/gemini-cli/issues/19271",
"analysis": "The bug occurs because the CLI's interactive mode does not trigger a refresh of its environment state (specifically the git branch) after executing a shell command via the `!` escape prefix. When a user runs `! git checkout <branch>`, the underlying filesystem state changes, but the UI component (likely a status bar or footer) continues to display the cached branch name from the previous state. The CLI needs to explicitly re-poll or invalidate the git branch cache once the shell sub-process terminates.",
"effort_level": "medium",
"reasoning": "The fix requires synchronizing the UI state with the external git environment after a shell command execution. This involves tracing the command execution flow in the interactive loop and ensuring the React/Ink state (likely used in the Footer component) is correctly updated or invalidated to trigger a re-render, which aligns with the criteria for state synchronization and React/Ink state management.",
"validated": true
},
{
"body": "### What happened?\n\nI am encountering a persistent freeze with the Gemini CLI on Windows 11.\nInitially, I faced the known issue with Node.js v22 where the CLI would freeze at the first startup. I resolved this by downgrading to **Node.js v20.20.0 (LTS)**.\n\nHowever, I am now stuck at the next step.\n1. I run `gemini` in a new directory.\n2. Authentication succeeds via browser.\n3. The prompt \"Do you trust this folder?\" appears.\n4. I select \"1. Trust folder\".\n5. The CLI message says it is restarting to apply changes.\n6. The spinner `Initializing...` appears again and **freezes indefinitely**.\n\nThe interactive chat mode never starts. I have waited for over 10 minutes with no progress.\n\n### What did you expect to happen?\n\nAfter accepting the \"Trust folder\" prompt, the CLI should successfully restart and enter the interactive chat interface, rather than hanging at the \"Initializing...\" spinner.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nI cannot run `/about` because the interactive CLI freezes before accepting input.\nHere is my environment info:\n\n- **OS:** Windows 11\n- **Node Version:** v20.20.0 (LTS)\n- **CLI Version:** 0.30.0-nightly (Also tested 0.23.0)\n- **Terminal:** Command Prompt (cmd.exe) & PowerShell\n\n</details>\n\n### Login information\n\nLogged in via Google Account (Browser authentication).\nPlan: Gemini Code Assist for individuals\n\n### Anything else we need to know?\n\nI have tried extensive troubleshooting to rule out environment issues:\n\n1. **Node.js Version:**\n Switched from v22.17.1 (known TUI issues) to **v20.20.0 (LTS)**. This allowed me to reach the \"Trust folder\" step, but it freezes immediately after.\n\n2. **Shell Configuration:**\n I verified this using **Command Prompt (`cmd.exe`)** and `powershell -NoProfile` to ensure no conflict with other tools (e.g., Claude Code startup scripts in my PowerShell profile). The freeze occurs even in a clean shell environment.\n\n3. **Clean Installation:**\n Executed `npm uninstall -g @google/gemini-cli`, manually deleted the `.gemini` config directory, ran `npm cache clean --force`, and reinstalled.\n\n4. **Directory:**\n Created a completely empty directory and ran the CLI there to avoid file scanning issues.\n\n5. **One-shot mode works:**\n Running `gemini \"Hello\"` works perfectly and returns a response. Only the **Interactive Mode (TUI)** freezes after the trust/restart sequence.\n\n<img width=\"1747\" height=\"943\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/a3de5630-a96e-4a56-b229-d66dbb6f680a\" />",
"number": 19248,
"title": "[Windows 11] CLI freezes at \"Initializing...\" loop after accepting \"Trust folder\" (Node v20 LTS)",
"url": "https://github.com/google-gemini/gemini-cli/issues/19248",
"analysis": "The freeze occurs during the CLI's initialization phase on Windows 11, specifically after a self-restart triggered by the 'Trust folder' prompt. The root cause is likely a deadlock or hang in a child process call to PowerShell. The CLI uses PowerShell for environment detection and security checks (e.g., ACL verification in `packages/core/src/utils/security.ts`). When the CLI restarts itself to apply the 'Trust folder' setting, the new process's inherited `stdin`/`stdout` handles can cause issues with subsequent `spawn` calls to PowerShell, especially when using the `-EncodedCommand` flag as seen in `packages/core/src/utils/shell-utils.ts`. The 'Trust folder' acceptance likely triggers these security checks or starts background services (like MCP servers in `packages/core/src/tools/mcp-client-manager.ts`) that depend on these shell utilities, leading to the indefinite hang at the 'Initializing...' spinner. This is a known class of issues in Node.js on Windows where pipe buffers can fill up or handles are not correctly released during process restarts.",
"effort_level": "large",
"reasoning": "The issue involves a platform-specific deadlock during a process restart cycle on Windows 11. It specifically relates to child process management and inter-process communication with PowerShell during the CLI's initialization phase. Debugging and resolving hangs in Node.js spawn calls on Windows, especially those involving pipe buffer management or handle inheritance during self-restarts, falls under the 'Platform-Specific Complexities' and 'Concurrency & Performance' categories for Large effort.",
"validated": true
},
{
"body": "### What happened?\n\nWhen I use an MCP server, along with JSON output, you get messages being printed to stdout before the json output, thus making it impossible to pipe-parse the output from gemini-cli with jq, eg:\n\n`gemini --yolo --prompt \"${INPUT_COMMAND}\" --output-format json 2> \"${TEMP_STDERR}\" 1> \"${TEMP_STDOUT}\"`\n\nOn stdout you get: \n```\nPrompts updated for server: githubResources updated for server: githubTools updated for server: github{\n \"session_id\": \"504f1f1c-fe88-42c0-8aa1-8c2237db8937\",\n \"response\": \"WHAT IS 5+5? IT'S 10!\",\n \"stats\": {\n```\n\nThis appears to be coming from the MCP client https://github.com/google-gemini/gemini-cli/blob/bb7bb11736c363f3368a61f4bc4557ab8bb660a2/packages/core/src/tools/mcp-client.ts#L399\n\n\n### What did you expect to happen?\n\ninformational messages like this should really go to stdout.\nif stdout is also expected to be json however in output-mode=json, i'm not sure what to suggest.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n\u2502 CLI Version 0.28.2 \u2502\n\u2502 Git Commit da5e47ae3 \u2502\n\u2502 Model auto-gemini-3 \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS darwin \u2502\n\u2502 Auth Method vertex-ai \u2502\n\u2502 GCP Project at-delivery-platform-testing \u2502\n\u2502 IDE Client VS Code \n```\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 19198,
"title": "Event feedback breaks json output mode",
"url": "https://github.com/google-gemini/gemini-cli/issues/19198",
"analysis": "The bug is caused by informational status messages being written directly to `stdout` within the `McpClient` class. Specifically, when an MCP server updates its prompts, resources, or tools, the client logs these events. Because these logs are sent to the same stream as the command's primary output, they prefix the JSON response, rendering it invalid for parsers like `jq`. The user identified the problematic area in `packages/core/src/tools/mcp-client.ts` (around line 399 in the referenced version). The concatenated nature of the output (`Prompts updated...Resources updated...`) suggests the use of `process.stdout.write` or similar without trailing newlines, which further corrupts the JSON start.",
"effort_level": "small",
"reasoning": "The fix is highly localized to a single file (mcp-client.ts) and involves redirecting informational log messages from stdout to stderr. This falls under 'tweaking static logging and error messages' and does not require architectural changes or complex state management, despite the previous analysis's over-classification based on the word 'stream'.",
"validated": true,
"recommended_implementation": "In `packages/core/src/tools/mcp-client.ts`, locate the notification handlers for `PromptListChangedNotificationSchema`, `ResourceListChangedNotificationSchema`, and `ToolListChangedNotificationSchema`, and change the `process.stdout.write` calls to `process.stderr.write` to prevent status messages from corrupting the JSON output on stdout."
},
{
"body": "### What happened?\n\ngemini is take so much time to load even when useing `--resume` or even `-p` for none interactive i cant find any way to use it as backend with all my mcp configuration and tools and ..etc\n\n### What did you expect to happen?\n\ni have more then 20 mcp server and around 4 ext\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\u2502 \u2502\n\u2502 About Gemini CLI \u2502\n\u2502 \u2502\n\u2502 CLI Version 0.28.2 \u2502\n\u2502 Git Commit da5e47ae3 \u2502\n\u2502 Model auto-gemini-2.5 \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS win32 \u2502\n\u2502 Auth Method Logged in with Google () \u2502\n\u2502 \n</details>\n\n### Login information\n\ngoogel account\n\n### Anything else we need to know?\n\nif there a better way i can intgrate gemini like for example im useing it as backend i have added slash command to start server but its so heavy on loading",
"number": 19186,
"title": "heavy loading",
"url": "https://github.com/google-gemini/gemini-cli/issues/19186",
"analysis": "The 'heavy loading' issue is primarily caused by the synchronous or sequential initialization of Model Context Protocol (MCP) servers during the CLI startup sequence. The user reports having over 20 MCP servers. In the current architecture, the CLI likely attempts to connect to and retrieve tool definitions from every configured MCP server before becoming interactive or processing a prompt (even with `-p`). On Windows (win32), process spawning for 20+ servers is particularly expensive. The logic responsible for this is likely contained within the MCP client management and the main application initialization loop that iterates through the user's configuration.",
"effort_level": "large",
"reasoning": "Optimizing the startup performance for 20+ MCP servers requires a fundamental shift from eager to lazy or throttled parallel initialization. This impacts the core MCP integration architecture, involves complex asynchronous state management to keep the UI responsive, and addresses platform-specific performance bottlenecks related to child process spawning on Windows as identified in the analysis.",
"validated": true
},
{
"body": "### What happened?\n\nIn https://geminicli.com/docs/cli/cli-reference/ , it told me`--prompt` was deprecated.\n\n```\n--prompt | -p | string | - | Prompt text. Appended to stdin input if provided.\u00a0Deprecated:\u00a0Use positional arguments instead.\n```\n\nSo I try to change [harbor's gemini-cli agent](https://github.com/harbor-framework/harbor/blob/b2dabc91b5e62899888f30ca9ddc884b899e337f/src/harbor/agents/installed/gemini_cli.py#L500)\n\nFrom\n```sh\ngemini --yolo {extra_flags} --model={model} --prompt={escaped_instruction}\n```\nInto\n```sh\ngemini --yolo {extra_flags} --model={model} {escaped_instruction}\n```\n\nWhich use so called query positional argument, rather than --prompt option.\n\nThen I found it break [terminal-bench-2/pytorch-model-recovery/instruction.md](https://github.com/laude-institute/terminal-bench-2/blob/f5b891cb4f7c20e306f9d05887628b43af740f43/pytorch-model-recovery/instruction.md?plain=1)\n\n```md\n- You are given a PyTorch state dictionary (/app/weights.pt) representing the weights of a Pytorch model, and a dataset (/app/dataset.pt) containing input-output pairs. Your task is to..........\n```\n\n```sh\ngemini --yolo --model=gemini-3-pro-preview '- You are given a PyTorch state dictionary (....'\n```\n\nThen\n```sh\nUnknown arguments: \" \", Y, u\n```\n\nIf gemini-cli encourages users to use positional argument, it will put gemini-cli at a disadvantage in the terminal bench 2 benchmark, which is unfair to gemini-cli.\n\nAlso there exist some user want to use prompt such like `gemini --yolo --prompt=\"-1+2=?\"`, use positional argument will also create bug.\n\n### What did you expect to happen?\n\nI hope gemini-cli will deprecate position arguments. I recommend using `--prompt=` with gemini-cli.\n\nTo achieve higher scores for gemini-cli in the benchmark, gemini-cli should deprecate the query position arguments.\n\n### Client information\n\nNone\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 19156,
"title": "Bug: Position argument not allow prompt start with `-`",
"url": "https://github.com/google-gemini/gemini-cli/issues/19156",
"analysis": "The bug is caused by the CLI's argument parser (likely `yargs`) incorrectly identifying positional arguments that start with a hyphen (`-`) as command-line options. When a user provides a prompt starting with a hyphen (e.g., a Markdown list item like `'- You are given...'`), the parser sees the leading hyphen and attempts to interpret the subsequent characters as short-form flags. This results in the error `Unknown arguments: \" \", Y, u`, where the parser has split the string `'- You'` into individual flags `- ` (space), `-Y`, `-o`, and `-u`. Since the documentation encourages using positional arguments instead of the deprecated `--prompt` flag, the parser needs to be configured to handle these cases\u2014either by treating unknown options as positional arguments or by disabling short-option grouping for the main command. The logic for this configuration is located in the CLI's option definition and parser setup.",
"effort_level": "small",
"reasoning": "The issue is a standard CLI argument parsing configuration problem where strings starting with a hyphen are incorrectly interpreted as flags. Fixing this involves a localized adjustment to the parser settings (e.g., yargs configuration) to treat unknown options as positional arguments or to stop parsing flags after a certain point. This is a trivial configuration change that fits the 'Small' criteria for localized fixes and config adjustments.",
"validated": true,
"recommended_implementation": "In the yargs configuration within `src/cli.ts`, add `.parserConfiguration({ 'unknown-options-as-args': true })`. This ensures that prompt text starting with a hyphen is treated as a positional argument rather than being incorrectly parsed as a set of command-line flags."
},
{
"body": "Hi there! \n\nFirst of all, thanks for the work on `gemini-extensions`. It\u2019s a massive step forward for the CLI. However, after testing several extensions (mostly official ones), I\u2019ve encountered some friction that makes the experience a bit \"hacky\" for anyone not running a standard Node/NPM environment.\n\nI\u2019d like to propose two improvements to make the ecosystem more robust:\n\n### 1. Hardcoded Runtime & Package Manager (The NixOS/Bun problem)\nCurrently, extensions seem to strictly depend on `node` and `npm`. As a **NixOS** user, this is a major headache because global NPM installs and standard Node paths often break or aren't present. \n\nIn my case, I use **Bun** for everything. Right now, I have to manually modify the source of every extension I install to swap `node` for `bun`. \n\n**Suggestion:**\n* Allow the user to define a preferred runtime/package manager in the global config (e.g., `runtime: bun`).\n* Avoid hardcoding `npm install` and instead use an abstraction that respects the user's environment.\n\n### 2. Missing \"Hidden\" Requirements (Documentation Gaps)\nThere\u2019s a disconnect between the Gemini Extension browser and the actual requirements of the extensions. \n\n**Example:** The **Context7** extension requires specific environment variables and API keys. This is documented in its original repository, but there's no mention of it in the Gemini extensions \"Dialog\". I had to go hunting through the source code to figure out why it was failing.\n\n**Suggestion:**\n* Standardize a `requirements` or `env` section in the extension metadata.\n* If an extension needs an API key to function, it should be explicitly listed in the CLI/Extension browser before the user tries to run it.\n\nI really want to see this tool thrive, but making it more environment-agnostic would be a huge win for the developer community (especially for those of us on non-standard distros like NixOS).\n\nHappy to provide more context or logs if needed!\n\nExtension List:\n```bash\ncode-review (v0.1.0) - active (up to date)\nconductor (v0.3.0) - active (up to date)\ncontext7 (v1.0.0) - active (up to date)\nexa-mcp-server (v3.1.8) - active (up to date)\ngemini-cli-jules (v0.1.0) - active (up to date)\ngemini-cli-security (v0.4.0) - active (up to date)\ngithub (v1.0.0) - active (up to date)\nrust-agentic-skills (v1.1.2) - active (up to date)\n```",
"number": 19077,
"title": "Improving Extension DX: Runtime flexibility (Bun/Deno support) and explicit dependency documentation",
"url": "https://github.com/google-gemini/gemini-cli/issues/19077",
"analysis": "The bug stems from two main issues: hardcoded execution environments and insufficient metadata display in the UI. \n\n1. **Hardcoded Runtime/PM**: The extension management logic (likely residing in `packages/core/src/extensions/` based on the exports in `packages/core/index.ts`) currently invokes `node` and `npm` directly via shell commands or process spawning. To support Bun/Deno/NixOS, this logic must be refactored to query the configuration system (`packages/core/src/config/config.ts`) for a user-defined `runtime` or `packageManager` preference.\n\n2. **Documentation Gaps**: The extension metadata parsing in `packages/core/src/utils/package.ts` only handles standard `package.json` fields. It needs to be extended to support a custom field (e.g., `geminiExtension`) that includes `requirements` or `envVars`. Subsequently, the CLI UI (likely in `packages/cli/src/ui/`) needs to be updated to render these requirements in the extension browser/dialog.",
"effort_level": "medium",
"reasoning": "This task requires cross-package coordination between 'core' and 'cli'. It involves updating the configuration schema, extending the package metadata parsing logic, and refactoring the extension execution service to dynamically handle different runtimes (Bun/Deno/Node). While not an architectural overhaul, the need to validate execution across different environments and update the CLI UI for metadata display fits the criteria for logic tracing and integration across multiple components.",
"validated": true
},
{
"body": "### Description\nAfter successfully installing the Conductor extension (`gemini extensions install https://github.com/gemini-cli-extensions/conductor --auto-update`), commands like `/conductor:setup` fail with the following errors:\n\n- Tool \"run_shell_command\" not found in registry\n- params/questions/0/header must NOT have more than 12 characters (during interactive prompts)\n- Tool execution denied by policy (occasional)\n\nThis prevents the interactive setup from completing (scaffolding conductor/ dir with product.md, plan.md, spec.md, etc.), making the extension's workflow inaccessible.\n\n### Environment\n- Gemini CLI Version: 0.28.2 (Git Commit: da5e47ae3)\n- Model: auto-gemini-2.5\n- OS: darwin (macOS)\n- Auth: Google login\n- Sandbox: none\n- Extension: Conductor (latest, including Automated Reviews)\n\n### Steps to Reproduce\n1. Install Conductor extension as above.\n2. cd into a project directory.\n3. Run `/conductor:setup`.\n\u2192 Errors occur immediately or during prompt phase (full transcript in attachments).\n\n### Expected Behavior\nInteractive setup completes, creating persistent Markdown files and enabling `/conductor:review`, etc.\n\n### Actual Behavior\nSetup aborts due to tool/registry issues.\n\n### Additional Context\n- Similar run_shell_command registry failures reported in other issues (#5382, #7513, #13502).\n- ask_user header limit appears resolved in preview releases (bumped to 16 chars in v0.29.0-preview).\n- Tried: full folder trust, --yolo, --approval-mode auto_edit, CLI restart\u2014no change.\n- Minimal test extension also fails on run_shell_command \u2192 seems CLI-wide.\n\n### Attachments\n- Session transcript (paste relevant parts here or attach bug-report.md).\n- bug-report.md (your generated summary).\n\n### Suggestions\n- Ensure run_shell_command is reliably available in extension contexts.\n- Relax or increase ask_user header limit in stable release.\n- Add clearer docs on enabling shell tools for extensions.\n\nAppreciate the work on Gemini CLI and extensions\u2014Conductor looks very promising for context-driven dev once these are sorted. Happy to test fixes or provide more logs.\n\nThanks!",
"number": 19052,
"title": "Extensions (e.g. Conductor) fail with \"run_shell_command not found\" + ask_user header >12 chars error + tool execution denied",
"url": "https://github.com/google-gemini/gemini-cli/issues/19052",
"analysis": "The bug consists of three distinct but related failures in the extension execution pipeline: \n1. **Tool Registry Mismatch**: The error 'run_shell_command not found in registry' indicates that the LLM is attempting to call a tool by a name that doesn't exist in the current session's `ToolRegistry`. This is likely due to a naming discrepancy where the extension (Conductor) expects a host tool named `run_shell_command`, but the CLI registers it as `shell` or `terminal`, or fails to expose it to the MCP (Model Context Protocol) context. \n2. **Schema Validation Constraint**: The `ask_user` header limit error is a hardcoded Zod or JSON schema constraint in the tool definition. The error message `params/questions/0/header must NOT have more than 12 characters` confirms a `.max(12)` validation on the `header` field in the `ask_user` tool parameters.\n3. **Policy Enforcement**: The 'Tool execution denied' error suggests that even when tools are found, the `PolicyEngine` or `ToolRegistry` is blocking execution, possibly due to strict sandbox settings or a failure in the `--yolo` / `approval-mode` flag propagation to the extension's execution context.\n\nThe `run_shell_command` issue is likely tied to how `packages/core/src/tools/mcp-tool.ts` and `packages/core/src/tools/mcp-client.ts` handle tool mapping and prefixing (e.g., `mcp_conductor_run_shell_command` vs `run_shell_command`).",
"effort_level": "medium",
"reasoning": "The issue involves three distinct failures across different subsystems: a Zod schema validation update for the ask_user tool, logic tracing and a fix for tool name mapping within the MCP (Model Context Protocol) bridge, and ensuring policy/approval flags are correctly propagated to the extension execution context. This requires integration across multiple core components (Registry, MCP, PolicyEngine) and careful validation to ensure consistent tool resolution and permission propagation across the extension-host boundary, fitting the 1-3 day effort window.",
"validated": true
},
{
"body": "### What happened?\n\nIf you run `gemini` in a folder containing a .env populated by 1password Environments, the command will hang your terminal and never launch. More generically, 1password's environments work by replacing a .env file with a pipe named \".env\" which, when read, will trigger 1password to pipe in the .env set up in the 1password application.\n\n1Password is not necessary for this bug to replicate though. If you have a .env that's a named pipe, it will hang gemini, regardless of why it's there.\n\n### What did you expect to happen?\n\nIt should attempt to read the .env as per usual.\n\n(this prompts 1password to get the user's consent to pipe in the .env, but that's somewhat tangental to the issue at hand)\n\n### Client information\n\n\n* ** LI Version:** 0.28.2\n* **Git Commit:** a212e5c\n* **Session ID:** 92e34650-5f7-4613-a749-a3de15338881\n* **Operating System:** linux v20.20.0\n* **Sandbox Envi onment:** sandbox-0.28.2-0\n* **Model Version:** auto-gemini-2.5\n* **Auth Type:* oauth-personal\n* **Memory Usage:** 337.8 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** #1e1e1e\n* **Kitty Keyboard Protocol:** Unsupported\n* **IDE Client:** IDE\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 19050,
"title": "gemini cli hangs indefinitely if .env is a named pipe (i.e. when using 1Password Environments)",
"url": "https://github.com/google-gemini/gemini-cli/issues/19050",
"analysis": "The bug is caused by the CLI performing a synchronous, blocking read on a `.env` file that is a named pipe (FIFO). This is a common pattern for 1Password Environments, where the `.env` file is a pipe that triggers a secret injection when read. In Node.js, functions like `fs.readFileSync` (which is the default behavior for libraries like `dotenv`) will block indefinitely on a FIFO until a writer (in this case, the 1Password agent) provides data and closes the pipe. The hang occurs because the CLI likely initializes its Terminal User Interface (TUI) or sets the terminal to raw mode (e.g., via `process.stdin.setRawMode(true)` or initializing a library like `ink`) before attempting to load the environment variables. This terminal state can interfere with the 1Password agent's ability to prompt the user for consent, or simply cause the main thread to block before any output is rendered, leading to the perceived hang.",
"effort_level": "small",
"reasoning": "The issue is a classic initialization order bug. The CLI blocks on a synchronous read of a named pipe (.env) after the terminal has been put into raw mode or the TUI has initialized, preventing the user from interacting with the 1Password consent prompt. The fix is highly localized, requiring the environment variable loading logic to be moved to the very beginning of the entry point, before any terminal manipulation occurs.",
"validated": true,
"recommended_implementation": "In the main entry point (e.g., `src/index.ts`), move the `dotenv.config()` call to the very beginning of the script. This ensures environment variables are loaded before any TUI initialization or terminal raw mode configuration, allowing the 1Password consent prompt to function correctly."
},
{
"body": "### What happened?\n\nThe default compression threshold is 0.5 (https://geminicli.com/docs/get-started/configuration/#model).\n\nHowever, the remote config value is supposed to apply when the user does not set the value. Instead, it still uses the setting default value.\n\n### What did you expect to happen?\n\nWhen the user does not have a value set, the remote config option should apply.\n\nFrom https://github.com/google-gemini/gemini-cli/blob/e8e681c6707143ac7165b48e2eb6de5c9d9babea/packages/core/src/config/config.ts#L2110 this.compressionThreshold takes precedence. However, `this.compressionThreshold` is config value after the settings are merged, which is 0.5 by default (not undefined).\n\n### Client information\n\nn/a\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 19028,
"title": "Remote config for compression threshold is not applied when there is no user setting",
"url": "https://github.com/google-gemini/gemini-cli/issues/19028",
"analysis": "The bug is located in `packages/core/src/config/config.ts`. The logic at line 2110 (as identified in the bug report) resolves the `compressionThreshold` by prioritizing `this.compressionThreshold`. However, because the configuration object is initialized with a default value of `0.5`, `this.compressionThreshold` is never `undefined`. This prevents the remote configuration value (retrieved via `getRemoteAdminSettings()`) from being applied when a user hasn't explicitly set a value. The code fails to distinguish between a hardcoded default and a user-specified setting during the merge/resolution phase.",
"effort_level": "small",
"reasoning": "The fix is highly localized to a single file (packages/core/src/config/config.ts) and involves a straightforward logic adjustment to how configuration precedence is handled. It qualifies as 'Trivial Logic/Config' because it requires distinguishing between a user-provided value and a default value during property resolution, which is a common and low-complexity task.",
"validated": true,
"recommended_implementation": "In `packages/core/src/config/config.ts`, modify the resolution logic for `compressionThreshold` to check `getRemoteAdminSettings().compressionThreshold` before falling back to the default value of `0.5` when no user-defined setting is present."
},
{
"body": "## Problem Overview\n\nBased on monitoring data from in an Android/Termux environment, we have identified two significant issues related to terminal dimension handling:\n\n### 1. Terminal Resize Oscillation (Flickering)\nIn certain conditions (likely related to soft keyboard toggling or split-screen mode), the terminal reports rapid, oscillating dimension changes. \n**Example Log Pattern:**\n```\n[2026-02-13 18:21:10] 46x75 | 1200px x 1472px\n[2026-02-13 18:21:10] 43x75 | 1200px x 1376px\n[2026-02-13 18:21:10] 46x75 | 1200px x 1472px\n... (repeated dozens of times per second)\n```\nThis leads to 'layout thrashing' where the application and the terminal emulator fight over the viewport size, causing extreme flickering and high CPU usage.\n\n**Proposed Mitigation:**\nImplement a debounce mechanism (e.g., 50ms) in the `useTerminalSize` hook to ignore rapid, transient resize events. A PR has been submitted with this fix: #19004.\n\n### 2. TIOCGWINSZ Pixel Reporting Failure (0px)\nThe `ioctl(fd, TIOCGWINSZ, ...)` call frequently returns `0` for pixel width and height on this platform, even when rows and columns are correctly reported.\n**Example Log Pattern:**\n```\n[2026-02-13 18:15:30] 14x66 | 0px x 0px\n```\nThis breaks any logic that relies on physical pixel dimensions (e.g., advanced image rendering or precise layout adjustments).\n\n## Questions for Maintainers\n1. Is there a planned fallback mechanism for environments where pixel dimensions are unavailable?\n2. Should the CLI attempt to 'lock' its dimensions or provide a more aggressive throttle when oscillation is detected?\n3. Are there known workarounds for Termux-specific PTY reporting bugs?\n\nWe would like to discuss the best architectural approach to make the CLI more resilient on mobile/embedded terminal environments.",
"number": 19005,
"title": "Discussion: Terminal Resize Oscillation and TIOCGWINSZ Pixel Reporting Issues on Android/Termux",
"url": "https://github.com/google-gemini/gemini-cli/issues/19005",
"analysis": "The bug involves two distinct terminal handling issues on Android/Termux: \n\n1. **Terminal Resize Oscillation**: This is caused by the `useTerminalSize` hook (likely located in `packages/cli/src/hooks/useTerminalSize.ts`) reacting immediately to every `resize` event from `process.stdout`. In mobile environments like Termux, UI changes (keyboard toggles) trigger rapid bursts of these events. The fix involves wrapping the state update logic in a debounce function (e.g., 50ms) to stabilize the layout.\n\n2. **TIOCGWINSZ Pixel Reporting Failure**: The low-level terminal utility (likely in `packages/core/src/utils/terminal.ts` or a similar utility file performing `ioctl` calls) is reading the `ws_xpixel` and `ws_ypixel` fields from the `winsize` struct. On Termux, these often return `0`. The logic fails to provide a fallback, breaking features like image rendering that depend on pixel-perfect dimensions. \n\nLogic responsible: The event listener in `useTerminalSize` and the `ioctl` wrapper logic that extracts dimensions without validating non-zero pixel values.",
"effort_level": "medium",
"reasoning": "The issue requires two distinct fixes: implementing a debounce mechanism in the useTerminalSize hook to handle state synchronization issues (Medium criteria) and developing a fallback mechanism for terminal pixel dimensions. The latter involves ANSI escape sequence handling (CSI 14 t) and managing asynchronous terminal I/O to read and parse responses from stdin, which aligns with the Medium criteria for logic tracing and async flow. While it involves the Termux environment, it does not necessitate deep architectural changes or complex PTY/POSIX signal management that would qualify it as Large.",
"validated": true
},
{
"body": "### What happened?\n\nMCP Servers are not working in the Gemini Code Assist VSCode Extension. \nAfter configuration, the server appear stuck in \"Connecting\" state and no tools are displayed when invoking the /mcp command in chat. \n\n### Steps to reproduce:\n\n- Configure a stdio MCP Server using **~/.gemini/settings.json**, as stated in the documentation\n One of the example servers from the **official MCP SDK** can be used (eg. [Everything MCP Server](https://github.com/modelcontextprotocol/servers/tree/main/src/everything)).\n```\n{\n \"mcpServers\": {\n \"everything\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-everything\"\n ]\n }\n }\n}\n```\n\n- Go to the VSCode instance where **Gemini Code Assist** is installed -> **Reload Window**\n- Go to **Gemini Code Assist: Chat** -> enable **Agent** mode\n- Send the **/mcp** command in chat\n- The MCP Server appear to be **\"Connecting\"** and no tools are available\n\n<img width=\"419\" height=\"379\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/9fc1c107-4102-4c1f-80ae-388f26d5b3dc\" />\n\n### Note:\nThe same MCP Server configuration can be used successfully in **gemini cli**.\n```\n > /mcp \nConfigured MCP servers:\n\n\ud83d\udfe2 everything - Ready (14 tools, 4 prompts, 7 resources)\n Tools:\n - echo\n - get-annotated-message\n - get-env\n - get-resource-links\n - get-resource-reference\n - get-roots-list\n - get-structured-content\n - get-sum\n - get-tiny-image\n - gzip-file-as-resource\n - simulate-research-query\n - toggle-simulated-logging\n - toggle-subscriber-updates\n - trigger-long-running-operation\n Prompts:\n - args-prompt\n - completable-prompt\n - resource-prompt\n - simple-prompt\n Resources:\n - architecture.md (demo://resource/static/document/architecture.md) [text/markdown]\n - extension.md (demo://resource/static/document/extension.md) [text/markdown]\n - features.md (demo://resource/static/document/features.md) [text/markdown]\n - how-it-works.md (demo://resource/static/document/how-it-works.md) [text/markdown]\n - instructions.md (demo://resource/static/document/instructions.md) [text/markdown]\n - startup.md (demo://resource/static/document/startup.md) [text/markdown]\n - structure.md (demo://resource/static/document/structure.md) [text/markdown]\n\n\n 1 GEMINI.md file | 1 MCP server\n```\n\nI have tried multiple stdio MCP Servers and i got the same behavior. \n\n### What did you expect to happen?\n\n- I should be able to successfully configure and use MCP Servers in the Gemini Code Assist VSCode Extension.\n- The agent should be able to call tools provided by these MCP Servers.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\nAbout Gemini CLI\nCLI Version 0.28.2\nGit Commit da5e47ae3\nModel auto-gemini-2.5\nSandbox no sandbox\nOS linux\nAuth Method Logged in with Google (xxxxxxxxx@gmail.com)\n```\n\nSend '/about' in the Gemini Code Assist chat session where the '/mcp' was sent before:\n```\nAbout\nRunning Task ID: 886a0b5a-e022-4cba-ab24-a67bf147d654\nTask State: submitted\nModel: gemini-2.5-pro\n```\n\nGemini Code Assist info:\n```\nIdentifier google.geminicodeassist\nVersion 2.71.0\n```\n</details>\n\n### Login information\n\nLogged in with Google\n\n### Anything else we need to know?\n\n_No response_",
"number": 18987,
"title": "[Gemini Code Assist VSCode Extension] MCP Servers are not working, stuck in \"Connecting\" state",
"url": "https://github.com/google-gemini/gemini-cli/issues/18987",
"analysis": "The MCP servers are stuck in a 'Connecting' state in the VSCode extension because the `McpClientManager` fails to successfully initialize the `stdio` transport, likely due to environment differences between the CLI and the VSCode extension host (e.g., `PATH` issues preventing `npx` from being found). The 'Connecting' state indicates that the client has been created and the connection process started, but the handshake never completes or fails silently. The root cause is likely in `packages/core/src/tools/mcp-client-manager.ts`, specifically in how it spawns the MCP server processes and handles potential errors during the initial handshake. If the process fails to start (e.g., `ENOENT`), the state might not be correctly updated to 'Error', leaving it in 'Connecting'.",
"effort_level": "large",
"reasoning": "The issue involves debugging and modifying the Model Context Protocol (MCP) integration, which is explicitly listed as a Large effort area. It requires addressing platform-specific complexities related to child process management (spawn) within the VSCode extension host environment, where environment variables like PATH often differ from the CLI. The 'Connecting' hang indicates a failure in the asynchronous handshake and state synchronization logic between the McpClient and McpClientManager, necessitating deep tracing of the MCP lifecycle and robust error propagation for process-level failures.",
"validated": true
},
{
"body": "## Description\n\nWhen Gemini CLI receives input via piped stdin (spawned from Node.js `child_process.spawn`), the stdin content is duplicated into **2 consecutive user messages** in the API request, causing `INVALID_ARGUMENT (400)` from `cloudcode-pa.googleapis.com`.\n\n## Environment\n\n- **Gemini CLI version**: 0.28.2\n- **OS**: Windows 10 (MSYS2/Git Bash)\n- **Node.js**: v22.20.0\n- **Auth**: OAuth (personal)\n- **Model**: gemini-3-pro-preview\n\n## Steps to Reproduce\n\n1. Spawn `gemini -m gemini-3-pro-preview -o text` from a Node.js script via `child_process.spawn` with `shell: true`\n2. Write prompt to `child.stdin` and call `child.stdin.end()`\n3. API returns 400 INVALID_ARGUMENT\n\n```js\nconst { spawn } = require('child_process');\n\n// This works fine from interactive terminal\n// But fails when spawned from Node.js npm script (tsx \u2192 spawn)\nconst child = spawn('gemini', ['-m', 'gemini-3-pro-preview', '-o', 'text'], {\n stdio: ['pipe', 'pipe', 'pipe'],\n shell: true,\n});\n\nchild.stdin.write('Create a simple 3-line plan for: test task');\nchild.stdin.end();\n```\n\n**Note**: Direct CLI calls from terminal work fine. The issue only occurs when spawned from within another Node.js process (e.g., `npm run script` \u2192 `tsx` \u2192 `spawn('gemini', ...)`).\n\n## Evidence from Error Report\n\nThe Gemini CLI error report file (`gemini-client-error-Turn.run-sendMessageStream-*.json`) shows the `context` array contains **3 consecutive user messages**:\n\n```json\n{\n \"context\": [\n {\n \"role\": \"user\",\n \"parts\": [{ \"text\": \"This is the Gemini CLI. We are setting up the context...\" }]\n },\n {\n \"role\": \"user\",\n \"parts\": [{ \"text\": \"<actual prompt from stdin>\" }]\n },\n {\n \"role\": \"user\",\n \"parts\": [{ \"text\": \"<same prompt from stdin - DUPLICATED>\" }]\n }\n ]\n}\n```\n\nMessages 2 and 3 are **identical** \u2014 the stdin content appears twice. The `cloudcode-pa.googleapis.com/v1internal:streamGenerateContent` endpoint rejects this with `INVALID_ARGUMENT`.\n\n## What Was Tried\n\n| Approach | Result |\n|----------|--------|\n| `stdin` + `-p \" \"` (space) | \u274c 400 INVALID_ARGUMENT |\n| `stdin` + `-p \".\"` (period) | \u274c 400 INVALID_ARGUMENT |\n| `stdin` only (no `-p` flag) | \u274c 400 INVALID_ARGUMENT (still duplicated) |\n| Direct terminal: `gemini -p \"Say OK\"` | \u2705 Works |\n| Direct terminal: `echo \"prompt\" \\| gemini -o text` | \u2705 Works |\n| `node -e` simple spawn test | \u2705 Works |\n| Spawned from npm script (tsx \u2192 Node.js \u2192 spawn) | \u274c Always fails |\n\n## Expected Behavior\n\nStdin content should be sent as a **single user message**, not duplicated.\n\n## Actual Behavior\n\nStdin content is duplicated into 2 consecutive user messages in the API request, which the API rejects.\n\n## Workaround\n\nCurrently using graceful degradation \u2014 when Gemini fails, the remaining 3 LLMs (Claude, Codex, GLM) proceed successfully.\n\n## Possibly Related Issues\n\n- #12737 (message repetition, p1 priority)\n- #16026 (400 INVALID_ARGUMENT with gemini-3-pro-preview, fixed in PR #16146)",
"number": 18978,
"title": "Bug: stdin content duplicated into 2 consecutive user messages in headless/pipe mode (v0.28.2)",
"url": "https://github.com/google-gemini/gemini-cli/issues/18978",
"analysis": "The bug is caused by redundant processing of stdin content when the CLI is running in non-interactive (piped) mode. Based on the error report filename `Turn.run-sendMessageStream`, the logic resides in a `Turn` class (likely `packages/core/src/turn.ts` or `packages/core/src/session/turn.ts`). When `process.stdin` is not a TTY, the CLI reads the entire stream to use as the user prompt. The duplication (3 consecutive user messages) suggests that the logic responsible for appending the stdin content to the conversation context is being triggered multiple times, or the `Turn.run` method is being re-entered without clearing the previous buffer. This is particularly prevalent on Windows when `shell: true` is used, as it can affect how EOF/end signals are propagated to the Node.js process, potentially causing multiple 'end' or 'close' events to trigger the message-sending logic. The Gemini API returns a 400 error because it does not allow multiple consecutive messages from the same role (user) in the request context.",
"effort_level": "large",
"reasoning": "The issue involves platform-specific complexities related to child process (spawn) management and stdin stream handling specifically on Windows. As per the criteria, bugs involving cross-platform inconsistencies and child process management in esoteric shell environments (MSYS2/Git Bash) are classified as Large. The fix requires deep tracing of the asynchronous control flow to prevent redundant message processing triggered by Windows-specific shell behavior.",
"validated": true
},
{
"body": "### What happened?\n\nWhen loading up gemini cli in vs-code, it opens in terminal, says the \"tips for getting started\", then:\n```console\n> Do you want to connect VS Code to Gemini CLI?\n \u2502 If you select Yes, the CLI will have access to your open files and display diffs directly in VS Code.\n \u2502\n \u2502 \u25cf 1. Yes\n \u2502 2. No (esc)\n \u2502 3. No, don't ask again\n```\nAfter accepting, it attempts to run `/ide install`. This is met with the error:\n`\u2139 Installing IDE companion...\n\u2715 Failed to install VS Code companion extension. Please try installing 'Gemini CLI Companion' manually from the VS Code extension marketplace.`\nI have tried to combat this is many ways. When I first installed gemini-cli, the companion extension was already installed on vc-code, and when I ran it using `npx @google/gemini-cli`, this happened. I then tried uninstalling and reinstalling the companion extension and the error continued, I also tried allowing gemini to install the companion but the same error occured.\n\nNext, I tried asking gemini what could be causing the issue and ran `code --list-extensions` in powershell, and `google.gemini-cli-vscode-ide-companion` was in the list of installed extensions. It should be noted that my vscode version is 1.109.2.\n\nI tried uninstalling everything including node.js and this time used `npm install -g @google/gemini-cli` which told me it installed a bunch of stuff and then did not open gemini, so I then opened gemini using the companion extension by doing ctrl+shift+p and running `Gemini CLI: Run`, and it opened and then exact same error occured. (this is crazy cause I opened gemini through the companion extension but it still can't recognise it's installed - as I understand it, the companion gives access to this command)\n\n### What did you expect to happen?\n\nI expected the `/ide install` command to not throw an error when it is already installed.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n\u2502 About Gemini CLI \u2502\n\u2502 \u2502\n\u2502 CLI Version 0.28.2 \u2502\n\u2502 Git Commit da5e47ae3 \u2502\n\u2502 Model auto-gemini-2.5 \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS win32 \u2502\n\u2502 Auth Method Logged in with Google (jaredlallan@gmail.com) \u2502\n```\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 18961,
"title": "Gemini CLI not able to detect that the companion extension is installed in VS-code",
"url": "https://github.com/google-gemini/gemini-cli/issues/18961",
"analysis": "The bug is caused by the CLI's inability to correctly invoke the VS Code executable ('code') on Windows to detect or install the companion extension. Even though 'code' is in the user's PATH, Node.js child_process calls often require 'shell: true' or explicit handling of '.cmd' extensions on Windows. This leads to a false negative during extension detection (triggering the 'Do you want to connect' prompt) and a subsequent failure during the installation attempt. The error message 'Failed to install VS Code companion extension' is explicitly triggered in the catch block of the installation logic in 'ide-installer.ts'.",
"effort_level": "medium",
"reasoning": "The issue involves platform-specific command execution and path resolution on Windows, specifically regarding how the CLI invokes the VS Code binary ('code.cmd'). While the criteria for 'Large' mentions Windows child_process management, this specific case is a localized integration bug involving path quoting or shell execution logic rather than a deep architectural or PTY-related complexity. It requires tracing logic across detection and installation phases and validating across Windows environments, which fits the 1-3 day 'Medium' effort level.",
"validated": true
},
{
"body": "### What happened?\n\n## What happened?*\n\nThe `SearchText` tool (grep_search) fails to find files in hidden directories (those starting with a dot, e.g., `.reborna/`, `.gemini/`, `.config/`), even when matching content exists in those directories. The tool silently excludes hidden directories from search scope and returns \"No matches found\" with no indication that the search was incomplete.\n\n### Concrete Example\n\nWhen searching for \"Instructional Conversion and Integration Protocol\" with:\n- **Pattern:** `Instructional Conversion and Integration Protocol`\n- **dir_path:** `.` (root directory)\n- **File that should match:** `C:\\Users\\ahome\\OneDrive\\Documents\\GitHub\\Sancturary\\.reborna\\system.md`\n\n**Actual Result:**\n```\nNo matches found for pattern \"Instructional Conversion and Integration Protocol\" in path \".\"\n```\n\n**Expected Result:**\n```\nFound 1 match for pattern \"Instructional Conversion and Integration Protocol\" in path \".\":\n---\nFile: .reborna/system.md\nL182: ### Instructional Conversion and Integration Protocol\n---\n```\n\n## Root Cause\n\nThe RipGrep tool implementation (`packages/core/src/tools/ripGrep.ts`, line 338) does not include the `--hidden` flag when invoking ripgrep. By default, ripgrep excludes hidden files and directories from search results unless explicitly told to include them with the `--hidden` flag.\n\n**Affected Code:**\n```typescript\nconst rgArgs = ['--json'];\n// Missing: rgArgs.push('--hidden');\n\n```\n\nRipgrep's documented behavior: \"By default, ripgrep will not search hidden files or directories. You can use the `--hidden` flag to enable searching hidden files and directories.\"\n\n\n### What did you expect to happen?\n\n## What did you expect to happen?*\n\nThe SearchText tool should search ALL files in the specified directory scope, including those in hidden directories. The tool should return matching results from hidden directories (`.reborna/`, `.gemini/`, `.config/`, etc.) with the same behavior as files in visible directories.\n\n## Client information*\n\n**[Must always be]**\n* **CLI Version:** 0.27.3 (Gemini CLI - version at time of fork)\n* **Git Commit:** 9b7ddad80 (Reborna CLI namespace migration commit)\n* **Operating System:** win32 (Windows 10 Home 10.0.19045)\n* **Sandbox Environment:** no sandbox\n* **Model Version:** gemini-3-flash-preview (upstream test version)\n\n**[Parity Statement]**\nThis bug exhibits identical behavior in both:\n1. **Upstream Gemini CLI v0.27.3** - Confirmed by examining ripGrep.ts in gemini-cli-0.22.5 and later versions\n2. **Reborna CLI (forked from Gemini CLI v0.27.3)** - Confirmed in production environment\n\nThe issue is NOT a regression introduced by Reborna's namespace changes, but rather a pre-existing limitation in the upstream Gemini CLI that becomes a functional problem in projects that place searchable content in hidden directories.\n\n### Client information\n\n\n* **CLI Version:** 0.27.3\n* **Git Commit:** d5a135b14\n* **Session ID:** 63d31634-1d8e-47ec-8c12-9e08d8a69bd5\n* **Operating System:** win32 v22.21.1\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto-gemini-3\n* **Memory Usage:** 193.1 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** Unknown\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n# Anything else we need to know?\n\n### Why This Bug Wasn't Caught in Upstream Gemini CLI\n\nThe bug was operationally mitigated through human reinforcement learning (RLHF):\n- Users/models were trained to avoid searching for system configuration content using generic patterns\n- Instead, they learned to directly specify hidden directory paths or use alternative approaches\n- This training kept the limitation invisible in typical usage patterns\n- However, the underlying tool limitation still exists and affects any project that places searchable content in hidden directories\n\n### Impact on Derivative Projects\n\nProjects that fork Gemini CLI and reorganize directory structure (e.g., `.reborna/` instead of `.gemini/`) immediately encounter this bug because:\n1. They may not have matching RLHF training for the new namespace\n2. The tool limitation becomes a functional blocker for system configuration searches\n3. There is no programmatic way for AI models to know they should avoid generic searches on hidden directories\n\n### Suggested Resolution\n\n**Code Fix:**\nAdd the `--hidden` flag to ripGrep arguments in `packages/core/src/tools/ripGrep.ts` line 338:\n```typescript\nconst rgArgs = ['--json', '--hidden'];\n```\n\n**Operational Update:**\n- Update RLHF training to reflect that SearchText now includes hidden directories by default\n- This ensures model behavior naturally adapts to the expanded tool capability\n- No breaking changes; this only fixes false negatives\n\n### Testing Verification\n\nAfter applying fix, verify:\n1. \u2713 Searches for content in hidden directories (`.gemini/`, `.reborna/`, `.config/`) return matches when content exists\n2. \u2713 Searches for content in visible directories continue to work as before\n3. \u2713 Exclude patterns (`--glob !pattern`) still work correctly for hidden files\n4. \u2713 Performance is not significantly impacted\n5. \u2713 Behavior now matches the JavaScript fallback implementation (which uses `dot: true`)\n\n### Files Affected\n- `packages/core/src/tools/ripGrep.ts` - Primary fix location\n- `packages/core/src/tools/grep.ts` - Already has correct behavior via `dot: true`; RipGrep should match\n- Test files: `ripGrep.test.ts` should include test cases for hidden directory searches\n",
"number": 18946,
"title": "RipGrep Search Tool Does Not Search Hidden Directories",
"url": "https://github.com/google-gemini/gemini-cli/issues/18946",
"analysis": "The `SearchText` tool (internally implemented using ripgrep) fails to include hidden files and directories in its search results because the `--hidden` flag is missing from the ripgrep command-line arguments. Ripgrep, by default, ignores files and directories starting with a dot (e.g., `.reborna`, `.config`). The fix involves adding `'--hidden'` to the `rgArgs` array in the tool's implementation to ensure these locations are included in the search scope.",
"effort_level": "small",
"reasoning": "The fix is highly localized to a single file (packages/core/src/tools/ripGrep.ts) and involves adding a standard CLI flag ('--hidden') to the ripgrep command arguments. This matches the 'Small' criteria for trivial logic/config changes and straightforward CLI flag additions. The previous classification as 'Large' based on the mention of Windows was incorrect, as the platform-specific path in the example does not indicate a complex architectural or PTY-related issue.",
"validated": true,
"recommended_implementation": "In `packages/core/src/tools/ripGrep.ts`, add `'--hidden'` to the `rgArgs` array within the `execute` method to ensure the ripgrep binary includes hidden files and directories in its search scope."
},
{
"body": "## Title\n\nsettings.json is rewritten with different formatting even when logical content hasn't changed\n\n## Description\n\nWhen Gemini CLI writes `settings.json` (either `~/.gemini/settings.json` or project-level `.gemini/settings.json`), it rewrites the file even when the logical content hasn't changed. The rewrite also produces formatting that differs from the original file, causing the file to appear as modified in git.\n\n### The problem\n\nThe write path in `commentJson.ts` uses `comment-json`'s `stringify(obj, null, 2)`, which:\n\n1. **Always expands arrays vertically** \u2014 e.g. `[\"AGENTS.md\", \"GEMINI.md\"]` becomes:\n ```text\n [\n \"AGENTS.md\",\n \"GEMINI.md\"\n ]\n ```\n2. **Does not append a trailing newline** \u2014 most formatters (prettier, editors) expect a final `\\n`\n\nThis means any project that runs prettier (or similar formatters) on JSON files will get a formatting conflict every time Gemini CLI touches `settings.json`. The file flip-flops between the formatter's output and Gemini CLI's output, showing up as a dirty file in git.\n\n### Steps to reproduce\n\n1. Create a `.gemini/settings.json` formatted by prettier (short arrays on one line, trailing newline):\n ```json\n {\n \"context\": {\n \"fileName\": [\"AGENTS.md\", \"GEMINI.md\"]\n }\n }\n ```\n2. Run `gemini` in the project directory\n3. Check `git diff .gemini/settings.json` \u2014 the array is now expanded vertically and/or the trailing newline is removed\n\n### Expected behavior\n\nIf the logical content of `settings.json` hasn't changed, the file should not be rewritten. A simple deep-equality check before writing would prevent unnecessary rewrites and preserve the user's existing formatting.\n\n### Suggested fix\n\nIn `updateSettingsFilePreservingFormat()`, compare the parsed existing content with the new content before writing:\n\n```typescript\nconst existingContent = fs.readFileSync(filePath, \"utf-8\");\nconst existingParsed = parse(existingContent);\nconst updatedStructure = deepMerge(existingParsed, updates);\n\n// Skip write if nothing changed\nif (JSON.stringify(existingParsed) === JSON.stringify(updatedStructure)) {\n return;\n}\n```\n\nThis would also address the symlink destruction reported in #10960, since unnecessary writes are what trigger the symlink replacement.\n\n### Environment\n\n- Gemini CLI version: latest (installed via npm)\n- OS: macOS\n- Project uses prettier with `printWidth: 88`\n\n### Related issues\n\n- #10960 \u2014 symlink lost when settings.json is rewritten (same root cause: unnecessary file writes)\n- #7303 \u2014 legacy settings detected on every startup even with fresh config (related: unnecessary settings processing)\n",
"number": 18934,
"title": "settings.json is rewritten with different formatting even when logical content hasn't changed",
"url": "https://github.com/google-gemini/gemini-cli/issues/18934",
"analysis": "The bug is caused by the way `settings.json` is serialized and written to disk. The root cause is two-fold: \n1. **Lack of Change Detection**: The code (likely in `packages/core/src/config/storage.ts` or a utility it calls) writes the settings file whenever a save is triggered, without first comparing the newly stringified content against the existing file content. \n2. **Formatting Inconsistency**: The serialization logic in `commentJson.ts` (referenced in the bug report, likely located at `packages/core/src/util/commentJson.ts` or `packages/core/src/config/commentJson.ts`) uses `comment-json`'s `stringify(obj, null, 2)`. This implementation lacks a trailing newline (which most IDEs and formatters like Prettier append by default) and uses a rigid array expansion strategy that conflicts with Prettier's 'printWidth' logic (which keeps short arrays on one line).\n\nTo fix this, the write logic should:\n- Read the existing file content.\n- Append a trailing newline to the stringified output.\n- Perform a string comparison and only write to disk if the content has actually changed.",
"effort_level": "small",
"reasoning": "The fix is highly localized to the JSON utility and the configuration saving logic. It involves adding a simple string comparison before writing and ensuring a trailing newline is appended to the output string. This is a straightforward logic adjustment in 1-2 files, fitting the criteria for a small effort task (<= 1 day) as it addresses formatting and trivial logic without complex state management.",
"validated": true,
"recommended_implementation": "In `packages/core/src/util/commentJson.ts`, modify `updateSettingsFilePreservingFormat` to append a trailing newline to the stringified output and only call `fs.writeFileSync` if the resulting string differs from the existing file content."
},
{
"body": "This issue report describes two major UX problems on Android/Termux.\n\n1. Relauncher Loop (Duplicate Logos and Auth prompts):\nWhen Termux is moved to the background, Android often kills the high-resource child process. The parent monitoring process then restarts a new child, leading to duplicate ASCII logos and repeated OAuth login prompts.\n\n2. UI Remounting on Resize:\nVirtual keyboard toggles trigger terminal resizes. The current React key mapping forces a full remount, which clutters terminal history with new Headers.\n\nProposed Fixes (Tested):\n- In packages/cli/src/utils/relaunch.ts: Disable relauncher if os.platform() is 'android'.\n- In packages/cli/src/gemini.tsx: Use a stable key for AppContainer on 'android' to prevent full remounts.\n\nFull technical details and patch were verified in a local Termux environment. Improving stability for mobile CLI users would be a great addition to Gemini CLI.",
"number": 18914,
"title": "[Android/Termux] Fix duplicate UI and repeated auth prompts caused by relauncher loop and resize remounting",
"url": "https://github.com/google-gemini/gemini-cli/issues/18914",
"analysis": "The bug is caused by two distinct behaviors in the CLI when running on Android/Termux. First, the process monitoring logic in `packages/cli/src/utils/relaunch.ts` (the 'relauncher') incorrectly attempts to restart the child process when Android kills it during backgrounding, leading to a loop of duplicate UI elements and authentication prompts. Second, in `packages/cli/src/gemini.tsx`, the `AppContainer` component is likely using a dynamic key (possibly derived from terminal dimensions) that changes when the virtual keyboard is toggled, triggering a full React remount and cluttering the terminal history with repeated headers.",
"effort_level": "small",
"reasoning": "The fix is highly localized to two files and involves straightforward logic: adding a platform check to disable the relauncher on Android and ensuring a stable React key to prevent remounts. These are trivial logic adjustments with a clear root cause and minimal complexity, fitting the criteria for a small effort level.",
"validated": true,
"recommended_implementation": "In `packages/cli/src/utils/relaunch.ts`, import `os` and return early from `relaunchAppInChildProcess` if `os.platform() === 'android'`. In `packages/cli/src/gemini.tsx`, assign a static string to the `key` prop of `AppContainer` when the platform is Android to prevent React from remounting the component during terminal resizes."
},
{
"body": "### What happened?\n\n[bug-report-history-1770893654208.json](https://github.com/user-attachments/files/25258954/bug-report-history-1770893654208.json)\n\n* **Description:** The general.enableAutoUpdate feature (which runs npm install -g in the background) frequently breaks the CLI on Windows.\n* **Root Cause:** Windows locks the gemini executable and its dependency files while the CLI is running. When the auto-updater attempts to overwrite these files, the installation fails or becomes partially corrupted, requiring a manual npm install -g @google/gemini-cli@latest to fix it.\n\n### What did you expect to happen?\n\nUpdate should becomes streamlined and auto fixes everything during update to not anything\n\n> Suggestion: The auto-updater should detect Windows and either prompt the user to update after closing or wait until the process exits.\n\n### Client information\n\n\n* **CLI Version:** 0.28.2\n* **Git Commit:** da5e47ae3\n* **Session ID:** 6eaa59cb-6ae7-44f9-8fca-56f657b7f327\n* **Operating System:** win32 v24.13.0\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto-gemini-3\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 263.5 MB\n* **Terminal Name:** Windows Terminal\n* **Terminal Background:** #0c0c0c\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 18899,
"title": "Automatic Update Corrupts Installation on Windows",
"url": "https://github.com/google-gemini/gemini-cli/issues/18899",
"analysis": "The bug is caused by the automatic update mechanism attempting to run `npm install -g @google/gemini-cli` in the background while the CLI process is still active. On Windows, the operating system locks the executable file and its associated DLLs/dependencies while they are in use. When `npm` attempts to overwrite these locked files, the installation fails or results in a partial/corrupted state. The logic currently lacks a platform check to handle Windows-specific file locking behavior. The fix should involve detecting the `win32` platform and either: 1) Deferring the update until the process exits, 2) Prompting the user to run the update manually after closing the CLI, or 3) Using a staging directory and a wrapper script to replace the files after the main process terminates.",
"effort_level": "medium",
"reasoning": "The issue involves platform-specific file locking on Windows during the auto-update process. While it requires platform detection and a change in how the update process is triggered (e.g., using a detached child process or a deferred prompt), it is localized to the update management logic. It does not require deep architectural changes or complex PTY/signal handling, but it does require careful testing of asynchronous flows and process management on Windows, fitting the 1-3 day Medium effort criteria.",
"validated": true
},
{
"body": "### What happened?\n\nWhen using /resume, I can't select the first item in the list as it stays greyed out after I select it. After I select it pressing Enter on my keyboard does nothing.\n\n### What did you expect to happen?\n\nI should be able to load the #1 chat in the list.\n\n### Client information\n\n\n* **CLI Version:** 0.28.2\n* **Git Commit:** da5e47ae3\n* **Session ID:** 1e55b2ee-bb7d-4dfd-84ab-eb089960ac79\n* **Operating System:** linux v24.11.1\n* **Sandbox Environment:** no sandbox\n* **Model Version:** gemini-2.5-pro\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 487.5 MB\n* **Terminal Name:** VTE(7600)\n* **Terminal Background:** #1e1e1e\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 18885,
"title": "After running /resume I can't resume first chat in the list",
"url": "https://github.com/google-gemini/gemini-cli/issues/18885",
"analysis": "The bug is likely caused by a falsy check on the `selectedIndex` variable within the UI component responsible for rendering the `/resume` session list. In JavaScript/TypeScript, the index `0` (representing the first item in a list) is falsy. If the code uses a check like `if (selectedIndex)` to determine if an item is active or to handle the 'Enter' keypress, it will fail for the first item.\n\nSpecifically:\n1. **Visual State:** The rendering logic probably uses something like `color={selectedIndex ? 'activeColor' : 'inactiveColor'}`. When `selectedIndex` is `0`, it evaluates to false, leaving the first item 'greyed out' even when focused.\n2. **Selection Logic:** The keypress handler for the 'Enter' key likely contains a similar check: `if (key.name === 'return' && selectedIndex) { onSelect(sessions[selectedIndex]); }`. This prevents the selection action from firing when the first item is highlighted.\n\nThe fix involves changing these checks to explicitly check for `null` or `undefined` (e.g., `if (selectedIndex !== null)` or `if (typeof selectedIndex === 'number')`).",
"effort_level": "small",
"reasoning": "The issue is a classic 'falsy zero' logic error in a React/Ink component's state handling. It is highly localized to the selection logic and rendering condition of a single UI component (likely ResumeList.tsx). Fixing it involves a simple change from a truthy check to an explicit null/undefined check, which is a trivial logic fix constrained to 1-2 files.",
"validated": true,
"recommended_implementation": "In `src/components/ResumeList.tsx`, update the conditional checks for `selectedIndex` to use `selectedIndex !== undefined` instead of truthy checks to ensure the first item (index 0) can be highlighted and selected."
},
{
"body": "### What happened?\n\nError while trying to update workspace extension \n\n![Image](https://github.com/user-attachments/assets/6eda8410-0ced-4dba-98ab-63f6c6a2cc94)\n\n \n\n### What did you expect to happen?\n\nSuccessful update\n\n### Client information\n\n\n* **CLI Version:** 0.28.2\n* **Git Commit:** da5e47ae3\n* **Session ID:** 7273c1cb-9ae1-429b-80d5-33e311d14b3d\n* **Operating System:** win32 v24.12.0\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto-gemini-3\n* **Auth Type:** oauth-personal\n* **Memory Usage:** 200.3 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** #0c0c0c\n* **Kitty Keyboard Protocol:** Unsupported\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n# paste output here\n```\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 18884,
"title": "Error updating google workspace extension",
"url": "https://github.com/google-gemini/gemini-cli/issues/18884",
"analysis": "The error occurs during the update process of the Google Workspace extension, which is managed as a 'skill' or 'tool' within the CLI. The issue likely resides in the `mcp-client-manager.ts` which handles the lifecycle and versioning of these extensions, or in `oauth2.ts` if the update requires re-authorization or additional scopes (common for Workspace tools like Drive/Gmail). On Windows, this could be exacerbated by how the CLI handles credential storage or network redirects during the OAuth flow. The 'workspace' skill type is explicitly mentioned in `skill-extraction-agent.ts`, indicating it's a recognized category of tool that the core logic must handle. The search context shows that MCP clients (which likely include the Workspace extension) use OAuth and have versioning logic managed in `mcp-client-manager.ts`.",
"effort_level": "medium",
"reasoning": "The issue involves troubleshooting the update lifecycle for MCP-based extensions, specifically the Google Workspace tool which relies on personal OAuth. This requires tracing logic across mcp-client-manager.ts and oauth2.ts to identify failures in version checking, credential validation, or scope management during the update process. While it occurs on Windows, it does not appear to involve deep PTY or architectural protocol changes that would qualify as Large, but rather falls under service integration and asynchronous flow management across multiple components.",
"validated": true
},
{
"body": "\n\n Title: [Bug] IME character composition (e.g., for Korean) is not displayed in\n the CLI input prompt\n\n Bug Description\n\n\n When typing in Korean (or other languages requiring an Input Method Editor -\n IME) in the Gemini CLI's interactive prompt, the intermediate character\n composition steps (e.g., '\u314e' -> '\ud558' -> '\ud55c') are not visible. Only the\n final, fully composed character appears at once. This makes it extremely\n difficult to edit typos or verify the input in real-time. This has been a\n persistent issue for about a year.\n\n Environment\n\n\n * Gemini CLI Version: 0.28.2\n * Operating System: Linux\n * Installation Method: npm i -g @google/gemini-cli\n\n Key Findings (Problem Analysis)\n\n This bug occurs under specific conditions:\n\n\n 1. When the bug occurs: During the normal idle state when the CLI is waiting\n for user input.\n 2. When the bug does NOT occur (Workaround):\n * The Korean composition process is perfectly visible when the thinking\n animation is active while the CLI is processing a request.\n * The issue also doesn't occur in other UI states where the screen is\n continuously refreshing, such as when the \"queue\" feature is active.\n\n Hypothesis\n\n\n Based on the findings above, it's highly likely that this issue is related to\n the CLI's UI rendering, which is based on React/Ink.\n\n\n * In the normal input state, the UI seems to re-render only when a final,\n composed character is received from stdin.\n * However, when an animation is active, the screen is forcibly re-rendered\n multiple times per second. During this process, the intermediate\n composition characters being handled by the OS's IME are \"accidentally\"\n drawn to the screen, making the problem seem to disappear.\n * Therefore, the root cause is likely that the standard input prompt does not\n self-update in response to the IME's intermediate composition state\n changes.\n\n Code-Level Analysis\n\n\n * The core of the problem appears to be in the\n packages/cli/src/ui/contexts/KeypressContext.tsx file.\n * This file sets stdin to raw mode and parses key events from the data event.\n This approach does not account for the intermediate states of an IME,\n processing only the final characters.\n * A temporary fix was attempted by forcing a re-render on every data event.\n However, this resulted in severe input lag and other side effects, so it\n was reverted. This indicates that a more fundamental solution is required.\n",
"number": 18868,
"title": "korean input error",
"url": "https://github.com/google-gemini/gemini-cli/issues/18868",
"analysis": "The bug is rooted in the interaction between the terminal's Input Method Editor (IME) and the React/Ink rendering loop used by the Gemini CLI. In a terminal environment, IME composition (like Korean '\u314e' -> '\ud558') often happens in a 'pre-edit' buffer. When the CLI is idle, the Ink UI only re-renders when it receives a 'data' event from `stdin` representing a completed character. Consequently, the intermediate composition steps are never committed to the React state and thus not rendered by Ink. The reason the bug 'disappears' during animations is that the animation (e.g., the thinking spinner) triggers a high-frequency re-render loop (typically via `setInterval` in an Ink component). These frequent redraws either allow the terminal emulator to flush its pre-edit buffer to the screen or prevent the terminal from clearing the IME overlay. The issue likely resides in the component handling the interactive prompt, which fails to trigger re-renders during partial IME input sequences.",
"effort_level": "medium",
"reasoning": "This issue involves React/Ink state management and UI state synchronization specifically related to input buffers and terminal stdin handling. According to the criteria, fixing bugs involving useState/useEffect or input buffer synchronization in an Ink environment falls under the Medium effort level. It requires tracing the interaction between the terminal's IME pre-edit buffer and the React rendering loop to ensure intermediate states are rendered without relying on side-effect animations.",
"validated": true
},
{
"body": "Command line commands like `gemini extensions list` or `gemini mcp list` error if an API key is not set in environment. Yet these commands do not make any API calls, they are pure utility calls that read local files...\n\n```bash\n# gemini extensions link .\nWhen using Gemini API, you must specify the GEMINI_API_KEY environment variable.\nUpdate your environment and try again (no reload needed if using .env)!\n\n# gemini mcp list\nWhen using Gemini API, you must specify the GEMINI_API_KEY environment variable.\nUpdate your environment and try again (no reload needed if using .env)!\n```\n\nThese commands should function normally without error for API key.\n\nAlso worth noting that regular `gemini` works from same directory, pointing at issue as well...",
"number": 18812,
"title": "Command line utility commands shouldn't require set API key",
"url": "https://github.com/google-gemini/gemini-cli/issues/18812",
"analysis": "The bug is caused by an eager validation check for the `GEMINI_API_KEY` environment variable that runs during the initialization of the CLI or its subcommands. Even though utility commands like `extensions list` and `mcp list` only perform local filesystem operations (reading/linking local files), they appear to share an initialization path or a 'Context' object that mandates the presence of the API key. The error message 'When using Gemini API, you must specify the GEMINI_API_KEY...' is likely triggered by a validation function in the configuration or authentication layer. The fact that the base `gemini` command works suggests that the validation is either attached as a middleware/hook to subcommands or that the subcommands are explicitly instantiating a client/context that performs this check upon construction.",
"effort_level": "small",
"reasoning": "The issue is a localized logic fix involving the conditional execution of an environment variable check. Based on the error message, the validation is likely triggered in a global configuration hook or a shared constructor. Fixing this involves moving the validation to specific command handlers or making the API client initialization lazy, which qualifies as a trivial logic/config adjustment constrained to 1-2 files.",
"validated": true,
"recommended_implementation": "In the CLI's main entry point or configuration loader, move the GEMINI_API_KEY validation logic from the global initialization phase into the specific command handlers that perform API requests. This ensures that local utility commands like 'extensions' and 'mcp' can execute without requiring an environment variable."
},
{
"body": "### What happened?\n\nIts still appearing:\n\u2139 Installing IDE companion...\n\u2715 Failed to install VS Code companion extension. Please try installing 'Gemini CLI Companion' manually from the VS Code extension marketplace.\n\nEven I installed it from the vs code marketplace but it still says the same thing\n\n### What did you expect to happen?\n\nIt should connect smoothly\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\nAbout Gemini CLI \u2502\n\u2502 \u2502\n\u2502 CLI Version 0.27.3 \u2502\n\u2502 Git Commit d5a135b14 \u2502\n\u2502 Model auto-gemini-2.5 \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS win32 \u2502\n\u2502 Auth Method gemini-api-key \n```\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 18726,
"title": "Not able to connect gemini cli with the vscode",
"url": "https://github.com/google-gemini/gemini-cli/issues/18726",
"analysis": "The bug is located in the IDE integration logic, specifically within the detection and installation flow for the VS Code companion extension. The error message 'Failed to install VS Code companion extension' is explicitly defined in `packages/core/src/ide/ide-installer.ts` at line 192. The issue occurs because the CLI fails to detect that the extension is already installed (likely in a `isInstalled()` check) and subsequently fails to install it automatically via the `code --install-extension` command. On Windows (`win32`), this is frequently caused by how `child_process` handles command execution for 'code', which may require `.cmd` extensions or specific shell configurations to return the correct exit codes or output. Furthermore, if the user has installed it manually and the CLI still attempts to install it, the detection logic in `ide-installer.ts` is failing to correctly parse the output of `code --list-extensions` or the command itself is failing to run in the background.",
"effort_level": "medium",
"reasoning": "The issue involves debugging the integration between the CLI and the VS Code binary, specifically on Windows. It requires tracing logic across `ide-installer.ts` and potentially `ide-client.ts` to implement a check for existing installations (e.g., via `code --list-extensions`) and resolving shell execution issues with `child_process.spawnSync` for `.cmd` files. This aligns with the Medium criteria for service integration, logic tracing, and platform-specific path resolution.",
"validated": true
},
{
"body": "### What happened?\n\nSevere IME candidate window misalignment when typing CJK characters on Windows \n\n<img width=\"1521\" height=\"208\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/9564ada6-9aea-4a8c-8fd9-e2f8e46c81a3\" />\n\n\n\n### What did you expect to happen?\n\nthis,you know!\n\n<img width=\"736\" height=\"134\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/0ae6a4cc-dd54-4cf8-940e-2b409e0fc750\" />\n\n### Client information\n\n\n* **CLI Version:** 0.27.3\n* **Git Commit:** d5a135b14\n* **Session ID:** d15cc6d3-45a0-48bd-ae84-2dd4874bae60\n* **Operating System:** win32 v20.19.4\n* **Sandbox Environment:** no sandbox\n* **Model Version:** gemini-3-pro-preview\n* **Memory Usage:** 298.2 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** Unknown\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\ngoogle user\n\n### Anything else we need to know?\n\n_No response_",
"number": 18716,
"title": "Severe IME candidate window misalignment when typing CJK characters on Windows @C:\\Users\\PC5080\\.gemini\\tmp\\822e8215b009f46a641a99493e982cd82aecee13f183db24d50a086dbced0857\\images\\clipboard-1770708344776.png",
"url": "https://github.com/google-gemini/gemini-cli/issues/18716",
"analysis": "The bug is a classic IME (Input Method Editor) positioning issue in terminal applications. On Windows, the OS IME candidate window anchors itself to the terminal's hardware cursor position. In many modern CLI frameworks (like Ink, which this project appears to use based on the file structure), the UI is rendered by clearing and redrawing the screen, often hiding the hardware cursor or leaving it at the end of the rendered output. When a user types CJK characters, the Windows IME looks for the hardware cursor to position its candidate window; if the cursor is not explicitly moved to the logical insertion point in the text field, the window defaults to the bottom-left of the terminal or the last known cursor position.\n\nThe issue likely resides in the input handling and rendering loop. The `KeypressContext.tsx` manages input state, but the logic to synchronize the terminal's physical cursor with the UI's logical cursor is either missing or failing on Windows. Specifically, the application needs to ensure that during an active input session, the terminal cursor is made visible and moved to the correct (x, y) coordinates of the input field after every render.",
"effort_level": "large",
"reasoning": "This issue involves platform-specific terminal behavior on Windows, specifically the synchronization of the hardware cursor with the logical UI state to support OS-level IME windows. This falls under 'Platform-Specific Complexities' and requires deep terminal/PTY handling, which is categorized as Large effort.",
"validated": true
},
{
"body": "### What happened?\n\nI have verified that .json chat files exist in my project's temporary directory: C:\\Users\\...\\.gemini\\tmp\\<projectHash>\\chats .\n\nI confirmed that these files correspond to the correct projectHash for my current root directory. However, one specific session file is not listed among the candidates when running the `/resume` command.\n\nI attempted to manually resume this specific session by running the following command using its ID: `gemini --resume <target_sessionId>`\n\nThe CLI initiated a chat session without returning an error. However, when I ran `/stats` to verify the current session, the active sessionId was completely different from the one I passed in the argument. It appears the CLI silently failed to load the requested session and started a new one instead.\n\n### What did you expect to happen?\n\nThe CLI should list all valid .json files in the `/resume` list. If forced to resume via CLI flag, it should either load the correct session or return an error if the file is corrupt/unreadable, rather than silently creating a new session.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\nAbout Gemini CLI \u2502\n\u2502 \u2502\n\u2502 CLI Version 0.27.3 \u2502\n\u2502 Git Commit d5a135b14 \u2502\n\u2502 Model gemini-3-pro-preview \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS win32 \u2502\n\u2502 Auth Method Logged in with Google (@gmail.com) \u2502\n\u2502 GCP Project gen-lang-client \n```\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 18593,
"title": "Valid chat JSON missing from `/resume` list; forcing resume with `--resume` loads incorrect Session ID",
"url": "https://github.com/google-gemini/gemini-cli/issues/18593",
"analysis": "The bug manifests in two ways: a specific session file is missing from the `/resume` list, and forcing a resume via `--resume <sessionId>` silently starts a new session with a different ID. This indicates a failure in the session validation or loading logic, likely located in the session management component of the core package. \n\n1. **Missing from list**: The logic that scans the `.gemini/tmp/<projectHash>/chats` directory (likely in a `SessionManager` or `HistoryManager`) is likely filtering out the file. This usually happens if the JSON is missing a required field (like `sessionId`, `title`, or `timestamp`) or if there is a mismatch between the `sessionId` inside the file and the filename itself. \n2. **Silent fallback**: When `--resume` is used, the CLI entry point (likely `packages/cli/src/index.ts`) attempts to initialize the session. If the loading process fails (due to the same validation error or a path resolution issue on Windows), the code likely catches the error and defaults to `createNewSession()` instead of throwing an error and exiting. This explains why `/stats` shows a different ID.\n3. **Windows Specifics**: Since the user is on Windows, the `projectHash` calculation or path joining (e.g., handling of backslashes vs forward slashes) might be inconsistent between the listing logic and the loading logic, though the user's report suggests a file-specific issue rather than a directory-wide one.",
"effort_level": "medium",
"reasoning": "The issue involves tracing logic across the CLI entry point and the core session management logic. It requires debugging filesystem path resolution and JSON validation schemas to identify why specific files are filtered out. While it involves Windows paths, it is a standard filesystem/logic bug rather than a deep architectural or platform-specific subsystem issue like PTY or signal handling, fitting the criteria for Medium effort.",
"validated": true
},
{
"body": "### What happened?\n\n<img width=\"624\" height=\"113\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/21fbcf25-f5ae-49fc-870e-ef02989ad4f7\" />\n\n### What did you expect to happen?\n\n<img width=\"631\" height=\"110\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/1c36dd74-9369-4af9-a29b-679d815fb3ec\" />\n\n### Client information\n\n\n* **CLI Version:** 0.27.2\n* **Git Commit:** 3d2d44d74\n* **Session ID:** 3ff90074-1ca7-47f2-ab48-92bc50168460\n* **Operating System:** win32 v24.11.0\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto-gemini-3\n* **Memory Usage:** 213.3 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** Unknown\n* **Kitty Keyboard Protocol:** Unsupported\n* **IDE Client:** VS Code\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 18418,
"title": "Korean IME input is broken in the terminal. It's unusable. Fix it Plz.",
"url": "https://github.com/google-gemini/gemini-cli/issues/18418",
"analysis": "The bug involves Korean IME (Input Method Editor) composition failing in the terminal. In terminal applications, IME issues typically stem from how the application handles raw input from `stdin` and how it manages the terminal's state (raw mode). The provided context points to `packages/cli/src/ui/contexts/KeypressContext.tsx` as the primary logic for handling keyboard events, including complex mappings like the Kitty Keyboard Protocol (CSI u). On Windows (win32), IME composition often relies on the terminal emulator correctly passing composed UTF-8 characters to the process. If `KeypressContext.tsx` or the underlying input stream handling is too aggressive in intercepting raw bytes or fails to correctly buffer multi-byte UTF-8 sequences (which Korean characters are), the composition will break. Additionally, Korean characters are double-width; if the UI rendering logic (potentially related to `TableRenderer` or the input component using this context) doesn't account for character width during re-renders, the display will appear garbled or 'broken' during typing.",
"effort_level": "large",
"reasoning": "Fixing Korean IME input issues on Windows is a deep terminal complexity that involves the interaction between the OS, terminal emulator, and Node.js stdin. It requires managing terminal raw mode, correctly buffering multi-byte UTF-8 sequences during composition, and ensuring the UI rendering logic (Ink) handles double-width characters without breaking the IME state. This falls under the 'Large' criteria for platform-specific terminal/PTY complexities.",
"validated": true
},
{
"body": "### What happened?\n\nThe CLI displays a notification that 0.27.1 \u2192 0.27.2 is available and suggests running brew upgrade gemini-cli. However, running the\n command results in a \"Warning: gemini-cli 0.27.1 already installed\" because the Homebrew formula has not yet been updated.\n Expected Behavior:\n The CLI should ideally detect the installation method (Homebrew) and only notify when an update is actually available through that\n channel, or at least suppress the notification if it cannot be fulfilled by the current package manager.\n Environment:\n - OS: Darwin (macOS)\n - Version: 0.27.1\n - Install Method: Homebrew\n\n\n### What did you expect to happen?\n\nno false and constant warnings\n\n### Client information\n\n\n* **CLI Version:** 0.27.1\n* **Git Commit:** 7f91d7501\n* **Session ID:** e12d4fb9-68e1-415d-9e6d-9dab781e1815\n* **Operating System:** darwin v25.6.0\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto-gemini-3\n* **Memory Usage:** 438.4 MB\n* **Terminal Name:** iTerm2 3.6.6\n* **Terminal Background:** #fafafa\n* **Kitty Keyboard Protocol:** Supported\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 18405,
"title": "Update notification shows version 0.27.2 available while Homebrew is still on 0.27.1",
"url": "https://github.com/google-gemini/gemini-cli/issues/18405",
"analysis": "The bug is caused by a mismatch between the version source used for update checks and the actual availability of that version in the Homebrew repository. The CLI likely fetches the latest version from a global source (such as GitHub Releases or NPM) and, upon detecting that the binary is managed by Homebrew (likely by checking the installation path for 'Cellar' or 'homebrew'), it suggests the `brew upgrade` command. However, Homebrew formulae often lag behind official releases by several hours or days.\n\nTo fix this, the update logic needs to be package-manager aware. Specifically, if the CLI detects it was installed via Homebrew, it should query the Homebrew Formulae API (e.g., `https://formulae.brew.sh/api/formula/gemini-cli.json`) to determine the latest available version on that specific channel, rather than relying on the global release version.",
"effort_level": "medium",
"reasoning": "The fix requires implementing environment detection logic to identify Homebrew installations and integrating a new external service call to the Homebrew Formulae API. This involves modifying asynchronous control flows and handling intermediate API response processing to ensure version parity, which aligns with the criteria for Medium effort involving service integration and logic tracing.",
"validated": true
},
{
"body": "### What happened?\n\nHi all,\n\nAfter updating to gemini-cli 0.27.0 this morning, I found that I was unable to read the text in the prompt. Here is an example of what I was seeing:\n\n<img width=\"1709\" height=\"313\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/85a00e2a-b7df-4703-bdbf-4b5232fe37d4\" />\n\nAfter a moment of panic I decided to go through all of the changenotes and PRs and luckily stumbled upon https://github.com/google-gemini/gemini-cli/pull/16563. Then, I was able to change the `ui.useBackgroundColor` to `false` and voila, usable again.\n\nSome additional notes. I use tmux in alacritty. This only happens when I'm in tmux. So yes, this likely only impact a very few individuals but figured it was worth noting. Even if it only helps me and a few others now and in the future.\n\n### What did you expect to happen?\n\nI did not expect to have my workflow break and only luckily find the problem and fix.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n\u2502 About Gemini CLI \u2502\n\u2502 \u2502\n\u2502 CLI Version 0.27.0 \u2502\n\u2502 Git Commit ec10a7692 \u2502\n\u2502 Model auto-gemini-3 \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS linux \u2502\n\u2502 Auth Method gemini-api-key\n```\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\ntmux 3.5a on alacritty 0.16.1",
"number": 18315,
"title": "`useBackgroundColor` on `tmux` on `alacritty`: Can't See Prompt Text",
"url": "https://github.com/google-gemini/gemini-cli/issues/18315",
"analysis": "The bug is caused by the introduction of the `ui.useBackgroundColor` configuration setting, which defaults to `true` or was recently enabled. When this setting is active, the CLI attempts to set a specific background color for the terminal UI components (likely using the `backgroundColor` prop in an `ink` `Box` component). In specific terminal environments like `tmux` running inside `alacritty`, this background color either matches the default text color or interferes with the terminal's color rendering, leading to invisible text in the prompt area. The issue is likely that the foreground (text) color is not being explicitly set to a contrasting value when the background color is applied, or the background color chosen is problematic for 256-color/true-color translation in `tmux`.",
"effort_level": "small",
"reasoning": "The issue is a localized UI color contrast problem occurring in specific terminal environments. Fixing it involves either changing the default configuration value for 'useBackgroundColor' or ensuring a contrasting foreground color is explicitly set in the Ink components. This aligns with the 'Small' criteria for minor tweaks to color themes and trivial logic/config changes.",
"validated": true,
"recommended_implementation": "In the configuration definition file (e.g., `src/config.ts`), change the default value of `ui.useBackgroundColor` from `true` to `false`. This ensures that users in terminal environments like tmux do not encounter invisible text by default while still allowing them to opt-in if desired."
},
{
"body": "### What happened?\n\nWhen using Gemini CLI v0.27.0 on Windows within **IDE integrated terminals**, the input prompt area renders with a **black background** regardless of the selected theme, while the same configuration works correctly in Windows Terminal.\n\n**Affected terminals:**\n- \u274c IntelliJ IDEA integrated terminal (JediTerm)\n - <img width=\"707\" height=\"231\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/2975c462-08dc-42fb-8f14-2e4822364463\" />\n\n- \u274c VS Code integrated terminal\n - <img width=\"664\" height=\"264\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/5d20f543-2317-4f17-8ac8-709e33480f3e\" />\n\n**Unaffected terminals:**\n- \u2705 Windows Terminal (works correctly with Light theme)\n - <img width=\"814\" height=\"260\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/4e1f3aff-791a-438c-bcde-f310aab085c4\" />\n\n**Reproduction steps:**\n1. Open IntelliJ IDEA or VS Code on Windows\n2. Launch Gemini CLI in the integrated terminal\n3. Select a Light theme via `/theme` (e.g., `ANSI Light` or `Google Code Light`)\n4. Observe: The input box has a black background despite the light theme selection\n\n**Themes tested:**\n- `ANSI Light` \u2014 black background in IDE terminals\n- `Google Code Light` \u2014 black background in IDE terminals\n\n**Workaround tested:**\n- `$env:NO_COLOR=1; gemini` (PowerShell) \u2014 Does NOT resolve the issue; input box background remains black\n\n### What did you expect to happen?\n\nThe input box background should respect the selected Light theme in IDE integrated terminals, just as it does in Windows Terminal.\n\n### Client information\n\n```\nCLI Version 0.27.0\nGit Commit ec10a7692\nModel gemini-3-pro-preview\nSandbox no sandbox\nOS win32\nAuth Method gemini-api-key\nIDE Client IntelliJ IDEA\n```\n\n### Login information\n\nAPI Key\n\n### Anything else we need to know?\n\n**Additional environment:**\n- OS: Windows 11\n- Node.js: v25.5.0\n- IntelliJ IDEA: 2025.3.2 (Build #IU-253.30387.90)\n\n## Possibly related changes in v0.27.0\n\nI noticed the following PRs in v0.27.0 that may be related:\n\n- **PR #16563**: `feat(ui): add solid background color option for input prompt` by @jacob314\n - This appears to have introduced a solid background for the input box\n - The issue may be that when background color detection fails, it defaults to a dark/black background\n\n- **PR #17414**: `refactor(cli): keyboard handling and AskUserDialog` by @jacob314\n - Possibly related observation: Japanese IME input behavior has changed\n - Previously, composing text was displayed outside the input box; now it appears correctly inside the input box\n - This suggests the input box rendering was significantly refactored in this version\n\n## Speculation (not confirmed)\n\nI suspect the terminal background color detection (OSC 11 escape sequence, introduced in v0.23.0) may not work correctly in IDE integrated terminals:\n\n- **Windows Terminal**: Responds correctly to OSC 11 \u2192 proper theme applied\n- **IDE terminals (JediTerm, VS Code)**: May not respond to OSC 11 or return incorrect values \u2192 falls back to dark/black background\n\nThis would explain why the issue is specific to IDE integrated terminals while Windows Terminal works correctly.\n\nThe fact that `NO_COLOR=1` does not resolve the issue suggests this is not a color/theme problem but rather an issue with how the input box background is rendered when OSC 11 detection fails.\n\n## Related issues\n\n- Issue #16728: JetBrains IDE detection issues (may be related)",
"number": 18291,
"title": "Input box background renders black in IDE integrated terminals (IntelliJ IDEA, VS Code) on Windows despite Light theme selection",
"url": "https://github.com/google-gemini/gemini-cli/issues/18291",
"analysis": "The bug involves the input box rendering with a black background in IDE-integrated terminals (VS Code, IntelliJ) on Windows when using Light themes. This suggests a conflict between the CLI's UI rendering engine (Ink) and the terminal emulator's handling of ANSI background color codes. Since 'NO_COLOR=1' does not resolve the issue, the background color is likely being explicitly set in a UI component rather than through a standard color utility that respects environment variables. The issue is specific to IDE terminals on Windows, which often use different terminal emulators (like xterm.js or JediTerm) compared to the native Windows Terminal. The root cause is likely in the component responsible for rendering the interactive prompt, where a background color is applied via an Ink <Box> or <Text> property that doesn't correctly adapt to the 'Light' theme's palette or is being misinterpreted by the IDE's terminal color mapping.",
"effort_level": "medium",
"reasoning": "The issue involves debugging how Ink components translate theme colors into ANSI sequences specifically for IDE-integrated terminals on Windows. While the fix might be localized to a few lines of code in the input component or theme logic, the requirement to validate across multiple environments (VS Code, IntelliJ) and the potential for subtle ANSI interpretation differences between terminal emulators (xterm.js vs JediTerm) elevates it beyond a 'Small' task. It falls under 'React/Ink State Management' or 'UI state synchronization' within the Medium criteria.",
"validated": true
},
{
"body": "### Context\nRecent changes (e.g., PR #17993) to input handling have inadvertently introduced severe accessibility and safety issues for users on touch interfaces (Android/Termux/Tablets).\n\n### 1. The \"Inequitable\" Double-Tap Requirement\nThe current \"Double Ctrl+C to Quit\" logic presumes a physical keyboard. On touch keyboards, `Ctrl` is often a toggle state, not a hold modifier.\n* Performing a rapid \"Double Ctrl+C\" sequence is mechanically inconsistent across IMEs (e.g., `Ctrl(tap) -> c -> Ctrl(tap) -> c` vs `Ctrl(lock) -> c -> c`).\n* **Result:** It is effectively impossible for mobile users to perform this \"gesture\" reliably. It forces them to abandon the standard signal key, leaving them with no clear, equitable way to exit or interrupt compared to physical keyboard users.\n\n### 2. The \"Runaway Agent\" Hazard (No Brakes)\nDue to input priority changes, both `ESC` and `Ctrl+C` signals are currently unreliable for interrupting active streams/tools:\n* `ESC` is intercepted for \"Rewind\" navigation logic in `InputPrompt`.\n* `Ctrl+C` is overloaded with \"Quit\" logic in `AppContainer`.\n* **The Danger:** If an Agent misunderstands a prompt (Language Model Hallucination) and starts executing a destructive or looping chain of actions, the user **CANNOT STOP IT**. The CLI becomes a \"driverless car without brakes.\"\n\n### 3. Demand for a Deterministic Kill Switch\n* We cannot rely on ambiguous shortcuts like \"Double Tap\" for safety-critical operations.\n* **Requirement:** A single, deterministic, non-overloaded keystroke or UI mechanism that guarantees an immediate `AbortController.abort()` signal to the Agent loop, bypassing all UI state logic.\n* If `Ctrl+C` is unreliable on touch, allow remapping to a single key (e.g., `F10`) or ensure `Ctrl+C` (Single Press) **ALWAYS** acts as an interrupt/abort signal, never a quit signal, unless explicit confirmation is given.",
"number": 18087,
"title": "[Safety Critical] Input Handling Flaws deny 'Emergency Stop' on Touch Interfaces (Inequitable Keybindings)",
"url": "https://github.com/google-gemini/gemini-cli/issues/18087",
"analysis": "The bug is rooted in the input event arbitration logic within the CLI's UI components. Specifically, `AppContainer` (likely in `packages/core/src/components/AppContainer.tsx` or similar) implements a stateful 'Double Ctrl+C' exit handler that fails to account for the non-persistent modifier states of touch-based IMEs (like Termux). Simultaneously, `InputPrompt` (likely in `packages/core/src/components/InputPrompt.tsx`) intercepts the `ESC` key for its 'Rewind' navigation feature. This creates a 'signal shadowing' effect where UI-level navigation and exit confirmation logic take precedence over the execution-level 'Interrupt' signal. When an agent is active, there is no single-press, high-priority path to send a `SIGINT` or equivalent cancellation token to the running tool/stream, as the inputs are trapped by the UI state machine.",
"effort_level": "medium",
"reasoning": "The issue involves input arbitration and state synchronization across multiple Ink components (AppContainer and InputPrompt) to resolve 'signal shadowing.' While it involves platform-specific behavior (touch interfaces/Termux) and 'SIGINT' concepts, the fix is primarily focused on React/Ink state management and logic tracing within the UI layer to ensure interruption signals are correctly prioritized. This aligns with the Medium criteria for integration across components and input buffer/focus management, rather than a deep architectural or low-level PTY/POSIX overhaul.",
"validated": true
},
{
"body": "### What happened?\n\nAPI requests made through the Gemini CLI can hang indefinitely (or up to the default Node.js/undici timeout of 5 minutes) when the backend or local proxy becomes unresponsive. This results in a poor user experience where the CLI appears frozen.\n\n### What did you expect to happen?\n\nThe CLI should have a reasonable, explicit client-side timeout (e.g., 60 seconds) for API calls. If this timeout is exceeded, the request should be aborted, and the error should be treated as a retryable ETIMEDOUT error so that the built-in resilience logic (exponential backoff) can attempt the request again.\n\n### Client information\n\nLinux\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 18030,
"title": "API calls hang for 5 minutes (default node timeout) without retry",
"url": "https://github.com/google-gemini/gemini-cli/issues/18030",
"analysis": "The bug is caused by the lack of a default client-side timeout in the HTTP request utility. While `packages/core/src/utils/fetch.ts` contains logic to throw a `FetchError` with code `ETIMEDOUT` (line 204), it likely only does so if a timeout is explicitly provided in the options. When no timeout is passed, the request defaults to the underlying Node.js/undici timeout (typically 5 minutes). Since `packages/core/src/utils/retry.ts` (line 51) already includes `ETIMEDOUT` in its retryable errors list, the fix involves ensuring a default timeout (e.g., 60,000ms) is applied in `fetch.ts` and that the `AbortController` correctly triggers the timeout error.",
"effort_level": "small",
"reasoning": "The fix is highly localized to packages/core/src/utils/fetch.ts, primarily involving the adjustment of the 'defaultTimeout' constant from 5 minutes to 60 seconds. Since the retry logic for 'ETIMEDOUT' is already implemented in packages/core/src/utils/retry.ts, this task qualifies as a trivial configuration change and a localized fix.",
"validated": true,
"recommended_implementation": "In `packages/core/src/utils/fetch.ts`, change the `defaultTimeout` variable value from `300000` to `60000` to reduce the default client-side timeout to 60 seconds."
},
{
"body": "### What happened?\n\nI was testing to see what CTRL-X would do and thought it would \"open external editor\" but instead It opened this view (See below) and I was stuck here, unable to exit had to restart the termianl.\n\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n\"/var/folders/2p/ykp5jf1n49v58wtw3gr4q06r0000gn/T/gemini-edit-DDUCZc/buffer.txt\" 0L, 0B\n\n### What did you expect to happen?\n\nNot this... I was very confused (in retrospect I should have realized it was VIM), but first I had Gemini CLI give me an analysis\n\n\u2726 The Ctrl+X shortcut in Gemini CLI opens the current prompt in an external editor.\n\n The specific editor used is determined by the following precedence:\n 1. `general.preferredEditor` setting: If you have configured this in your settings (e.g., via\n /settings).\n 2. `VISUAL` environment variable: If the setting is not found.\n 3. `EDITOR` environment variable: If VISUAL is not set.\n **4. Default: vi on macOS/Linux (or notepad on Windows).**\n\n Supported values for preferredEditor include:\n * GUI Editors: vscode, vscodium, windsurf, cursor, zed, antigravity\n * Terminal Editors: vim, neovim, emacs, hx (Helix)\n\nThis made me realize this must be VIM, so I tried to open it normally without CLI doing so for me. The experience was much better as it showed me this:\n\n~ VIM - Vi IMproved\n~\n~ version 9.1.1752\n~ by Bram Moolenaar et al.\n~ Vim is open source and freely distributable\n~\n~ Help poor children in Uganda!\n~ type :help iccf<Enter> for information\n~\n~ type :q<Enter> to exit\n~ type :help<Enter> or <F1> for on-line help\n~ type :help version9<Enter> for version info\n\nI think we need to rethink the default editor experience given how many people (including me) never normally use VIM and going in there and as we know exiting VIM is very confusing. \n\n### Client information\n\nN/A (this isn't version speciifc)\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 18029,
"title": "Pressing CTRL-X (open external editor) entered a unexpected state",
"url": "https://github.com/google-gemini/gemini-cli/issues/18029",
"analysis": "The bug occurs because when the Gemini CLI launches a terminal-based editor (like 'vi', 'vim', or 'hx') via the CTRL-X shortcut, it does not properly suspend the CLI's own terminal state (e.g., raw mode or Ink UI rendering). This results in the editor being launched in a terminal environment that is still being managed or intercepted by the parent Node.js process, causing input issues and making the user feel 'stuck'. The logic for identifying terminal editors exists in `packages/core/src/utils/editor.ts`, but the execution logic likely fails to call `process.stdin.setRawMode(false)` and pause the UI before spawning the subprocess with `stdio: 'inherit'`, and then fails to restore it afterwards.",
"effort_level": "medium",
"reasoning": "The issue requires synchronizing the terminal state (raw mode) and the Ink UI lifecycle with an external subprocess. This involves logic tracing in the input handling layer and managing asynchronous control flow to ensure the CLI correctly pauses and resumes, which fits the criteria for React/Ink state management and asynchronous flow resolution.",
"validated": true
},
{
"body": "### What happened?\n\nI used the /code-review slash command (https://github.com/gemini-cli-extensions/code-review) and walked away. When I returned, the message below had repeated 1382 times before stopping with the warning \"Response truncated due to token limits.\"\n\n`Change summary: Refactored coordinate matching to optimize performance and reduce code duplication.`\n\nI've attached a truncated history.\n\n[bug-report-history-1769716926862_truncated.json](https://github.com/user-attachments/files/24947058/bug-report-history-1769716926862_truncated.json)\n\n### What did you expect to happen?\n\nI've used the /code-review slash command many times. I expected it to analyze code changes and identify code quality issues.\n\n### Client information\n\n\n* **CLI Version:** 0.26.0\n* **Git Commit:** a380b4219\n* **Session ID:** bd598b61-f552-4fdc-a1c4-b5c9ff7f4a00\n* **Operating System:** win32 v20.19.6\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto-gemini-3\n* **Memory Usage:** 511.9 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** #0c0c0c\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 17925,
"title": "Change summary: Refactored coordinate matching to optimize performance and reduce code duplication.",
"url": "https://github.com/google-gemini/gemini-cli/issues/17925",
"analysis": "The bug is an infinite loop occurring during the execution of the `/code-review` slash command. The model repeatedly generates the same 'Change summary' (which is likely the commit message of the current HEAD, retrieved via `GitService.getCurrentCommitHash` or similar git tools). \n\nThis behavior indicates a failure in the agentic loop's termination logic. In `gemini-cli`, slash commands that involve multi-step reasoning or 'autonomous' behavior are managed by an agent loop. The loop likely expects a specific termination signal (such as a tool call to `finish_task`, a 'TERMINATE' keyword, or the absence of further actions). If the prompt for `/code-review` (likely defined in `packages/core/src/prompts/` or the extension) does not instruct the model on how to terminate, or if the core agent logic defaults to 'continue' when the model only provides text without a tool call, the system will re-prompt the model. \n\nBecause the context (the git diff and previous summary) remains static and the prompt is repeated, the model deterministically produces the same output. The loop ran 1382 times, indicating a lack of a safety iteration cap in the core agent execution logic. The process only stopped when the underlying LLM's token limit was reached, causing the 'Response truncated' error.",
"effort_level": "medium",
"reasoning": "The issue is a logic error in the agentic execution loop where a lack of iteration caps and termination signals causes an infinite loop. Fixing this requires tracing the control flow in the agent dispatcher, implementing a safety counter (max iterations), and potentially adjusting the prompt logic for the code-review extension. This falls under logic tracing and asynchronous flow management across a few core components, but does not involve the deep architectural or platform-specific complexities required for a 'Large' rating.",
"validated": true
},
{
"body": "### What happened?\n\n When executing a Node.js one-liner using npx tsx -e \"code...\" via the run_shell_command tool, the\n process frequently fails to terminate. Instead, it drops into an interactive Node.js REPL (>), which\n the Gemini CLI interprets as an \"Awaiting input\" state. This prevents the tool from returning its\n output, locking the agent for long periods or requiring a manual timeout. This occurred 10+ times in\n a single session.\n\n### What did you expect to happen?\n\n The command should execute the script and exit immediately, returning the output to the agent. It\n should never fall back into interactive mode when run via a non-interactive shell command tool.\n\n### Client information\n\n\n* **CLI Version:** 0.26.0\n* **Git Commit:** a380b4219\n* **Session ID:** df40baa2-4548-441c-97ac-de2fa31db0f6\n* **Operating System:** win32 v24.11.0\n* **Sandbox Environment:** no sandbox\n* **Model Version:** gemini-3-flash-preview\n* **Memory Usage:** 1.34 GB\n* **Terminal Name:** Unknown\n* **Terminal Background:** #0c0c0c\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n Workaround: Write code to a .ts file and run it via npx tsx scripts/file.ts.\n\n[gemini-conversation-1769720403475.json](https://github.com/user-attachments/files/24947837/gemini-conversation-1769720403475.json)",
"number": 17897,
"title": "npx tsx -e falls into interactive REPL and hangs Gemini CLI shell tool",
"url": "https://github.com/google-gemini/gemini-cli/issues/17897",
"analysis": "The bug is caused by the `run_shell_command` tool's output processing logic, which incorrectly identifies the Node.js/tsx REPL prompt (`>`) as a shell prompt or an interactive input request. When `npx tsx -e \"code...\"` is executed, especially on Windows (win32), certain conditions (like an open stdin or PTY configuration) can cause `tsx` to stay open or output a prompt character after execution. The Gemini CLI's shell tool implementation likely uses a pseudo-terminal (PTY) and monitors the output stream for common shell prompts (like `>`, `$`, `#`) to determine when a command has finished or if it requires user input. In this case, it sees the `>` from `tsx`, enters an 'Awaiting input' state, and hangs because it's waiting for a user who isn't there (since it's an automated agent tool call).",
"effort_level": "large",
"reasoning": "This issue involves platform-specific PTY and child process management on Windows, where the shell tool incorrectly identifies a REPL prompt as an interactive state. According to the criteria, deep terminal/PTY issues and child process management related to Windows are classified as Large effort due to the complexity of cross-platform shell behavior and the need for robust state synchronization in the shell execution service.",
"validated": true
},
{
"body": "### What happened?\n\nI'm too lazy to do extra work because this CLI is frustrating. So you can close this issue.\n\nJust wanted to voice it whenever I have Gemini CLI run shell commands, particularly run my bun test suite the CLI crashes every single time, no matter what terminal I use. The workaround I have to use is to tell it to tell me to run the test suite and I do that and then copy paste the results and so forth. This is ridiculous \n\n[ACTION REQUIRED] \ud83d\udcce PLEASE ATTACH THE EXPORTED CHAT HISTORY JSON FILE TO THIS ISSUE IF YOU FEEL COMFORTABLE SHARING IT.\n\n### What did you expect to happen?\n\nFor it to be able To use run_shell_command tool without breaking. it does ok in other use cases But struggles when it has to use is code base investigator tool and shell command tool. It just sucks. \n\n### Client information\n\n\n* **CLI Version:** 0.26.0\n* **Git Commit:** a380b4219\n* **Session ID:** 317b2cb2-d9fd-4b5f-9d26-670e7273bd3a\n* **Operating System:** darwin v22.6.0\n* **Sandbox Environment:** no sandbox\n* **Model Version:** gemini-3-pro-preview\n* **Memory Usage:** 215.4 MB\n* **Terminal Name:** ghostty 1.2.3\n* **Terminal Background:** #f0efeb\n* **Kitty Keyboard Protocol:** Supported\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 17891,
"title": "cli breaks when running shell command",
"url": "https://github.com/google-gemini/gemini-cli/issues/17891",
"analysis": "The crash occurs when the `run_shell_command` tool executes commands that produce high-frequency, ANSI-heavy output, such as `bun test`. The root cause is likely the CLI's UI layer (built with Ink) being overwhelmed by the rapid stream of stdout/stderr updates. When `ShellExecutionService` pipes these updates directly to the UI without throttling or sanitization, it can trigger a crash in the rendering loop (e.g., 'Maximum update depth exceeded' or memory exhaustion). The user's mention of the 'code base investigator tool' suggests that the combined memory pressure of codebase indexing and the rapid shell output further destabilizes the process. Since the crash happens 'every single time' with `bun test` regardless of the terminal emulator, it points to an internal bottleneck in how the CLI handles process streams.",
"effort_level": "medium",
"reasoning": "The issue involves managing the data flow between the shell execution service and the Ink-based UI. Implementing a throttling mechanism to prevent UI thread saturation and handling large ANSI-heavy buffers requires logic tracing and state synchronization across the service and UI layers, which aligns with the Medium effort criteria for React/Ink state management and asynchronous flow control.",
"validated": true
},
{
"body": "### What happened?\n\nWhen launching multiple instances of gemini-cli in non-interactive mode I am sometimes getting the following error from some of them:\n\n```\nError in <home>/.gemini/settings.json: Unexpected end of JSON input\nPlease fix the configuration file(s) and try again.\n```\n\nMy assumption is that at some point during initialization we are updating (writing) the `settings.json` file without any locking mechanism, and concurrent instances of gemini-cli see a partial version of this.\n\nI think we either need to avoid writing the `settings.json` if there are no changes to be written, and/or implement a lock mechanism.\n\n### What did you expect to happen?\n\nMultiple instances of gemini-cli should not interfere with each other's initialization.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\nCLI Version 0.27.0-nightly.20260128.830e21275 \u2502\u2588\n\u2502 Git Commit 830e21275 \u2502\u2588\n\u2502 Model auto-gemini-3 \u2502\u2588\n\u2502 Sandbox no sandbox \u2502\u2588\n\u2502 OS linux \u2502\u2588\n\u2502 Auth Method gemini-api-key \u2502\u2588\n\u2502 IDE Client VS Code\n```\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 17801,
"title": "Getting \"Unexpected end of JSON input\" on valid .gemini/settings.json",
"url": "https://github.com/google-gemini/gemini-cli/issues/17801",
"analysis": "The error 'Unexpected end of JSON input' typically occurs when `JSON.parse()` is called on an empty string or a truncated file. In a CLI environment where multiple instances run concurrently, this points to a race condition during the initialization phase where one instance is writing to `~/.gemini/settings.json` while another is reading it. Standard Node.js file writing methods like `fs.writeFileSync` truncate the file to zero length before writing the new content. If a second process attempts to read the file during this window, it reads an empty string, causing the parser to fail. The fix involves implementing atomic writes (writing to a temporary file and then using `fs.renameSync`) and potentially adding a file-level lock during the read-modify-write cycle to prevent data loss or corruption.",
"effort_level": "medium",
"reasoning": "The issue involves a race condition during file I/O when multiple CLI instances access the settings file. Resolving this requires implementing atomic write operations (e.g., write-to-temp and rename) or a file-locking mechanism within the configuration management logic. This falls under the Medium category as it involves asynchronous flow control and standard filesystem synchronization across a few components, but does not reach the architectural complexity of the Large category.",
"validated": true
},
{
"body": "### What happened?\n\nprompt: \"Set up suitable .gitignore rules\"\n\n```bash\n\n\u2726 I will set up suitable .gitignore rules for your project. First, I will identify any existing .gitignore files and then suggest modifications to include common patterns for a\n Hugo site.\n\n ERROR ioctl(2) failed, EBADF\n\n - at unknown\\t \n - <anonymous> (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/@lydell/node-pty/unixTerminal.js:243:13)\n - resizePty (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/@google/gemini-cli-core/dist/src/services/shellExecutionService.js:603:38)\n - <anonymous> (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/@google/gemini-cli/dist/src/ui/AppContainer.js:649:39)\n - react-stack-bottom-frame (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:15945:20)\n - runWithFiberInDEV (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:1738:13)\n - commitHookEffectListMount (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:9516:29)\n - commitHookPassiveMountEffects (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:9639:11)\n - commitPassiveMountOnFiber (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11364:13)\n - recursivelyTraversePassiveMountEffects (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11338:11)\n - commitPassiveMountOnFiber (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11479:11)\n - recursivelyTraversePassiveMountEffects (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11338:11)\n - commitPassiveMountOnFiber (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11357:11)\n - recursivelyTraversePassiveMountEffects (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11338:11)\n - commitPassiveMountOnFiber (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11479:11)\n - recursivelyTraversePassiveMountEffects (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11338:11)\n - commitPassiveMountOnFiber (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11357:11)\n - recursivelyTraversePassiveMountEffects (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11338:11)\n - commitPassiveMountOnFiber (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11479:11)\n - recursivelyTraversePassiveMountEffects (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11338:11)\n - commitPassiveMountOnFiber (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11357:11)\n - recursivelyTraversePassiveMountEffects (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11338:11)\n - commitPassiveMountOnFiber (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11479:11)\n - recursivelyTraversePassiveMountEffects (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11338:11)\n - commitPassiveMountOnFiber (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11357:11)\n - recursivelyTraversePassiveMountEffects (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11338:11)\n - commitPassiveMountOnFiber (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11479:11)\n - recursivelyTraversePassiveMountEffects (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11338:11)\n - commitPassiveMountOnFiber (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11357:11)\n - recursivelyTraversePassiveMountEffects (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11338:11)\n - commitPassiveMountOnFiber (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11479:11)\n - recursivelyTraversePassiveMountEffects (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11338:11)\n - commitPassiveMountOnFiber (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11357:11)\n - recursivelyTraversePassiveMountEffects (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11338:11)\n - commitPassiveMountOnFiber (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11479:11)\n - recursivelyTraversePassiveMountEffects (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11338:11)\n - commitPassiveMountOnFiber (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11479:11)\n - recursivelyTraversePassiveMountEffects (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11338:11)\n - commitPassiveMountOnFiber (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11479:11)\n - recursivelyTraversePassiveMountEffects (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11338:11)\n - commitPassiveMountOnFiber (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11479:11)\n - recursivelyTraversePassiveMountEffects (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11338:11)\n - commitPassiveMountOnFiber (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11479:11)\n - recursivelyTraversePassiveMountEffects (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11338:11)\n - commitPassiveMountOnFiber (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11367:11)\n - recursivelyTraversePassiveMountEffects (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11338:11)\n - commitPassiveMountOnFiber (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11479:11)\n - recursivelyTraversePassiveMountEffects (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11338:11)\n - commitPassiveMountOnFiber (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:11376:11)\n - flushPassiveEffects (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:13329:9)\n - <anonymous> (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/react-reconciler/cjs/react-reconciler.development.js:13073:15)\n - performWorkUntilDeadline (/tmp/bunx-1000-@google/gemini-cli@latest/node_modules/scheduler/cjs/scheduler.development.js:45:48)\n\n\n```\n\n\n- Had to force-close the terminal.\n- It worked successfully on the second attempt.\n\n\n\n\n\n\n### What did you expect to happen?\n\ncontinue without any errors\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 \u2502\n\u2502 About Gemini CLI \u2502\n\u2502 \u2502\n\u2502 CLI Version 0.26.0 \u2502\n\u2502 Git Commit a380b4219 \u2502\n\u2502 Model auto-gemini-2.5 \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS linux \u2502\n\u2502 Auth Method OAuth \u2502\n\u2502 User Email xx@gmail.com \u2502\n\u2502 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n```\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 17729,
"title": "ERROR ioctl(2) failed, EBADF",
"url": "https://github.com/google-gemini/gemini-cli/issues/17729",
"analysis": "The error `EBADF` (Bad File Descriptor) occurs when `ioctl(2)` is called on a file descriptor that is already closed or invalid. In this context, the stack trace indicates that `node-pty` is attempting to resize a terminal (`resizePty`) that has likely been destroyed or closed. The call originates from a React effect in `AppContainer.tsx` which triggers `shellExecutionService.resizePty`. This is a classic race condition where the UI attempts to synchronize terminal dimensions (possibly due to a window resize or component re-render) after the underlying shell process has terminated or the PTY instance has been disposed of. The fix requires adding a state check in the `ShellExecutionService` to ensure the PTY is still active before calling `resize()` and ensuring that `AppContainer` properly cleans up resize listeners or guards the call.",
"effort_level": "medium",
"reasoning": "The issue is a state synchronization race condition between the React/Ink UI resize events and the PTY lifecycle in the ShellExecutionService. While it involves PTYs, the fix is not a deep architectural change but rather defensive programming (adding guards) and refining React effect cleanups to ensure resize calls aren't made on disposed file descriptors. This fits the Medium criteria for logic tracing and state synchronization across components.",
"validated": true
},
{
"body": "### What happened?\n\nResuming a session with the --resume flag fails unless the conversation already contains at least one human message.\n\nThis makes it impossible to resume sessions that were initialized programmatically or contain only system/assistant messages.\n\n### What did you expect to happen?\n\nThe session should resume successfully regardless of whether a human message exists in the conversation.\n\n### Client information\n\nCLI Version 0.27.0-nightly.20260121.97aac696f \u2502\n\u2502 Git Commit 23a2309ab \u2502\n\u2502 Model gemini-2.5-flash-lite \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS darwin \u2502\n\u2502 Auth Method Logged in with Google (krishnacodes15@gmail.com) \u2502\n\u2502 IDE Client IDE\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 17677,
"title": "Session resume requires at least one human message to work",
"url": "https://github.com/google-gemini/gemini-cli/issues/17677",
"analysis": "The bug is likely caused by a validation check in the session restoration logic that requires at least one message with the 'user' role to consider a session valid for resumption. When the `--resume` flag is used, the CLI attempts to load the previous session's history. If the history contains only system prompts or assistant messages (common in programmatically initialized sessions), the logic likely fails a 'has human message' check, preventing the session from loading. The core of this logic is expected to be in the `useSessionResume` hook or the history management service it utilizes.",
"effort_level": "medium",
"reasoning": "The issue involves tracing the session restoration logic across the useSessionResume hook and history conversion utilities. Fixing the requirement for a human message involves adjusting how the conversation history is filtered and synchronized between the UI state and the Gemini client. This falls under the criteria for logic tracing, React state management (useEffect/useState synchronization), and service integration logic across multiple components.",
"validated": true
},
{
"body": "### Description\nThe Gemini CLI consistently emits `[ERROR] [ImportProcessor]` warnings on startup. These errors appear to stem from a regex or string-parsing bug in the `ImportProcessor` that incorrectly identifies TypeScript directives (e.g., `ts-ignore`, `ts-nocheck`) as physical modules. \n\nAdditionally, the error messages contain corrupted path strings with hanging backticks and periods (e.g., `preview` .), suggesting a failure in the CLI's internal dependency resolution engine.\n\n### Steps to Reproduce\n1. Install `@google/gemini-cli@latest` (v0.25.2).\n2. Have any extension installed (e.g., `chrome-devtools-mcp`).\n3. Run `gemini` in any directory.\n\n### Observed Output\n```text\n[ERROR] [ImportProcessor] Failed to import google/gemini-cli@preview.: ENOENT: no such file or directory, access '/Users/adele/.gemini/google/gemini-cli@preview.'\n[ERROR] [ImportProcessor] Failed to import google/gemini-cli@preview: ENOENT: no such file or directory, access '/Users/adele/.gemini/google/gemini-cli@preview'\n[ERROR] [ImportProcessor] Failed to import ts-ignore: ENOENT: no such file or directory, access '/Users/adele/.gemini/extensions/chrome-devtools-mcp/ts-ignore'\n[ERROR] [ImportProcessor] Failed to import ts-nocheck: ENOENT: no such file or directory, access '/Users/adele/.gemini/extensions/chrome-devtools-mcp/ts-nocheck'\n[ERROR] [ImportProcessor] Failed to import ts-expect-error: ENOENT: no such file or directory, access '/Users/adele/.gemini/extensions/chrome-devtools-mcp/ts-expect-error'\n```\n\n### Analysis\n- **Hanging Backticks**: The presence of backticks and trailing periods in the target paths suggests a parsing error in how the CLI extracts module names from source files.\n- **Directive Misidentification**: The processor is attempting to 'import' comments/directives like `ts-ignore`.\n- **Missing Google Dir**: The CLI expects a `~/.gemini/google/` directory for internal skills/previews that is not present in standard installations.\n\n### Environment\n- **CLI Version**: 0.25.2\n- **OS**: Darwin (macOS 15.0.1)\n- **Node**: v22.11.0\n",
"number": 17506,
"title": "[ERROR] [ImportProcessor] Persistent Import Failures with Corrupted Path Strings",
"url": "https://github.com/google-gemini/gemini-cli/issues/17506",
"analysis": "The bug is located in the `ImportProcessor` class, which is responsible for scanning extension files to identify and resolve dependencies. The root cause is a flawed regular expression used to extract module names from source code or metadata. Specifically, the regex is too broad, causing it to: 1) Incorrectly capture TypeScript compiler directives (e.g., `ts-ignore`, `ts-nocheck`) as if they were physical module imports, and 2) Fail to exclude trailing punctuation (like periods or backticks) from the end of package strings (e.g., capturing `google/gemini-cli@preview.` instead of `google/gemini-cli@preview`). This leads to `ENOENT` errors when the CLI attempts to verify the existence of these non-existent paths on the filesystem.",
"effort_level": "medium",
"reasoning": "The issue involves adjusting the parsing logic within the ImportProcessor to correctly identify and resolve module dependencies. According to the criteria, adjusting parsing logic and regex-based validation falls under the Medium effort level. It requires logic tracing to ensure the regex correctly handles edge cases like TypeScript directives and trailing punctuation without breaking existing dependency resolution across the extension ecosystem.",
"validated": true
},
{
"body": "### What happened?\n\nI ran the following command to check file counts in headless mode:\n`gemini -p \"how many files in this folder\"`\n\nThe model immediately failed with `Tool \"run_shell_command\" not found in registry`.\n\nI found that while the shell tool is correctly excluded from the registry in headless mode, `prompts.ts` still hardcodes instructions to use it:\n* **Line 292:** Lists `'${SHELL_TOOL_NAME}'` in `primaryWorkflows_suffix`.\n* **Line 364:** Explicitly instructs: `- **Command Execution:** Use the '${SHELL_TOOL_NAME}' tool...`\n\nThe model is simply following the system prompt instructions, but crashes because the tool schema is missing.\n\n### What did you expect to happen?\n\nThe system prompt should not reference or instruct the use of tools that are not in the current registry.\n\n**Suggested Fix:**\nMake shell-related instructions in `prompts.ts` conditional on the tool's availability.\n\n```typescript\nconst shellInstructions = config.getToolRegistry().getTool(SHELL_TOOL_NAME) \n ? `- **Command Execution:** Use the '${SHELL_TOOL_NAME}' tool...` \n : '';\n```\n\n### Client information\n\n\u2502 About Gemini CLI \u2502\n\u2502 \u2502\n\u2502 CLI Version 0.22.5 \u2502\n\u2502 Git Commit 8daf2d34b \u2502\n\u2502 Model gemini-3-pro-preview \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS darwin \u2502\n\u2502 Auth Method OAuth\n\n### Login information\n\nOAuth\n\n### Anything else we need to know?\n\nNote while this did not reproduce every time, based on my quick analysis it seems like a real bug worth fixing.\n\nUpdate: I actually was able to reproduce it again, does not always happen but now 3x.",
"number": 17469,
"title": "System prompt explicitly instructs model to use excluded `SHELL_TOOL_NAME` in headless mode",
"url": "https://github.com/google-gemini/gemini-cli/issues/17469",
"analysis": "The root cause is a discrepancy between the static system prompt and the dynamic tool registry. In `packages/core/src/prompts/prompts.ts`, the system prompt hardcodes instructions for the shell tool (referenced via `SHELL_TOOL_NAME`) at lines 292 and 364. However, in headless mode, the shell tool is intentionally excluded from the tool registry. When the model follows the system prompt and attempts to call `run_shell_command`, the execution engine fails because the tool's schema is not present in the registry. The fix involves modifying the prompt generation logic to check the `ToolRegistry` for the existence of `SHELL_TOOL_NAME` before appending shell-specific instructions to the system prompt.",
"effort_level": "small",
"reasoning": "The fix is highly localized to the prompt generation logic in a single file. It involves adding a simple conditional check to verify tool availability in the registry before including specific instructions in the system prompt. This falls under 'Trivial Logic/Config' and 'String/Content Updates' within the Small effort criteria.",
"validated": true,
"recommended_implementation": "In `packages/core/src/prompts/prompts.ts`, wrap the shell-specific instructions in `primaryWorkflows_suffix` and the 'Command Execution' section with a conditional check that verifies if `SHELL_TOOL_NAME` exists in `config.getToolRegistry()`. This ensures the system prompt only instructs the model to use the shell tool when it is actually available in the registry."
},
{
"body": "### What happened?\n\n\n\n The CLI agent intermittently experiences prolonged \"loading\" times, lasting 9-15\n minutes or more, during tool execution. This often occurs when processing file modifications\n (e.g., replace tool on markdown files) or executing shell commands, frequently necessitating\n manual cancellation by the user. The agent appears unresponsive during these periods, without\n providing progress updates.\n\n### What did you expect to happen?\n\nTool executions should complete within a reasonable timeframe\n (e.g., under 1-2 minutes for typical operations). For longer tasks, the agent should provide\n clear progress updates rather than appearing to hang. All tool operations should execute\n efficiently without unexpected internal processing delays.\n\n\n### Client information\n\n\n* **CLI Version:** 0.25.2\n* **Git Commit:** 18e854c33\n* **Session ID:** c320e325-5d25-408c-af42-b22b72bf5aef\n* **Operating System:** win32 v24.11.0\n* **Sandbox Environment:** no sandbox\n* **Model Version:** gemini-2.5-flash\n* **Memory Usage:** 1.24 GB\n* **Terminal Name:** Unknown\n* **Terminal Background:** #0c0c0c\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n * Previous internal memory logs indicate similar issues related to \"massive stdout streams\" and\n \"phantom tool call paralysis,\" which were addressed with \"Strict Serial Execution\" and\n \"Output Redirection\" protocols.\n * The continued occurrence of these delays suggests that the existing protocols may not cover\n all scenarios or that new patterns of internal processing are leading to similar bottlenecks.\n * The delays manifest before any tool output is received, pointing to internal processing or\n API communication rather than slow external command execution.\n * Operating system is win32.\n\n[gemini-conversation-1769262615365.json](https://github.com/user-attachments/files/24837490/gemini-conversation-1769262615365.json)",
"number": 17442,
"title": "CLI Agent Intermittent Long Loading Times/Hangs During Tool Execution",
"url": "https://github.com/google-gemini/gemini-cli/issues/17442",
"analysis": "The intermittent hangs (9-15 minutes) during tool execution, particularly with the 'replace' tool and shell commands on Windows, point to a bottleneck in how the CLI handles large I/O streams or performs heavy string manipulations synchronously. The mention of 'massive stdout streams' and 'phantom tool call paralysis' in the bug report suggests that the `ShellExecutionService` (referenced in `shellBackgroundTools.ts`) or the tool invocation orchestrator is likely failing to drain buffers or is blocking the event loop while processing large outputs. On Windows, `child_process` pipes can deadlock if `stdout`/`stderr` are not consumed correctly. Additionally, the 'replace' tool likely performs large-scale string replacements in memory, which, combined with the reported 1.24 GB memory usage, suggests inefficient handling of large files (like markdown) that blocks the main thread, preventing progress updates from being sent to the UI (`UIStateContext.tsx`).",
"effort_level": "large",
"reasoning": "The issue involves intermittent hangs and potential deadlocks during tool execution specifically on Windows, which points to platform-specific complexities in child_process management and I/O stream handling. Additionally, the reported 1.24 GB memory usage and event loop blocking during large file operations (like the 'replace' tool) require deep performance optimization and architectural adjustments to ensure non-blocking execution and UI responsiveness, fitting the criteria for Large effort.",
"validated": true
},
{
"body": "### What happened?\n\ntittle\n\n(windows 11 user)\n\n### What did you expect to happen?\n\nuse CTRL + S before confirm changes in the cli\n\n### Client information\n\n \n About Gemini CLI \n \n CLI Version 0.27.0-nightly.20260121.97aac696f \n Model auto-gemini-3 \n Sandbox no sandbox \n OS win32 \n Auth Method Logged in with Google \n \n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 17437,
"title": "Before confirming changes, I used CTRL + S to see the differences in the file; it no longer works.",
"url": "https://github.com/google-gemini/gemini-cli/issues/17437",
"analysis": "The bug is likely located in the keyboard input handling logic within the CLI's UI components, specifically where tool call confirmations are processed. In the `gemini-cli`, when a model proposes a file change, the `ToolCallReview` component (or a similarly named component in `packages/cli/src/ui/components/`) is responsible for rendering the confirmation prompt and handling keyboard shortcuts like 'Enter' (confirm), 'n' (reject), and 'CTRL + S' (show diff). \n\nThe regression most likely stems from one of two causes:\n1. **Prop Drilling Failure**: The `onShowDiff` callback, which triggers the diff view, is not being passed correctly from the parent `HistoryItemDisplay.tsx` to the `ToolCallReview.tsx` component. If a recent refactor changed the props of `HistoryItemDisplay`, this connection might have been broken.\n2. **Key Detection Regression on Windows**: On Windows, `CTRL + S` often sends the ASCII character `\\u0013` (XOFF). If the `useInput` hook in `ToolCallReview.tsx` was recently changed to strictly check for `input === 's' && key.ctrl` without accounting for the raw ASCII code or if the terminal's raw mode handling changed, the shortcut will fail to trigger on Windows while potentially working on other platforms.\n3. **Focus/Active State Issue**: The `isActive` prop passed to `ToolCallReview` might be incorrectly calculated as `false` if there are hidden or background status items appended to the history list, causing the `useInput` hook to return early.",
"effort_level": "medium",
"reasoning": "The issue involves debugging keyboard input handling and state synchronization within the Ink-based UI. Specifically, it requires tracing the 'onShowDiff' callback through the component hierarchy and potentially handling platform-specific ASCII character codes (like CTRL+S mapping to XOFF/ASCII 19 on Windows). This falls under logic tracing and state management across components, fitting the Medium effort criteria.",
"validated": true
},
{
"body": "### What happened?\n\nAs part of https://github.com/google-gemini/gemini-cli/issues/14317 we've been changing hooks to not use the message bus. Unfortunately, the message bus is how we were using policy files to block execution of hooks. So we need to fix that.\n\n### What did you expect to happen?\n\nit should work.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n# paste output here\n```\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 17406,
"title": "Hook support in Policy files",
"url": "https://github.com/google-gemini/gemini-cli/issues/17406",
"analysis": "The bug is caused by the removal of the message bus as the communication layer for hooks. Previously, the policy engine (located in `src/policy/`) likely listened to hook-related events on the message bus to enforce restrictions or block execution. With hooks now being called directly or through a different mechanism, the policy enforcement logic is bypassed. To fix this, the hook execution logic must be updated to explicitly call the policy engine to check for permissions before a hook is executed. This involves defining how hooks map to policy rules and ensuring the policy engine can evaluate these new hook-specific requests.",
"effort_level": "medium",
"reasoning": "The task requires re-integrating the policy enforcement logic with the hook execution flow after the removal of the message bus. This involves logic tracing across at least two subsystems (Hooks and Policy), modifying the hook execution points to explicitly call the policy engine, and ensuring the policy engine can correctly evaluate hook-specific rules. This fits the criteria for Medium effort as it involves service integration and cross-component logic synchronization.",
"validated": true
},
{
"body": "### What happened?\n\nScroll through this to see what the UI does occasionally:\n==============================================\n\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 - Shell cd factory && node 6-utilities/generate-sitetype-from-input.js de-salon-type do\u2026 \u2502\n\u2502 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\n\u2139 Request cancelled.\n\n> het script was succesvol, maar je bent vergeten af te sluiten met een exit() command in het\n script , wat problemen geeft in deze omgeving / deze interface (jouw interface)\n\n\n \u2502 \u22b6 Shell cd factory && node 6-utilities/generate-sitetype-from-input.js d\u2026 (tab to focus)\n \u2502\n \u2502\n \u2502\n \u2502 \ud83d\udcdd Naam : de-salon-type\n\n\n\u2726 Ik ga het verbeterde script nu opnieuw uitvoeren voor \"De Salon\". Dit zal de bestanden\n overschrijven met de juiste boilerplate content uit de SPA submap en het proces netjes\n afsluiten.\n\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\n### What did you expect to happen?\n\nnormal TUI interface\n\n### Client information\n\n\n* **CLI Version:** 0.25.0\n* **Git Commit:** eb8834341\n* **Session ID:** dd89272c-ec55-4345-9929-40b8e362185a\n* **Operating System:** linux v24.13.0\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto-gemini-3\n* **Memory Usage:** 514.5 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** #000000\n* **Kitty Keyboard Protocol:** Unsupported\n\n\n### Login information\n\nGoogle Account\n\n### Anything else we need to know?\n\n_No response_",
"number": 17340,
"title": "Repeating TUI",
"url": "https://github.com/google-gemini/gemini-cli/issues/17340",
"analysis": "The bug manifests as a repeating TUI container border (box-drawing characters), which is a classic symptom of a layout overflow or a rendering loop in terminal-based UIs (likely using Ink). When a TUI component's height exceeds the terminal's available rows, or if the terminal height is miscalculated, the rendering engine may append new frames to the scrollback buffer instead of overwriting the current view. The presence of 'ScrollableList' and 'ScrollProvider' in the search context suggests these components are responsible for managing the viewport and vertical constraints. The issue likely resides in how 'ScrollableList' calculates its height or how 'ScrollProvider' handles terminal resize events and state updates, leading to redundant redraws that push the UI down the screen.",
"effort_level": "medium",
"reasoning": "The issue involves debugging Ink's rendering behavior and state synchronization within the ScrollProvider and ScrollableList components. Resolving TUI 'ghosting' or repeating frames typically requires careful management of terminal height constraints, layout calculations, and ensuring that the React state updates don't trigger overflows that exceed the terminal's row count. This falls under the Medium criteria for React/Ink state management and UI synchronization.",
"validated": true
},
{
"body": "<img width=\"3840\" height=\"2160\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/68daf7cb-10ef-43d1-ac35-a4da94b1366d\" />",
"number": 17193,
"title": "CLI Crash - Error: Cannot create a string longer than 0x1fffffe8 characters",
"url": "https://github.com/google-gemini/gemini-cli/issues/17193",
"analysis": "The error 'Cannot create a string longer than 0x1fffffe8 characters' is a standard Node.js/V8 error that occurs when a string exceeds the maximum allowed length (approximately 512MB on 64-bit systems). In the context of a CLI tool for Gemini, this typically happens during one of three operations: 1) `JSON.stringify()` on a massive object (like a long conversation history or a large tool response), 2) Reading a very large file into a string, or 3) Capturing massive stdout from a shell command. Based on the search context, the most likely culprits are `packages/core/src/core/logger.ts`, which handles session persistence and checkpoints via stringification, or `packages/core/src/tools/shell.ts`, which captures command output. If a tool returns a massive amount of data (e.g., a `cat` of a large binary or a recursive directory listing), the CLI attempts to store this in the message history, eventually hitting the V8 string limit when the logger tries to save the session or when the payload is prepared for the API.",
"effort_level": "medium",
"reasoning": "While the root cause is a standard V8 limit, the fix requires implementing safeguard mechanisms across multiple components, including tool output processing in shell.ts and session persistence in logger.ts. This involves logic tracing and state management to ensure data payloads are truncated or capped before stringification, which fits the Medium criteria for service integration and logic synchronization across components.",
"validated": true
},
{
"body": "### What happened?\n\n* Ask Gemini to explain the project\n* You start typing something else you want to send next. You want to cancel the ongoing work so you can send it.\n* Hit `escape` - it cancels the work _but_ also clears the input field!\n\n### What did you expect to happen?\n\nStop clearing the input field. Escape should never clear input. `ctrl+c` should\n\n### Client information\n\n\n* **CLI Version:** 0.26.0-nightly.20260115.6cb3ae4e0\n* **Git Commit:** e34f0b4a9\n* **Session ID:** c323b7d3-70f0-4261-9205-2218d648075b\n* **Operating System:** darwin v24.2.0\n* **Sandbox Environment:** no sandbox\n* **Model Version:** gemini-dev-swift\n* **Memory Usage:** 245.2 MB\n* **Terminal Name:** iTerm2 3.5.14\n* **Terminal Background:** #15191e\n* **Kitty Keyboard Protocol:** Supported\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 17083,
"title": "Please stop clearing input field on hitting `esc`",
"url": "https://github.com/google-gemini/gemini-cli/issues/17083",
"analysis": "The bug is caused by the `escape` key handler in the chat input component (likely `packages/cli/src/ui/components/ChatInput.tsx` or `packages/cli/src/ui/components/ChatPrompt.tsx`) performing two distinct actions: triggering a cancellation of the active Gemini request and resetting the input buffer state. In `ink`-based CLI applications, the `useInput` hook or a custom keypress listener (facilitated by `KeypressContext.tsx`) is used to capture keyboard events. The logic for the `escape` key currently includes a call like `setRawInput('')` or `setText('')`, which clears the user's typed content. To fix this, the state-clearing logic should be removed from the `escape` key handler and, as requested, ensured to be present in the `ctrl+c` handler if the user intends to clear the input manually.",
"effort_level": "small",
"reasoning": "The fix is highly localized to a single UI component (likely ChatPrompt.tsx) and involves removing a single line of code that resets the input state during the escape key event handler. This falls under trivial logic adjustments and does not require complex state synchronization or architectural changes.",
"validated": true,
"recommended_implementation": "In `packages/cli/src/ui/components/ChatPrompt.tsx`, locate the `useInput` handler for the `escape` key and remove the line that clears the input state (e.g., `setText('')` or `setRawInput('')`). Ensure the cancellation logic remains intact while the input clearing is moved or restricted to the `ctrl+c` handler."
},
{
"body": "### What happened?\n\nWhen enablePermanentToolApproval is set, there are more items in the list of radio buttons for a tool approval.\nThis isn't correctly considered in ToolGroupMessage resulting in other content not being truncated enough when not in alternate buffer mode resulting in flicker.\n\n### What did you expect to happen?\n\nExpect no flicker\n",
"number": 16564,
"title": "Flicker when enablePermanentToolApproval is set",
"url": "https://github.com/google-gemini/gemini-cli/issues/16564",
"analysis": "The bug is caused by a mismatch between the actual rendered height of the tool approval UI and the height calculated for overflow detection. When `enablePermanentToolApproval` is enabled, the tool approval section includes additional radio button options (e.g., 'Always allow'). The `ToolGroupMessage` component uses logic (likely shared with or defined in `toolLayoutUtils.ts`) to estimate how many lines it will occupy to determine how much previous content needs to be truncated to fit the terminal window. Because this calculation does not account for the extra lines added by the permanent approval options, the UI exceeds the terminal height, causing the terminal to scroll/flicker during redraws in non-alternate buffer mode.",
"effort_level": "medium",
"reasoning": "The fix requires modifying layout utility functions and ensuring the 'enablePermanentToolApproval' state is correctly propagated from the UI components to the calculation logic. While the root cause is identified, ensuring the calculated height perfectly matches the rendered height to prevent terminal scrolling/flicker in non-alternate buffer mode involves UI state synchronization and logic tracing across multiple files (ToolGroupMessage and toolLayoutUtils), which aligns with the Medium effort criteria.",
"validated": true
},
{
"body": "### What happened?\n\nThe Gemini CLI becomes unresponsive and \"stuck\" when the model generates multiple tool calls but the user does not respond immediately to the first permission prompt. It appears that while the CLI is waiting for user input on the first tool, subsequent tool requests from the model cause the UI to clear or overwrite the current prompt. This leaves the session in a deadlocked state where the first command disappears and the user cannot interact with any further tool requests.\n\n### What did you expect to happen?\n\nThe CLI should safely queue all tool calls. If a user is prompted for the first tool, subsequent tool calls should either wait for the first to complete or be appended to a list of pending authorizations without clearing the current UI state.\n\n### Client information\n\n\n* **CLI Version:** 0.23.0\n* **Git Commit:** 3ff055840\n* **Session ID:** 5775b945-227b-4dad-b356-721b277ddf7d\n* **Operating System:** linux v22.21.1\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto-gemini-3\n* **Memory Usage:** 286.6 MB\n* **Terminal Name:** Unknown\n* **Terminal Background:** #141414\n* **Kitty Keyboard Protocol:** Unsupported\n* **IDE Client:** IDE\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 16453,
"title": "Gemini CLI hangs during multi-tool execution if user response to first prompt is delayed.",
"url": "https://github.com/google-gemini/gemini-cli/issues/16453",
"analysis": "The bug is caused by a race condition or lack of synchronization in the tool execution loop and its interaction with the UI state. When the model returns multiple tool calls (e.g., in a single response), the CLI iterates through them. If these tool calls require user authorization, the UI state for the 'current prompt' is likely being updated for each tool call. If the tool execution loop does not strictly await the completion of the UI prompt for tool N before triggering the UI for tool N+1, or if the UI component only supports a single active prompt in its state, the subsequent tool calls will overwrite the state of the first one. This leads to a 'deadlock' because the code is still `await`-ing the user's response for the first tool call, but the UI for that prompt has been cleared or replaced, making it impossible for the user to interact with it.",
"effort_level": "medium",
"reasoning": "The issue involves synchronizing the asynchronous tool execution loop with the React/Ink UI state to prevent race conditions when multiple tools are called. This requires logic tracing and state management adjustments across the core execution logic and the UI components to ensure sequential processing of tool authorizations, which aligns with the Medium effort criteria for state management and async flow resolution.",
"validated": true
},
{
"body": "### What happened?\n\nPasted some output as well as the command used to execute it (which often includes a ! git marker in my zsh) and it suddenly drops into shell mode\n\n```\n echo \"bob ross\" main [9f766f4f] (!)\u2691 \u2717\nbob ross\n```\n\n### What did you expect to happen?\n\nI expect pasted text into a prompt to not trigger behaviors like entering shell mode\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 \u2502\n\u2502 About Gemini CLI \u2502\n\u2502 \u2502\n\u2502 CLI Version 0.25.0-nightly.20260107.59a18e710-git.db99bed \u2502\n\u2502 Git Commit db99bed \u2502\n\u2502 Model fiercefalcon \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS linux \u2502\n\u2502 Auth Method gemini-api-key \u2502\n\u2502 User Email pbreeden@google.com \u2502\n\u2502 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\n\n```\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n@bbiggs ",
"number": 16348,
"title": "\"!\" in a pasted text triggers shell mode",
"url": "https://github.com/google-gemini/gemini-cli/issues/16348",
"analysis": "The bug is caused by the CLI's input submission logic incorrectly interpreting the '!' prefix as a shell mode trigger even when the input is part of a pasted text block. In many interactive CLIs, '!' at the start of a line triggers a shell escape. The issue here is likely twofold: 1) The logic may be trimming whitespace before checking for the '!' prefix, causing lines like ' (!)\u2691' to trigger the mode. 2) When multi-line text is pasted, the CLI might be processing lines individually or failing to distinguish between a manually typed command and a pasted block.\n\nThe search context reveals that `packages/cli/src/ui/components/shared/text-buffer.ts` handles paste placeholders (e.g., `[Pasted Text: ... ]`) and has logic for `escapePastedPaths`. This indicates the CLI has a mechanism to detect and wrap pasted content. However, the submission handler (likely in `packages/cli/src/ui/AppContainer.tsx`) is likely performing the '!' check on the raw or trimmed string before considering if the content was part of a paste or if it contains multiple lines that should be treated as a single literal prompt for the AI.",
"effort_level": "medium",
"reasoning": "The fix requires modifying the input submission logic to distinguish between manually typed shell escape triggers and pasted content that happens to contain the trigger character. This involves logic tracing across the text buffer state and the submission handler to ensure paste placeholders are correctly identified before command parsing, which falls under the criteria for UI state synchronization and input buffer handling.",
"validated": true
},
{
"body": "### What happened?\n\nWhen using both **Antigravity IDE** and **Gemini CLI** on the same system, their global configuration files conflict because both tools are hardcoded to use the **exact same file path**: `~/.gemini/GEMINI.md`.\n### Observed Behavior:\n\n1. **Antigravity IDE** automatically creates/modifies `~/.gemini/GEMINI.md` when users click \"+ Global\" to add global rules\n2. **Gemini CLI** reads and potentially modifies the same `~/.gemini/GEMINI.md` file for global context\n3. **Configuration pollution occurs**: Instructions meant for one tool leak into the other, causing:\n - Unexpected AI behavior in both tools\n - User confusion about which tool modified the file\n - Need for manual workarounds (e.g., adding warning comments to separate configurations)\n\n### Evidence from My System:\n\nAfter using both tools, my `~/.gemini/GEMINI.md` file (2904 bytes) contains mixed content from both applications. I had to manually add this line to prevent confusion:\n\n```markdown\n- The 'antigravity' folder and its `mcp_config.json` are strictly for the\n Antigravity IDE environment, NOT the Gemini CLI. The CLI uses the `extensions/`\n directory and `settings.json`. Do not attempt to sync, mix, or treat\n Antigravity's MCPs (like Sequential Thinking or Linear) as 'missing' from the CLI.\n```\n\nThis workaround shouldn't be necessary if the tools used separate configuration files.\n\n### What did you expect to happen?\n\nEach tool should use **independent configuration paths** to avoid conflicts:\n\n### Proposed Solution:\n\n**Option 1: Antigravity uses a subdirectory (Recommended)**\n\n```\n~/.gemini/GEMINI.md \u2190 Gemini CLI only\n~/.gemini/antigravity/RULES.md \u2190 Antigravity only (new path)\n```\n\n**Option 2: Antigravity uses its own top-level directory**\n\n```\n~/.gemini/GEMINI.md \u2190 Gemini CLI\n~/.antigravity/GEMINI.md \u2190 Antigravity (matches ~/.antigravity/ convention)\n```\n\n### Benefits:\n\n- \u2705 No configuration pollution between tools\n- \u2705 Clear separation of concerns\n- \u2705 Consistent with existing subdirectory pattern (`~/.gemini/antigravity/mcp_config.json`)\n- \u2705 Backward compatible: existing `~/.gemini/GEMINI.md` stays for Gemini CLI\n\n### Client information\n\n\u2502 About Gemini CLI \u2502\n\u2502 \u2502\n\u2502 CLI Version 0.23.0 \u2502\n\u2502 Git Commit 3ff055840 \u2502\n\u2502 Model auto-gemini-3 \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS win32 \u2502\n\u2502 Auth Method OAuth \u2502\n\u2502 User Email aphelios713@gmail.com \n\n### Login information\n\n Google Account\n\n### Anything else we need to know?\n\n## Evidence of Hardcoded Paths\n\n### 1. Antigravity IDE Hardcodes `~/.gemini/GEMINI.md`\n\n**Official Documentation:**\n\n- **Source:** [[How to Add Rules to Google Antigravity](https://www.lanxk.com/posts/google-antigravity-rules/)](https://www.lanxk.com/posts/google-antigravity-rules/)\n\n > \"When you click \"+ Global\" in Antigravity IDE, it automatically creates a file called GEMINI.md in the .gemini/ folder under your user directory.\"\n\n- **Source:** [[Customize Google Antigravity with rules and workflows - Mete Atamel](https://atamel.dev/posts/2025/11-25_customize_antigravity_rules_workflows/)](https://atamel.dev/posts/2025/11-25_customize_antigravity_rules_workflows/)\n\n > \"Global rule: `~/.gemini/GEMINI.md`\"\n\n- **Source:** [[How to make Antigravity IDE use AGENTS.md Automatically](https://aiengineerguide.com/blog/make-antigravity-use-agents-md-automatically/)](https://aiengineerguide.com/blog/make-antigravity-use-agents-md-automatically/)\n\n > \"Antigravity IDE automatically loads `~/.gemini/GEMINI.md` and uses it for all the conversation\"\n\n**File System Evidence:**\nOn my Windows system, Antigravity stores its configuration under `~/.gemini/antigravity/`:\n\n```\nC:\\Users\\{username}\\.gemini\\\n\u251c\u2500\u2500 GEMINI.md \u2190 SHARED FILE (conflict point)\n\u251c\u2500\u2500 antigravity/\n\u2502 \u251c\u2500\u2500 mcp_config.json\n\u2502 \u251c\u2500\u2500 conversations/\n\u2502 \u251c\u2500\u2500 brain/\n\u2502 \u2514\u2500\u2500 global_workflows/\n```\n\n### 2. Gemini CLI Hardcodes `~/.gemini/GEMINI.md`\n\n**Official Documentation:**\n\n- **Source:** [[Provide context with GEMINI.md files - Gemini CLI Docs](https://geminicli.com/docs/cli/gemini-md/)](https://geminicli.com/docs/cli/gemini-md/)\n\n > \"Global Context: `~/.gemini/GEMINI.md` (for instructions that apply to all your projects)\"\n\n- **Source:** [[Gemini CLI Configuration](https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/configuration.md)](https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/configuration.md)\n\n > \"The CLI combines GEMINI.md files from multiple locations. More specific files override general ones. The loading order is: Global Context: ~/.gemini/GEMINI.md\"\n\n**File System Evidence:**\nGemini CLI uses the root `~/.gemini/` directory for its core configurations:\n\n```\nC:\\Users\\{username}\\.gemini\\\n\u251c\u2500\u2500 GEMINI.md \u2190 SHARED FILE (conflict point)\n\u251c\u2500\u2500 settings.json\n\u251c\u2500\u2500 oauth_creds.json\n\u251c\u2500\u2500 extensions/\n\u2514\u2500\u2500 tmp/\n```",
"number": 16058,
"title": "Antigravity Global Rules and Gemini CLI Global Context Both Write to `~/.gemini/GEMINI.md` Causing Configuration Conflicts",
"url": "https://github.com/google-gemini/gemini-cli/issues/16058",
"analysis": "The bug is caused by a hardcoded filename conflict between Antigravity IDE and Gemini CLI. Both tools use the same directory `~/.gemini/` (defined by the `GEMINI_DIR` constant in `@google/gemini-cli-core`) and the same filename `GEMINI.md` for global instructions/context. \n\nBased on the search context:\n1. `GEMINI_DIR` is a central constant exported from `packages/core` (referenced in `packages/test-utils/src/test-rig.ts`).\n2. The CLI's configuration logic (likely in `packages/core/src/config/`) and context loading logic (likely in `packages/core/src/context/`) use this constant to locate the global configuration directory.\n3. The CLI is designed to read `GEMINI.md` from this directory as part of its context assembly, which is where it collides with Antigravity's 'Global Rules' feature.\n\nThe fix requires changing the filename used by Gemini CLI for its global context to something unique (e.g., `CLI_CONTEXT.md`) to prevent it from reading or overwriting instructions intended for Antigravity IDE.",
"effort_level": "small",
"reasoning": "The fix is a highly localized string change. It involves updating a hardcoded filename constant (e.g., from 'GEMINI.md' to 'CLI_CONTEXT.md') and ensuring the context loader in the core package references the new name. This falls under 'Trivial Logic/Config' and 'Static Refactoring' within the small effort criteria.",
"validated": true,
"recommended_implementation": "In `packages/core/src/constants.ts`, change the constant defining the global context filename from `'GEMINI.md'` to `'CLI_CONTEXT.md'`. Update the context loading logic in `packages/core/src/context/` to reference this new constant when reading global instructions from the `GEMINI_DIR`."
},
{
"body": "### What happened?\n\nWhen the following is enabled via settings:\n\n```\n{\n \"experimental\": {\n \"extensionReloading\": true\n }\n}\n```\n\ndoing ` /extensions install https://github.com/dynatrace-oss/dynatrace-mcp` will result in the consent flow. if accepted, this will show:\n\n\u2139 Installing extension from \"https://github.com/dynatrace-oss/dynatrace-mcp\"...\n\nand then the following in the debug logs:\n\n```\n\u2502 Connection closed \u2502\n\u2502 at McpError.fromError (\u2502 code: -32000, \u2502\n\u2502 data: undefined \u2502\n\u2502 } \u2502\n\u2502 \u2139 Loading extension: dynatrace-mcp-server \u2502\n\u2502 \u2139 Start Extension Trace: Error \u2502\n\u2502 at McpClientManager.startExtension.js:606:52 \u2588\u2502\n\u2502 \u26a0 Skipping MCP server \"dynatrace\" as it failed recently (< 2s ago). \u2588\u2502\n\u2502 \u2716 13 frames rendered while the app was idle in the past second. This likely indicates severe infinite loop React state management bugs. \u2588\u2502\n\u2502 \u2716 5 frames rendered while the app was idle in the past second. This likely indicates severe infinite loop React state management bugs. \u2588\u2502\n```\n\n### What did you expect to happen?\n\nThe install would work cleanly\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n# paste output here\n```\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 15924,
"title": "React errors in experimental /extensions install 'extensionReloading' flow",
"url": "https://github.com/google-gemini/gemini-cli/issues/15924",
"analysis": "The bug occurs when the experimental `extensionReloading` feature is enabled. The logs indicate a failure in `McpClientManager.startExtension` (specifically around line 606 in the compiled output of `packages/core/src/tools/mcp-client-manager.ts`) with a 'Connection closed' `McpError`. This failure triggers a 'React error' in the CLI UI, which likely means the Ink-based React components are crashing due to an unhandled state transition or a missing error boundary when an extension fails to load during the reload flow. The core issue is twofold: 1) The `McpClientManager` encounters a JSON-RPC connection error (-32000) when starting the newly installed extension, and 2) the React UI (likely in `packages/cli/src/ui/components/views/ExtensionDetails.tsx` or a related list view) does not gracefully handle the 'failed' state of an extension during an active reload, leading to a component crash.",
"effort_level": "medium",
"reasoning": "The issue involves state synchronization between the core McpClientManager and the Ink-based React UI. It requires tracing an asynchronous error (Connection closed) from the core logic to the UI layer and implementing proper error handling or state boundaries in React to prevent a component crash. This aligns with the criteria for Medium effort involving React/Ink state management and asynchronous flow resolution.",
"validated": true
},
{
"body": "### What happened?\n\nThe characters used as cursors in this application (\u25cf\u25b2\u25a0\u2190\u2191\u2192\u2193) have the Unicode East_Asian_Width property set to *Ambiguous*. \nThese characters can have different display widths depending on context, and historically they have been treated as fullwidth in East Asia.\n\nIn practice, many Japanese fonts render these characters as fullwidth, and their width will vary depending on the OS locale. \nWhen such characters are used in a TUI, they can not only cause visual glitches but also break the screen to the point that it becomes unusable.\n\nFor the reasons above, please avoid using Ambiguous Width characters. I would like to propose the following alternatives. \nAll of the characters below have EAW = N and are treated as halfwidth in almost all environments:\n\n- [\u2219] U+2219 BULLET OPERATOR \n- [\u2b24] U+2B24 BLACK LARGE CIRCLE\n- [\u25b4] U+25B4 BLACK UP-POINTING SMALL TRIANGLE \n- [\u25aa] U+25FE BLACK MEDIUM SMALL SQUARE\n- [\uffe9] U+FFE9 HALFWIDTH LEFTWARDS ARROW\n- [\uffea] U+FFEA HALFWIDTH UPWARDS ARROW\n- [\uffeb] U+FFEB HALFWIDTH RIGHTWARDS ARROW\n- [\uffec] U+FFEC HALFWIDTH DOWNWARDS ARROW\n\n### What did you expect to happen?\n\nI want to ensure that the TUI screen does not break in any locale.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n# paste output here\n```\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 15585,
"title": "Avoid Ambiguous Width Characters",
"url": "https://github.com/google-gemini/gemini-cli/issues/15585",
"analysis": "The bug is caused by the use of Unicode characters with the `East_Asian_Width=Ambiguous` property (specifically \u25cf, \u25b2, \u25a0, \u2190, \u2191, \u2192, \u2193) in the TUI. These characters are rendered with inconsistent widths (1 vs 2 cells) depending on the terminal's locale and font settings, leading to cursor misalignment and UI corruption in East Asian environments. These characters are likely used as prompt symbols, selection indicators, or cursor markers within the CLI's UI components. Based on the codebase structure, the most likely locations for these character definitions are the input handling and text rendering components in the CLI package.",
"effort_level": "small",
"reasoning": "The issue is a straightforward string replacement task. It involves identifying and replacing specific ambiguous-width Unicode characters (used as UI markers or icons) with halfwidth alternatives. This falls under 'String/Content Updates' and 'UI/Aesthetic Adjustments' and is highly localized to the UI component definitions or a central theme/constants file, requiring no changes to complex logic or state management.",
"validated": true,
"recommended_implementation": "In the UI component or constants files, replace the ambiguous-width characters \u25cf, \u25b2, \u25a0, \u2190, \u2191, \u2192, and \u2193 with their halfwidth equivalents: \u2219 (U+2219), \u25b4 (U+25B4), \u25aa (U+25FE), \uffe9 (U+FFE9), \uffea (U+FFEA), \uffeb (U+FFEB), and \uffec (U+FFEC)."
},
{
"body": "### What happened?\n\nI'm using **gemini-3.0** as my main model. \nHowever, when auto-completion is enabled, I repeatedly get this warning:\n\n> **\"Usage limit reached for gemini-2.5-flash-lite\"**\n\nEven though:\n- I am **not** using `gemini-2.5-flash-lite` anywhere in my code.\n- My `gemini-3.0` quota is still available.\n- The warning keeps looping even when I\u2019m not making any manual requests.\n\n### My Guess (Possible Cause)\nIt seems that the **auto-completion feature internally uses `gemini-2.5-flash-lite`** to generate inline suggestions.\n\nWhen the quota for `gemini-2.5-flash-lite` is exhausted:\n- auto-completion keeps trying to request that model,\n- each request fails,\n- the app continues retrying automatically,\n- resulting in an endless loop of warnings.\n\n### What did you expect to happen?\n\n- Auto-completion should **stop making requests** once the quota for its internal model is exceeded.\n- Allow us to **configure which model auto-completion uses**.\n- OR automatically **disable auto-completion** when its model quota is exceeded.\n\n### Client information\n\nAbout Gemini CLI \n \n CLI Version 0.19.1 \n Git Commit 6169ef04b \n Model auto \n Sandbox no sandbox \n OS linux \n Auth Method OAuth \n User Email ahza000007@gmail.com \n GCP Project key-prism-479308-n7 \n\n### Login information\n\nGoogle account\n\n### Anything else we need to know?\n\n1. Use `gemini-3.0` as the main model.\n2. Enable auto-completion.\n3. Exhaust quota for `gemini-2.5-flash-lite`.\n4. Observe continuous warnings even though you are not using that model directly.",
"number": 14940,
"title": "Auto-completion keeps requesting gemini-2.5-flash-lite even when using gemini-3.0, causing infinite \"usage limit reached\" warnings",
"url": "https://github.com/google-gemini/gemini-cli/issues/14940",
"analysis": "The bug stems from the auto-completion feature being hardcoded to use 'gemini-2.5-flash-lite' independently of the user's primary model selection (gemini-3.0). When this specific model hits its quota, the CLI's error handling logic (likely in `packages/core/src/utils/errorParsing.ts`) catches the 429/Quota error and displays a warning. However, the auto-completion trigger (likely a debounced effect in a UI hook or a background service) does not receive a signal to stop or 'cool down'. This results in an infinite loop where every keystroke or timer tick triggers a new request, which fails, shows a warning, and repeats. The lack of a configuration option for the auto-completion model in the settings (e.g., `packages/cli/src/ui/components/AgentConfigDialog.tsx`) prevents users from working around this by switching to a model with available quota.",
"effort_level": "medium",
"reasoning": "The issue requires logic tracing and state management within the auto-completion service and React/Ink components. It involves implementing a circuit-breaker to stop requests upon detecting a 429 error and extending the configuration UI to allow model selection. This aligns with the Medium criteria for state synchronization and service integration across a few components.",
"validated": true
},
{
"body": "### What happened?\n\nI ran the `/settings` command to view the configuration options. In the **General** section of the UI, the option labeled `Session Retention` (mapped to `general.sessionRetention` in the docs) is not displayed.\n\nWhile the sub-setting \"Enable Session Cleanup\" (`general.sessionRetention.enabled`) is visible in the UI, the parent setting \"Session Retention\" listed in the \"Settings reference\" documentation is entirely missing from the list.\n\n### What did you expect to happen?\n\nI expected the `/settings` UI to include the \"Session Retention\" row as described in the documentation. Alternatively, if `general.sessionRetention` is not intended to be a configurable UI element itself, the documentation should be updated to remove it from the reference table to avoid confusion.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\nCLI Version 0.19.4\nGit Commit 93511487\nModel auto\nSandbox no sandbox\nOS darwin\nAuth Method gemini-api-key\n```\n\n</details>\n\n### Login information\n\nAPI key\n\n### Anything else we need to know?\n\n* **Current UI shows:** `Enable Session Cleanup` only.\n* **Documentation lists:** Both `Session Retention` and `Enable Session Cleanup`.",
"number": 14623,
"title": "[Doc/UI Mismatch] \"Session Retention\" setting is missing from `/settings` UI but present in documentation",
"url": "https://github.com/google-gemini/gemini-cli/issues/14623",
"analysis": "The bug is a discrepancy between the settings UI and the documentation. The UI renders the leaf setting `general.sessionRetention.enabled` (labeled 'Enable Session Cleanup') but omits the parent object `general.sessionRetention` ('Session Retention'). This typically happens when the settings UI renderer is programmed to only display interactive leaf nodes (primitives) and lacks logic to display parent nodes as headers or grouping labels, whereas the documentation generation tool (or manual documentation) includes the full hierarchy. The fix involves either updating the UI component to render group headers for object-type settings or adjusting the documentation to match the UI's flattened representation.",
"effort_level": "small",
"reasoning": "The issue is a localized UI/documentation mismatch. Resolving it involves either adding a header to the settings UI renderer or updating the documentation strings to match the flattened UI representation. This falls under UI/Aesthetic adjustments and String/Content updates, which are categorized as Small effort.",
"validated": true,
"recommended_implementation": "In the settings UI rendering logic, add a header or label for the 'Session Retention' group to match the documentation's hierarchy. Alternatively, update the documentation to remove the parent entry if the UI is intended to only display interactive leaf nodes."
},
{
"body": "### What happened?\n\n<img width=\"805\" height=\"428\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/7e9eb64a-0f58-43c8-bf83-35ab495c07ab\" />\n\nThe terminal executed on the local drive. Not on remote drive.\n\n### What did you expect to happen?\n\nIt suppose to run successfully and install gemini workflows in .github folder.\n\n### Client information\n\n\n* **CLI Version:** 0.19.3\n* **Git Commit:** ee6b01f9c\n* **Session ID:** a2b087b9-e563-4d56-8658-cdbeded796b6\n* **Operating System:** win32 v22.19.0\n* **Sandbox Environment:** no sandbox\n* **Model Version:** auto\n* **Memory Usage:** 208.6 MB\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 14577,
"title": "The command setup-github failed to execute with command rejection.",
"url": "https://github.com/google-gemini/gemini-cli/issues/14577",
"analysis": "The bug occurs when running the `setup-github` command on Windows from a drive other than the system drive (e.g., a mapped network drive or a secondary partition). The user reports that the command 'executed on the local drive' instead of the 'remote drive' where the project is located. This is a classic Windows `cmd.exe` issue: the `cd` command does not change the current drive unless the `/d` flag is used (e.g., `cd /d D:\\project`). If the CLI tool attempts to execute shell commands by chaining them (e.g., `cd <path> && git ...`), and the path is on a different drive, the `cd` fails to switch drives, and the subsequent commands run in the wrong directory (usually the user's home directory on `C:`). This leads to the command failing to find the `.github` directory or the git root, resulting in a 'command rejection' or execution error.",
"effort_level": "medium",
"reasoning": "The issue is a standard filesystem and path resolution bug specific to Windows drive-switching behavior. While it involves platform-specific logic, the fix is localized to how shell commands are constructed or how the 'cwd' option is passed to child process execution. It fits the criteria for Medium effort as it involves logic tracing across service integrations (like gitService) and requires careful validation in a specific environment, but it does not reach the complexity of deep PTY or architectural changes required for a Large rating.",
"validated": true
},
{
"body": "The JetBrains terminal exhibits an issue where it automatically scrolls to the top. We need to investigate and implement a workaround to stabilize the scroll position.",
"number": 13614,
"title": "Fix: JetBrains terminal auto-scroll behavior",
"url": "https://github.com/google-gemini/gemini-cli/issues/13614",
"analysis": "The issue stems from the JetBrains terminal emulator's interaction with terminal control sequences (ANSI escape codes) used for UI rendering, such as screen clearing or cursor repositioning, which triggers an auto-scroll to the top. The codebase already possesses the infrastructure to detect JetBrains environments via `isJetBrains()` and `verifyJetBrains()` in `packages/core/src/ide/detect-ide.ts`. The fix involves identifying the specific rendering logic (likely using a library like 'ink' or raw ANSI writes) and applying a conditional workaround when `isJetBrains()` returns true, such as using `\\n` repetitions instead of clear-screen codes or disabling the alternate screen buffer.",
"effort_level": "medium",
"reasoning": "While the detection logic for JetBrains is already present, the fix requires tracing specific ANSI escape sequences or Ink rendering behaviors that trigger the auto-scroll. Implementing a workaround involves logic tracing and state synchronization within the UI layer to ensure the terminal remains stable, which aligns with the Medium criteria for logic tracing and integration across components.",
"validated": true
},
{
"body": "### What happened?\n\nI tried multiple ways to get Gemini CLI to analyse an image all resulting in the following error message: \n\"Sending this message (1065402 tokens) might exceed the remaining context window limit (1042738 tokens)\"\n\nThings I've tried:\n- Drag and dropped image file into the cli -> Resulted in above error message\n- Attached the image using @ -> Resulted in above error message\n- Asked gemini to navigate to a directory and analyse an image called screenshot-> Resulted in above error mesage\n- Copying and pasting the image into terminal did nothing at all. The terminal did not register image from the clipbnoard.\n\n\n### What did you expect to happen?\n\nI expect the model to analyse the image but it seems to treat images as any other file by either reading the binaries directly or as base64.\nI also expect being able to paste images from the clipboard.\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n# paste output here\nAbout Gemini CLI:\n CLI Version : 0.17.0\n Git Commit : 7c684e36f\n Model : auto\n Sandbox : no sandbox\n OS : darwin\n Auth Method : OAuth\n```\n\n</details>\n\n### Login information\n\nUsing google account\n\n### Anything else we need to know?\nTested on v0.16 and v0.17. Tried with both gemini 3 and auto. Tested on both iTerm and built in mac os terminal. None worked.\nImage size is rougly 3.2mb \n\n<img width=\"2072\" height=\"1496\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/2ce5fa1d-6c19-45cc-8847-4ac34c43e2a4\" />",
"number": 13545,
"title": "Cannot get Gemini CLI to read images",
"url": "https://github.com/google-gemini/gemini-cli/issues/13545",
"analysis": "The bug is caused by the CLI treating all attached files (via drag-and-drop or the '@' symbol) as text/binary data instead of identifying them as images and using the multimodal capabilities of the Gemini API. When a 3.2MB image is read as a string/binary and tokenized as text, it results in over 1 million tokens, exceeding the context window. The error message is explicitly triggered in `packages/cli/src/ui/hooks/useGeminiStream.ts` during the pre-flight token count check. The logic responsible for preparing the message parts (likely within the same hook or a utility it calls) fails to detect the MIME type of the file and wrap it in an `inline_data` or `file_data` part with the correct `mime_type`. Additionally, the terminal UI does not appear to have a handler for clipboard image data, which is why pasting does nothing.",
"effort_level": "medium",
"reasoning": "The issue requires logic tracing and integration across several components, specifically the file attachment handling in atCommandProcessor.ts and the token estimation/streaming logic in useGeminiStream.ts. Implementing MIME-type detection and transitioning from text-only parts to multimodal parts (inline_data) involves modifying service integration and prompt construction logic. While clipboard support in terminals is complex, the core fix for image processing and tokenization fits the criteria for a medium-effort task requiring robust validation across the UI and API layers.",
"validated": true
},
{
"body": "### What happened?\n\n 1. Summary\n\n When using the run_shell_command tool in the Gemini CLI on Windows, any Japanese characters present in the standard output (stdout) of the\n executed command are displayed as garbled text (\"mojibake\").\n\n 2. Description\n\n This issue appears to be specific to how the run_shell_command tool captures output from the spawned PowerShell process. The same commands,\n when run directly in a local PowerShell or Command Prompt terminal on the same machine, display Japanese characters correctly.\n\n We tested a potential fix by prepending $OutputEncoding = [System.Text.Encoding]::UTF8; to the command, but this did not resolve the issue\n within the Gemini CLI. This suggests the problem lies not in the shell's configuration itself, but in the pipeline that captures the stdout\n stream and sends it back to the Gemini environment. The capturing mechanism seems to be misinterpreting the UTF-8 encoded output.\n\n 3. Steps to Reproduce\n\n 1. On a Windows machine, create a simple Python script named test_jp.py with the following content:\n 1 print(\"\u3053\u3093\u306b\u3061\u306f\u4e16\u754c\uff01\u3053\u308c\u306f\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u306e\u30c6\u30b9\u30c8\u3067\u3059\u3002\")\n 2. In the Gemini CLI, execute the script using the run_shell_command tool:\n\n### What did you expect to happen?\n\n\n 1 3. Observe the `output` field in the tool's response.\n 2 \n 3 **4. Expected Behavior**\n 4 \n 5 The `output` field should display the correct Japanese string:\n \u3053\u3093\u306b\u3061\u306f\u4e16\u754c\uff01\u3053\u308c\u306f\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u306e\u30c6\u30b9\u30c8\u3067\u3059\u3002\n 1 \n 2 **5. Actual Behavior**\n 3 \n 4 The `output` field displays a garbled string, for example:\n \u7e3a\u8599\uff53\u7e3a\uff6b\u7e3a\uff61\u7e3a\uff6f\u8373\u4e5f\u961c\u221a\u00b1\u7e67\u5f8c\u0341\u7e67\uff68\u7e5d\uff73\u7e67\uff73\u7e5d\uff7c\u7e5d\u3045\u7e5d\uff73\u7e67\uff70\u7e3a\uff6e\u7e5d\u305b\u7e5d\u533b\u3012\u7e3a\u5436\n\n 1\n 2 **6. System Information**\n 3\n 4 * **OS:** Windows (win32)\n 5 * **Tool's Shell:** `powershell.exe`\n\n### Client information\n\n\n* **CLI Version:** 0.11.0\n* **Git Commit:** c9c2e79d\n* **Session ID:** ff9a213b-9682-4d74-b392-344c2d0a17bb\n* **Operating System:** win32 v22.17.1\n* **Sandbox Environment:** no sandbox\n* **Model Version:** gemini-2.5-pro\n* **Memory Usage:** 255.7 MB\n\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\n_No response_",
"number": 12468,
"title": "Bug Report: run_shell_command output is garbled for Japanese characters on Windows",
"url": "https://github.com/google-gemini/gemini-cli/issues/12468",
"analysis": "The bug is caused by an encoding mismatch when capturing the standard output (stdout) of a spawned process on Windows. In the implementation of the `run_shell_command` tool (likely located in `packages/core/src/tools/shell.ts` or a similar tool definition file), the CLI spawns a shell process (PowerShell or CMD) to execute commands. On Windows, these shells default to the system's legacy code page (e.g., CP932 for Japanese) when stdout is redirected to a pipe, whereas Node.js defaults to interpreting stream buffers as UTF-8. This results in 'mojibake' (garbled text). Furthermore, if the CLI converts the stream chunks to strings using `chunk.toString()` without a `StringDecoder`, multi-byte Japanese characters (which are 3 bytes in UTF-8) can be corrupted if they are split across buffer chunks. The user's attempt to use `$OutputEncoding` failed because that variable in PowerShell primarily controls the encoding of data sent *to* external commands, not the encoding of PowerShell's own stdout stream. To fix this, the shell must be forced to output UTF-8 (e.g., using `[Console]::OutputEncoding = [System.Text.Encoding]::UTF8` in PowerShell) and the Node.js side must correctly decode the buffer, preferably after the stream ends or by using a `StringDecoder`.",
"effort_level": "medium",
"reasoning": "The issue involves platform-specific stream handling and character encoding between Node.js and Windows shells. Fixing it requires modifying the shell execution logic to force UTF-8 output and implementing robust decoding (e.g., using StringDecoder) to handle multi-byte characters split across buffer chunks. This aligns with the Medium criteria as it involves logic tracing across service integrations and requires careful validation of asynchronous stream processing.",
"validated": true
},
{
"body": "### What happened?\n\nIn [sandbox.ts](https://github.com/google-gemini/gemini-cli/blob/c7817aee305712c74a139ecb08333fec81a633b9/packages/cli/src/utils/sandbox.ts#L568-L578), container names are generated using an incremental sequential number.\n\nThis approach introduces a race condition when multiple instances of the Gemini CLI run in parallel, leading to container name collisions.\n\n### What did you expect to happen?\n\nContainer names should be generated in a way that avoids conflicts between concurrent CLI runs.\n\nI noticed that the integration tests already generate container names with a random ID. Why the same method isn\u2019t used in regular runs?\n\n\n### Client information\n\n<details>\n<summary>Client Information</summary>\n\nRun `gemini` to enter the interactive CLI, then run the `/about` command.\n\n```console\n> /about\n# paste output here\n```\n\n</details>\n\n### Login information\n\n_No response_\n\n### Anything else we need to know?\n\nIf this change makes sense, would it be suitable for me to submit a PR to update the regular container naming to use random IDs as well?\n",
"number": 12083,
"title": "Container name collisions due to sequential numbering in container name generation",
"url": "https://github.com/google-gemini/gemini-cli/issues/12083",
"analysis": "The bug is caused by a deterministic, sequential naming strategy for Docker containers within the CLI's sandbox utility. Specifically, `packages/cli/src/utils/sandbox.ts` (lines 568-578) generates container names using an incremental counter. When multiple CLI instances are launched simultaneously, they each initialize their own counter, leading to name collisions (e.g., both instances trying to create a container named `gemini-sandbox-1`). This logic is also explicitly duplicated in `packages/cli/src/gemini.tsx` (lines 480-481) to decouple the sandbox from CLI arguments, meaning both locations require updates to ensure consistency and prevent collisions.",
"effort_level": "small",
"reasoning": "The fix is highly localized to two files (sandbox.ts and gemini.tsx) and involves replacing a deterministic sequential counter with a random identifier. This is a trivial logic change with a clear root cause and existing patterns in the codebase to follow. While the issue results in a race condition, the resolution is a simple string generation update rather than a complex architectural or concurrency fix, fitting the 'Small' criteria for localized fixes and trivial logic.",
"validated": true,
"recommended_implementation": "In `packages/cli/src/utils/sandbox.ts` and `packages/cli/src/gemini.tsx`, replace the sequential `containerCounter` logic with a random suffix generated via `randomBytes(4).toString('hex')` to ensure unique container names across parallel CLI instances."
},
{
"body": "### What happened?\n\nI have a weird situation. Last week on Friday (1st Aug), I was able to use gemini cli with no problem. I still have an open session to that in a terminal window. When opening a new window and trying to send a request, I get \u2715 [API Error: Permission 'aiplatform.endpoints.predict' denied on resource '//aiplatform.googleapis.com/projects/laod001-gemini-ai/locations/global/publishers/google/models/gemini-2.5-pro' (or it may not exist).\n (Status: PERMISSION_DENIED)]\n\nThat might be right. I do not have that permission. But I do have a Code Assist license assigned to my user and I am able to chat with gemini using the vscode plugin. I just reauthenticated inside of the google code assist plugin and there it is asking for an oauth token. After successful authentication, the extension works and I am able to chat with gemini\n\n### What did you expect to happen?\n\nTo be able to interact with gemini. \n\n### Client information\n\n<details>\n\n```console\n$ gemini /about\nbroken config:\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 \u2502\n\u2502 About Gemini CLI \u2502\n\u2502 \u2502\n\u2502 CLI Version 0.1.17 \u2502\n\u2502 Git Commit 99ba2f64 (local modifications) \u2502\n\u2502 Model gemini-2.5-pro \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS darwin \u2502\n\u2502 Auth Method vertex-ai \u2502\n\u2502 GCP Project laod001-gemini-ai \u2502\n\u2502 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\nworking config:\n\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 \u2502\n\u2502 About Gemini CLI \u2502\n\u2502 \u2502\n\u2502 CLI Version 0.1.15 \u2502\n\u2502 Git Commit c45c14ee (local modifications) \u2502\n\u2502 Model gemini-2.5-flash \u2502\n\u2502 Sandbox no sandbox \u2502\n\u2502 OS darwin \u2502\n\u2502 Auth Method OAuth \u2502\n\u2502 GCP Project laod001-gemini-ai \u2502\n\u2502 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n```\n\n</details>\n\n\n### Login information\n\nVertex AI\n\n### Anything else we need to know?\n\nHere is what I tried:\n* delete .gemini folder\n* change the location from us-central1 to us-west1 or global\n* try logging in with \"Login with Google\"\n* * This fails with \"Failed to login. Message: Precondition check failed\"\n* reauthenticating with gcloud auth login\n* reauthenticating with gcloud auth application-default login\n* changing the project in gcloud auth application-default to another project, where I have the permission (there it also works again, but this is not the right project to use. switching back gives the issue again) \n* Using gemini-cli in a cloudshell - there it also works fine",
"number": 5589,
"title": "Vertex-AI Authentication does not prompt for an oauth screen",
"url": "https://github.com/google-gemini/gemini-cli/issues/5589",
"analysis": "The bug is rooted in two areas: configuration handling and error classification. First, the 'broken config' message in the user's output suggests that the CLI is failing to load the user's saved credentials or settings, causing it to fall back to Application Default Credentials (ADC) or an unauthenticated state. Second, when the Vertex AI API returns a `PERMISSION_DENIED` (HTTP 403) error, the CLI does not recognize this as a trigger to initiate an OAuth authentication flow. In the context of Google Cloud/Vertex AI, a 403 error can occur if the token is valid but lacks the specific IAM permissions for the resource, which is often resolved for 'Code Assist' users by re-authenticating with the correct scopes or using a 'shared' request type. The CLI's `isAuthenticationError` utility likely only checks for 401 (Unauthorized), missing the 403 case that should prompt the user to log in.",
"effort_level": "medium",
"reasoning": "The fix requires logic tracing and integration across multiple components. It involves updating error classification in the core package to treat 403 PERMISSION_DENIED as an authentication trigger for Vertex AI, while also debugging the configuration loading logic in the CLI package to resolve the 'broken config' state. This spans error handling, configuration management, and the OAuth flow synchronization.",
"validated": true
}
]