Issue ID Title Status Assignee Labels Last Sync Link analysis effort_level reasoning recommended_implementation 25757 Gemini CLI Slow Boot Times (up to 9.77s) OPEN area/core, πŸ”’ maintainer only 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/25757 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. medium 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. 25744 GeminiCLI.com Feedback: [ISSUE] Account Suspended (Error 403) - Unintentional Third-Party Extension Use - Directed here by Google Support OPEN status/need-triage, area/extensions, area/documentation, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/25744 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. small 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. 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. 25656 Markdown rendering issue with LaTeX-style syntax ($, \, etc.) OPEN area/core, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/25656 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. medium 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. 25615 run_shell_command triggers infinite UI loop output on Windows, consuming 99% of session tokens. OPEN area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/25615 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. medium 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. 25610 Bug Report: Gemini CLI - Theme Validation Error for `text.response` key OPEN area/core, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/25610 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()`). small 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. 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. 25599 "gemini mcp list reports Google first-party MCP servers as ""Disconnected"" due to unsupported ping() method" OPEN area/core, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/25599 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. small 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. 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`. 25597 Gemini CLI reads setting from VS Code GCA plugin OPEN area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/25597 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. small 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. 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')`. 25590 Bug: relaunchAppInChildProcess does not forward signals to child, orphaning it when parent is killed OPEN area/core, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/25590 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. small Localized fix in `packages/cli/src/utils/relaunch.ts` involving standard Node.js process event listeners. 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)));`. 25583 [BUG] PTY Master Device Exhaustion (ENXIO) on macOS after prolonged usage in YOLO mode OPEN area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/25583 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. large 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. 25566 bug report requested by app. OPEN area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/25566 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. medium 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. 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()`. 25561 Pasting broken in version 0.36.0+ OPEN area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/25561 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. medium 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. 25548 Exit options don't terminate the session and close de cli OPEN area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/25548 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. large 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. 25532 Copy Mode does't seem to let me copy the prompt - only any output OPEN area/core, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/25532 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. medium 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. 25527 VS Code + WSL: Gemini writes files to the wrong project/workspace OPEN area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/25527 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. medium 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. 25495 [Voice] Fix Gemini Live Latency & Cutoff OPEN area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/25495 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. large 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. 25483 Error renderNodeToOutput makes CLI unusable after a single Edit file approval OPEN area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/25483 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. medium 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. 25459 Shell tool text output causes UI jank on high-volume commands OPEN area/core, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/25459 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. medium 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. 25441 [Regression][Accessibility] /stats command output is gutted in v0.38.0 – Information missing, not just formatted OPEN area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/25441 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. small 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. 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. 25429 Bug Report: Global Configuration Serialisation Failure OPEN area/core, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/25429 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. medium 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. 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. 25390 Screen is blinking during active usage in terminal OPEN area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/25390 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. medium 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 components and throttling, which falls under the Medium category for logic tracing and state management across multiple components. 1. In 'packages/cli/src/interactiveCli.tsx', wrap the historical messages in an Ink 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. 25377 Quarantined version of ripgrep (rg) on macOS OPEN area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/25377 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. small 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. 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. 25369 Thai SARA AM (U+0E33) width mismatch causing erratic line jumping and output duplication (spamming) in tmux OPEN area/core, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/25369 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. medium 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. 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. 25350 """unhandeled promise rejection!"" - cli crash" OPEN area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/25350 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. medium 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. 25345 ACP stdout is polluted by SessionEnd hook debug logs during shutdown OPEN area/non-interactive, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/25345 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. small 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. 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. 25253 Frequent ERR_STREAM_PREMATURE_CLOSE during response streaming and tool execution OPEN area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/25253 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. medium 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. 25228 mcp bug (mobile-mcp) OPEN area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/25228 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. medium 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. 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. 25164 [Windows] run_shell_command always returns empty output β€” isBinary() false-positive on node-pty PTY stream OPEN area/core, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/25164 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. medium 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. 25162 Fingerprint approval for commands require SUDO is not waiting in command block OPEN area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/25162 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'. large 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. 25034 Gemini CLI fails with locally-compiled Git OPEN priority/p2, area/core, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/25034 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. medium 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. 24830 Intermittent 'Enter' key non-responsiveness and UI hang during option approval OPEN area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/24830 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. medium 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. 24810 Stable installation was automatically updated to a nightly build OPEN priority/p2, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/24810 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. small 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. 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. 24790 Warning about alternate buffer mode incorrectly fires when the user is just in terminalBuffer mode. OPEN area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/24790 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. small 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. 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'. 24768 Rendering glitch with nested scrollbars and wrapped lines OPEN area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/24768 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. medium 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. 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. 24691 --list-sessions is very slow and makes numerous network calls OPEN priority/p3, area/core, type/feature 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/24691 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. small 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. 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. 24689 Trust New Folder Infinite Loop OPEN priority/p1, area/core, type/feature 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/24689 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. medium 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. 24678 `Modify with external editor` with Zed hangs until entire Zed process is killed (closing the diff tab is not enough) OPEN priority/p2, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/24678 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. medium 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. 24675 Tables in screenReader mode break OPEN priority/p2, area/core, help wanted, type/feature 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/24675 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. small 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. 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. 24666 Regression in selection mode behavior OPEN area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/24666 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. medium 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. 24639 Resuming a session keeps plans/tracker/tasks bound to the startup session ID OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/24639 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. medium 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. 24636 Settings box overflow OPEN devr0306 area/core 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/24636 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. small 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. "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." 24625 CLI Hard Crash OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/24625 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. medium 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. 24591 [bug] SEA - Unknown arguments: max-old-space-size, maxOldSpaceSize OPEN area/core, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/24591 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. small 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. 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. 24564 GeminiCLI.com Feedback: Tools not showing on sidebar OPEN status/need-triage, area/extensions, area/documentation, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/24564 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. small 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. 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. 24534 gemini extensions new fails with ENOENT due to missing examples directory in NPM bundle OPEN status/need-triage, area/extensions, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/24534 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. small 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. "In package.json, add ""examples"" to the files array to ensure the boilerplate templates are included in the NPM distribution." 24488 Take up to the whole 4TB disk space and require a reboot to reclaim OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/24488 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. large 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. 24462 Cannot run any shell commands OPEN area/core, status/need-retesting, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/24462 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. large 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. 24413 fix(core): use dynamic CLI version for IDE client instead of hardcoded '1.0.0' OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/24413 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. small 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). 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. 24333 fix(cli): reset slash-command conflict dedupe when conflicts reappear OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/24333 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. medium 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. 24324 SIGSEGV (Segmentation Fault) on startup (interactive mode) OPEN area/core, status/needs-info, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/24324 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. large 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). 24258 Listing MCP servers is inconsistent and confusing for untrusted projects OPEN status/need-triage, area/core, status/possible-duplicate, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/24258 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. medium 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. 24198 Alpine compatibility: BusyBox-safe entrypoint + portable non-interactive shell path OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/24198 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. medium 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. 24197 "Missing ""Sign in with Google"" option in Gemini CLI" OPEN status/need-triage, area/security, area/extensions, area/documentation, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/24197 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. medium 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. 24181 타이핑 ν•œ κΈ€μžλ§ˆλ‹€ λžœλ”κ°€ λ˜μ–΄μ„œ 계속 μƒˆ μ€„μ΄λœ¬λ‹€. OPEN priority/p1, area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/24181 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. medium 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. 24178 "Bug: Session cleanup throws ""Invalid retention period format: forever"" error" OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/24178 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. medium 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. 24142 Bug: sysctl ENOENT crash on startup (macOS Intel + Node.js v25) OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/24142 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. small 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. 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. 24050 McpClientManager.stopExtension does not disconnect extension-backed MCP clients OPEN status/need-triage, area/extensions, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/24050 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. small 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. 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. 24036 For some weeks now ctrl+insert and shift+insert have no longer worked for copy/paste OPEN priority/p2, area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/24036 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. medium 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. 24028 ToolOutputMaskingService redundantly JSON-serializes every tool response twice per turn OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/24028 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. small 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. 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. 24023 Bug: `--list-sessions` does not show the latest session OPEN area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/24023 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. small 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. 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. 24000 gemini-cli will not udate if tool.sandbox is present in settings.json regardless of current sandboxing OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/24000 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. small 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. 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. 23977 GEMINI CLI ζ­»ζŽ‰δΊ† OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/23977 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. large 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. 23959 ACP server does not start when sandboxing is enabled and stdin is not a TTY OPEN status/need-triage, area/core, status/possible-duplicate, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/23959 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. large 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. 23934 "bug: ""Reason: TypeError: resolved.startsWith is not a function""" OPEN status/need-triage, area/core, status/possible-duplicate, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/23934 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. small 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. 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. 23926 Confusing Windows Auth/Setup UX spawns secondary terminal, closing it breaks installation OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/23926 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. large 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. 23919 fix(cli): improve HalfLinePaddedBox rendering for Apple Terminal OPEN area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/23919 The rendering issue in Apple Terminal is caused by font-specific spacing gaps when using standard half-block characters (β–€/β–„). The fix involves detecting the terminal environment via the TERM_PROGRAM environment variable and using alternative block characters ('β–…' for top, 'β–„' for bottom) to achieve a seamless visual effect in that specific terminal emulator. small 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. In the `HalfLinePaddedBox` component, detect Apple Terminal by checking if `process.env.TERM_PROGRAM` equals 'Apple_Terminal'. When true, use 'β–…' (Lower five eighths block) for top padding and 'β–„' (Lower half block) for bottom padding to eliminate rendering gaps. 23891 Incorrect handling of line endings in ignore file parsers OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/23891 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. small 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. 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. 23867 Gemini CLI crashes during path permission check when running command in Strapi plugin OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/23867 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). medium 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. 23806 Tela preta OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/23806 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. large 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. 23650 proje iΓ§ine yeni bir dosya ekleyince @ işareti ile seΓ§emiyorum ΓΆnceden seΓ§ebiliyordum OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/23650 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. medium 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. 23648 Undo function not working OPEN priority/p2, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/23648 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. small 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. 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. 23643 Bug Report Subject: Gemini CLI Crashes Frequently in YOLO Mode with .js Files; File I/O Tools Unreliable OPEN status/need-triage, area/core, area/extensions, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/23643 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. medium 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. 23541 Autocomplete for subcommands duplicates the main command name OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/23541 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. medium 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. 23528 """ν˜„μž¬ ν™˜κ²½ 문제둜 write_file / replaceκ°€ λͺ¨λ‘ μ‹€νŒ¨ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€. PowerShellκ³Ό .NET λ©”μ„œλ“œκ°€ 성곡을 λ°˜ν™˜ν•˜μ§€λ§Œ μ‹€μ œ 파일이 λ³€κ²½λ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. μ΅œμ‹  버전 + μƒŒλ“œλ°•μŠ€ off + κ΄€λ¦¬μž κΆŒν•œμœΌλ‘œλ„ μ•ˆ λ©λ‹ˆλ‹€.""" OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/23528 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. large 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. 23507 Gemini CLI run_shell_command tool fails in ACP mode, missing tool results OPEN status/need-triage, area/non-interactive, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/23507 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. medium 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. 23481 bug: DevTools activity logger fetch interceptor strips headers from Request objects OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/23481 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. small 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. 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. 23480 Bug: Background git fetch for private extensions hijacks stdin, causing terminal freeze OPEN status/need-triage, area/extensions, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/23480 When extensions from private repositories are checked for updates, the spawned `git fetch` process prompts for credentials, stealing stdin from the main CLI. medium 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. 23427 Bug: systemMessage from hooks is suppressed in interactive mode unless turn is blocked OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/23427 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. medium 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. 23417 fix(cli): readStdin uses string.length instead of byte length for size limits OPEN status/need-triage, area/core, status/possible-duplicate, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/23417 `packages/cli/src/utils/readStdin.ts` sets UTF-8 encoding and then uses `chunk.length`, which measures UTF-16 code units, not actual bytes. small 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β€”switching from string accumulation to Buffer accumulationβ€”to ensure byte-accurate truncation and prevent character corruption. This falls under localized logic fixes that can be implemented and tested within a day. Replace `chunk.length` with `Buffer.byteLength(chunk, 'utf8')`. 23356 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. OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/23356 Likely an unhandled promise rejection or timeout in the IDE companion communication layer (packages/vscode-ide-companion). large 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. 23346 [Bug] [VS Code Extension] Pasting text (English/Korean) auto-executes prompt prematurely & Sidebar Chat UI hangs indefinitely OPEN status/need-triage, area/core, status/possible-duplicate, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/23346 The sidebar input component lacks bracketed paste mode support. Carriage returns in pasted blocks are interpreted as immediate submission signals. medium 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. 23336 """s94>thought"" thought blocks leaking into terminal stdout" OPEN priority/p2, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/23336 The model's internal thought blocks (prefixed with `s94>thought`) are not correctly stripped by the regex in the CLI's UI rendering layer. medium 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. 23297 Why pressing Enter does nothing? OPEN status/need-triage, area/core, status/possible-duplicate, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/23297 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. medium 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. 23227 Gemini cli ran into an issue, sharing the bug-report-history OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/23227 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. medium 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. 23222 Gemini will not run under ZSH when Gemini was installed under PNPM OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/23222 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. medium 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. 23172 Duplicate extension warnings in terminal UI during startup OPEN area/core, status/possible-duplicate, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/23172 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. small 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. 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. 23146 "Ctrl+C doesn't consistently ""Clear all text in the input field"", as documented" OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/23146 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. medium 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. 23138 settings.json reset to defaults when system theme changes, deleting custom hooks OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/23138 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. medium 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. 23117 [Issue Report] Critical Runtime Isolation Failure (Workspace Environment Bleed) OPEN priority/p1, area/extensions, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/23117 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. small 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. 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. 23091 flickering OPEN status/need-triage, area/core, status/possible-duplicate, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/23091 Flickering in the status bar during long-running tool executions caused by high-frequency telemetry updates triggering React re-renders. medium 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. 23054 Non-interactive mode produces fragmented traces (each span gets a separate Trace ID) OPEN status/need-triage, area/non-interactive, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/23054 Headless mode execution traces are fragmented because the main loop in `nonInteractiveCli.ts` does not wrap the entire session in a single root span. medium 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. 23039 Gemini Agent Infinite Restart Loop (Exit Code 41) on macOS M4 Pro / Sequoia OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/23039 Memory leak in the TUI during prolonged sessions caused by accumulating old message parts in the Ink virtual DOM. large 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β€”while working in a terminalβ€”requires 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. 23003 Vim Mode in NORMAL does not work consistently OPEN area/core, status/needs-info, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/23003 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. medium 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. 22946 "stop wasting time on features like ""press tab twice for more""" OPEN area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/22946 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). medium 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. 22904 run_shell_command crashes with publish error on Windows OPEN area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/22904 "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. On 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`. The 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. The 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." medium 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. 22878 Duplicate confirmation cascade UI still occurs in some tool calls OPEN area/core, status/possible-duplicate, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/22878 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. medium 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). 22814 File descriptor leak in ShellExecutionService.background() when command exits before 200ms delay OPEN area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/22814 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. medium 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. 22813 keybindings.json not being honored for intput.submit and input.newline OPEN area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/22813 Unintentional third-party extension usage causing account suspension. This is a policy enforcement issue. medium 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. 22779 Gemini CLI is unresponsive OPEN area/core, status/possible-duplicate, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/22779 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). medium 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. 22596 Since yesterday, I have been unable to have a conversation, and uninstalling and reinstalling also didn't help. OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/22596 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. medium 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. 22588 fix(core): MessageBus.request() silently hangs 60s when publish() fails OPEN area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/22588 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. small 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. 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);`. 22583 Race condition in ProjectRegistry.save() causes ENOENT during concurrent startup cleanup OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/22583 PTY Master Device exhaustion on macOS caused by unclosed file descriptors after shell tool execution. medium 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. 22566 Last line is displayed two in the console. OPEN area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/22566 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. medium 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. 22560 # Bug Report: Multiple Issues Found Across Core Services and Tools OPEN area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/22560 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). medium 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. 22452 BUG: CI_* env var scrub not applied in dev mode (`npm run start`) β€” interactive mode hangs OPEN area/core, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/22452 When running in developer mode, the CLI bypasses certain CI environment scrubbing steps, potentially leaking secrets or local paths into logs. small 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. 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. 22432 Architectural Flaw: ReloadResult truncates model and hooks state during onReload hot-reload OPEN area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/22432 The `ReloadResult` returned by the agent configuration reload logic is too restrictive, truncating important session or state data. medium 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. 22409 "CLI Crash with ""Maximum update depth exceeded""" OPEN status/need-triage, area/core, status/possible-duplicate, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/22409 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. medium 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. 22309 Home Dir Warning - Even when in subfolder of home dir? OPEN area/core, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/22309 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. small 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. 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`. 22274 Bug: image paste fails in WSL2 when clipboard exposes image/bmp and XDG_SESSION_TYPE is unset OPEN area/core, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/22274 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`. medium 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. 22219 "failure to respond to a request for user input causes ""Promise"" crash" OPEN priority/p1, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/22219 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. medium 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. 22125 `gemini extensions link` should return exit code 0 if extension is already installed OPEN area/extensions, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/22125 The `extensions link` command attempts to create a symlink even if one already exists, resulting in an 'EEXIST' error and command failure. small 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. 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. 22120 CoreToolScheduler.handleConfirmationResponse drops payload for ask_user tool OPEN status/need-triage, area/non-interactive, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/22120 `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. small 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. 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)`. 22032 Test suites leave behind temporary directories causing disk space waste OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/22032 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. small 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. 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. 22029 Pasting something and throwing me error OPEN area/core, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/22029 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. small 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. 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'`. 22004 When running gemini-cli inside a tmux session, the 'thinking' spinner (β Ό) 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. OPEN area/core, status/possible-duplicate, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/22004 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. large 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. 22001 Terminal Instance Resource Retention in ShellExecutionService OPEN area/core, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/22001 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. small 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. In `packages/core/src/services/shellExecutionService.ts`, update the `cleanupPtyEntry` method to call `entry.headlessTerminal.dispose()` before deleting the entry from `activePtys`. 21970 VIM mode is incomplete OPEN area/core, πŸ”’ maintainer only 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/21970 The TUI's 'vi mode' implementation lacks many standard Vim keyboard shortcuts and navigation commands, making it incomplete for power users. large 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. 21853 Severe Startup Latency (20~50 seconds) on Windows due to Synchronous Initialization Bottlenecks OPEN priority/p1, area/core, status/possible-duplicate, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/21853 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). large 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. 21835 ioctl error while running gemeni cli OPEN priority/p1, area/core, status/possible-duplicate, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/21835 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. small 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. 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. 21752 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 OPEN priority/p1, area/core, status/possible-duplicate, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/21752 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. medium 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. 21727 Decouple `mcpName` policy rules from FQN string parsing to support underscores in server aliases OPEN area/core, area/enterprise, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/21727 "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`. Key locations identified: 1. `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. 2. `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. 3. 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." medium 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. 21662 Dreadful startup time on HDDs OPEN priority/p1, area/core, status/possible-duplicate, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/21662 "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. Specifically, 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." small 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. 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. 21590 Line wrap for selection lists needs to be polished OPEN area/core, πŸ”’ maintainer only 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/21590 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. small 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. 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. 21568 deleteSession() does not clean tool output directories (UUID / filename mismatch) OPEN priority/p2, area/core, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/21568 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. small 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. 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`. 21553 [Bug] Automatic update fails silently or becomes ineffective due to PATH shadowing and non-standard NPM prefixes OPEN priority/p1, area/core, status/possible-duplicate, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/21553 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. medium 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. 21477 "bug: TUI hangs indefinitely on ""Initializing..."" β€” IdeClient.getInstance() blocks BuiltinCommandLoader in bare terminal" OPEN area/core, status/possible-duplicate, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/21477 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 ` 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. small 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. 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. 21399 Powershell execution policy can't run shell command OPEN priority/p1, area/core, status/possible-duplicate, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/21399 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. small 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. 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. 21343 Event-loop freeze from large base64 buffers + CLI media renderer missing OPEN area/core, status/needs-info, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/21343 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. medium 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. 21331 IDE companion extension fails to connect with gVisor (runsc) sandbox OPEN area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/21331 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. medium 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. 21113 Footer is gone after update OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/21113 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. medium 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. 20977 ACP: AgentThoughtChunk never emitted despite includeThoughts: true in streaming OPEN status/need-triage, area/non-interactive, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/20977 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. medium 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. 20949 Redundant Trailing Empty Lines in CLI Containers OPEN priority/p3, area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/20949 "The bug is caused by hardcoded layout properties (margins and paddings) within the React/Ink components used for the CLI's user interface. Specifically: 1. **Margins**: `GeminiMessage`, `GeminiMessageContent`, and `UserMessage` components likely have `marginTop` or `paddingY` attributes on their root `` elements, causing gaps between consecutive messages in the history. 2. **StickyHeader**: The `StickyHeader` component (used in `ToolMessage` and `ShellToolMessage`) contains internal padding and a hardcoded separator (likely a `` or `` with a border/dashes) that adds vertical height regardless of content. 3. **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." small 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. 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. 20885 UI recursion/infinite scrolling when expanding large diffs via Ctrl+O (macOS/Zed) OPEN area/core, status/needs-info, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/20885 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. medium 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. 20859 bug: AgentExecutionBlocked produces no output in non-interactive STREAM_JSON mode OPEN status/need-triage, area/non-interactive, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/20859 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. small 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. 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. 20730 gemini is not able to view files that exist, and I am not able to tag them (despite not being gitignored/geminiignored) OPEN priority/p2, area/core, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/20730 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. small 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. 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. 20453 Bug: AgentExecutionStopped produces no output in non-interactive JSON mode OPEN status/need-triage, area/non-interactive, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/20453 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. small 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. 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. 20356 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. OPEN area/core, status/possible-duplicate, status/needs-info, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/20356 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. large 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. 19985 CLI hangs/freezes when using `@filename:line` or `@filename:range` syntax OPEN priority/p2, area/core, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/19985 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. medium 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. 19868 """context.fileFiltering.customIgnoreFilePaths"" setting breaks file completion when using @" OPEN priority/p2, area/core, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/19868 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. medium 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. 19768 fix: Duplicate command names in Action Required confirmation OPEN priority/p2, area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/19768 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. small 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. 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. 19468 Scroll position continuously jumping to start OPEN priority/p2, area/core 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/19468 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. medium 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. 19387 should trust a folder if the rule matches the realpath flakes on windows OPEN area/core, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/19387 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. medium 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. 19282 "Run ""/extensions update google-workspace"" failed" OPEN priority/p3, area/extensions, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/19282 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. large 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. 19271 If I switch git branches within the CLI, it's not reflected in the UI OPEN area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/19271 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 `, 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. medium 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. 19248 "[Windows 11] CLI freezes at ""Initializing..."" loop after accepting ""Trust folder"" (Node v20 LTS)" OPEN priority/p1, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/19248 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. large 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. 19198 Event feedback breaks json output mode OPEN status/need-triage, area/non-interactive, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/19198 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. small 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'. 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. 19186 heavy loading OPEN status/need-triage, area/non-interactive, Stale, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/19186 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. large 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. 19156 Bug: Position argument not allow prompt start with `-` OPEN area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/19156 "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β€”either 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." small 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. 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. 19077 Improving Extension DX: Runtime flexibility (Bun/Deno support) and explicit dependency documentation OPEN area/extensions, πŸ”’ maintainer only 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/19077 "The bug stems from two main issues: hardcoded execution environments and insufficient metadata display in the UI. 1. **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. 2. **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." medium 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. 19052 "Extensions (e.g. Conductor) fail with ""run_shell_command not found"" + ask_user header >12 chars error + tool execution denied" OPEN area/extensions, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/19052 "The bug consists of three distinct but related failures in the extension execution pipeline: 1. **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. 2. **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. 3. **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. The `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`)." medium 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. 19050 gemini cli hangs indefinitely if .env is a named pipe (i.e. when using 1Password Environments) OPEN area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/19050 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. small 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. 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. 19028 Remote config for compression threshold is not applied when there is no user setting OPEN priority/p1, area/core, status/needs-info, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/19028 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. small 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. 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. 19005 Discussion: Terminal Resize Oscillation and TIOCGWINSZ Pixel Reporting Issues on Android/Termux OPEN area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/19005 "The bug involves two distinct terminal handling issues on Android/Termux: 1. **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. 2. **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. Logic responsible: The event listener in `useTerminalSize` and the `ioctl` wrapper logic that extracts dimensions without validating non-zero pixel values." medium 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. 18987 "[Gemini Code Assist VSCode Extension] MCP Servers are not working, stuck in ""Connecting"" state" OPEN area/extensions, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/18987 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'. large 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. 18978 Bug: stdin content duplicated into 2 consecutive user messages in headless/pipe mode (v0.28.2) OPEN status/need-triage, area/non-interactive, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/18978 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. large 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. 18961 Gemini CLI not able to detect that the companion extension is installed in VS-code OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/18961 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'. medium 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. 18946 RipGrep Search Tool Does Not Search Hidden Directories OPEN priority/p2, area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/18946 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. small 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. 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. 18934 settings.json is rewritten with different formatting even when logical content hasn't changed OPEN priority/p3, area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/18934 "The bug is caused by the way `settings.json` is serialized and written to disk. The root cause is two-fold: 1. **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. 2. **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). To fix this, the write logic should: - Read the existing file content. - Append a trailing newline to the stringified output. - Perform a string comparison and only write to disk if the content has actually changed." small 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. 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. 18914 [Android/Termux] Fix duplicate UI and repeated auth prompts caused by relauncher loop and resize remounting OPEN priority/p2, area/core, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/18914 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. small 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. 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. 18899 Automatic Update Corrupts Installation on Windows OPEN area/core, status/needs-info, πŸ”’ maintainer only 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/18899 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. medium 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. 18885 After running /resume I can't resume first chat in the list OPEN priority/p2, area/core, status/needs-info, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/18885 "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. Specifically: 1. **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. 2. **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. The fix involves changing these checks to explicitly check for `null` or `undefined` (e.g., `if (selectedIndex !== null)` or `if (typeof selectedIndex === 'number')`)." small 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. 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. 18884 Error updating google workspace extension OPEN priority/p1, area/extensions, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/18884 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`. medium 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. 18868 korean input error OPEN priority/p2, area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/18868 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 'γ…Ž' -> 'ν•˜') 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. medium 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. 18812 Command line utility commands shouldn't require set API key OPEN priority/p1, area/extensions, πŸ”’ maintainer only 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/18812 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. small 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. 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. 18726 Not able to connect gemini cli with the vscode OPEN priority/p1, area/core, status/needs-info, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/18726 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. medium 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. 18716 Severe IME candidate window misalignment when typing CJK characters on Windows @C:\Users\PC5080\.gemini\tmp\822e8215b009f46a641a99493e982cd82aecee13f183db24d50a086dbced0857\images\clipboard-1770708344776.png OPEN priority/p2, area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/18716 "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. The 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." large 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. 18593 Valid chat JSON missing from `/resume` list; forcing resume with `--resume` loads incorrect Session ID OPEN priority/p2, area/core, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/18593 "The bug manifests in two ways: a specific session file is missing from the `/resume` list, and forcing a resume via `--resume ` 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. 1. **Missing from list**: The logic that scans the `.gemini/tmp//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. 2. **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. 3. **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." medium 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. 18418 Korean IME input is broken in the terminal. It's unusable. Fix it Plz. OPEN area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/18418 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. large 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. 18405 Update notification shows version 0.27.2 available while Homebrew is still on 0.27.1 OPEN status/need-triage, area/core, Stale, status/possible-duplicate, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/18405 "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. To 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." medium 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. 18315 `useBackgroundColor` on `tmux` on `alacritty`: Can't See Prompt Text OPEN status/need-triage, area/core, status/possible-duplicate, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/18315 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`. small 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. 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. 18291 Input box background renders black in IDE integrated terminals (IntelliJ IDEA, VS Code) on Windows despite Light theme selection OPEN priority/p1, area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/18291 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 or property that doesn't correctly adapt to the 'Light' theme's palette or is being misinterpreted by the IDE's terminal color mapping. medium 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. 18087 [Safety Critical] Input Handling Flaws deny 'Emergency Stop' on Touch Interfaces (Inequitable Keybindings) OPEN priority/p2, area/core, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/18087 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. medium 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. 18030 API calls hang for 5 minutes (default node timeout) without retry OPEN priority/p1, area/core, status/possible-duplicate, πŸ”’ maintainer only 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/18030 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. small 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. 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. 18029 Pressing CTRL-X (open external editor) entered a unexpected state OPEN area/core, πŸ”’ maintainer only 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/18029 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. medium 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. 17925 Change summary: Refactored coordinate matching to optimize performance and reduce code duplication. OPEN status/need-triage, area/extensions, Stale, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/17925 "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). This 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. Because 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." medium 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. 17897 npx tsx -e falls into interactive REPL and hangs Gemini CLI shell tool OPEN status/need-triage, area/non-interactive, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/17897 "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)." large 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. 17891 cli breaks when running shell command OPEN area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/17891 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. medium 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. 17801 "Getting ""Unexpected end of JSON input"" on valid .gemini/settings.json" OPEN status/need-triage, area/non-interactive, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/17801 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. medium 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. 17729 ERROR ioctl(2) failed, EBADF OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/17729 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. medium 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. 17677 Session resume requires at least one human message to work OPEN priority/p2, area/core, area/non-interactive, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/17677 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. medium 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. 17506 [ERROR] [ImportProcessor] Persistent Import Failures with Corrupted Path Strings OPEN area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/17506 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. medium 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. 17469 System prompt explicitly instructs model to use excluded `SHELL_TOOL_NAME` in headless mode OPEN area/non-interactive 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/17469 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. small 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. 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. 17442 CLI Agent Intermittent Long Loading Times/Hangs During Tool Execution OPEN status/need-triage, area/core, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/17442 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`). large 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. 17437 Before confirming changes, I used CTRL + S to see the differences in the file; it no longer works. OPEN area/core, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/17437 "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). The regression most likely stems from one of two causes: 1. **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. 2. **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. 3. **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." medium 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. 17406 Hook support in Policy files OPEN priority/p3, area/core, area/enterprise, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/17406 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. medium 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. 17340 Repeating TUI OPEN priority/p2, area/core, status/needs-info, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/17340 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. medium 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. 17193 CLI Crash - Error: Cannot create a string longer than 0x1fffffe8 characters OPEN priority/p2, area/core, status/needs-info, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/17193 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. medium 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. 17083 Please stop clearing input field on hitting `esc` OPEN priority/p2, area/core, πŸ”’ maintainer only, kind/bug, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/17083 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. small 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. 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. 16564 Flicker when enablePermanentToolApproval is set OPEN area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/16564 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. medium 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. 16453 Gemini CLI hangs during multi-tool execution if user response to first prompt is delayed. OPEN priority/p1, area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/16453 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. medium 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. 16348 """!"" in a pasted text triggers shell mode" OPEN area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/16348 "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 ' (!)βš‘' 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. The 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." medium 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. 16058 Antigravity Global Rules and Gemini CLI Global Context Both Write to `~/.gemini/GEMINI.md` Causing Configuration Conflicts OPEN area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/16058 "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. Based on the search context: 1. `GEMINI_DIR` is a central constant exported from `packages/core` (referenced in `packages/test-utils/src/test-rig.ts`). 2. 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. 3. 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. The 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." small 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. 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`. 15924 React errors in experimental /extensions install 'extensionReloading' flow OPEN area/extensions, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/15924 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. medium 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. 15585 Avoid Ambiguous Width Characters OPEN priority/p1, area/core, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/15585 The bug is caused by the use of Unicode characters with the `East_Asian_Width=Ambiguous` property (specifically ●, β–², β– , ←, ↑, β†’, ↓) 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. small 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. In the UI component or constants files, replace the ambiguous-width characters ●, β–², β– , ←, ↑, β†’, and ↓ with their halfwidth equivalents: βˆ™ (U+2219), β–΄ (U+25B4), β–ͺ (U+25FE), οΏ© (U+FFE9), οΏͺ (U+FFEA), οΏ« (U+FFEB), and οΏ¬ (U+FFEC). 14940 "Auto-completion keeps requesting gemini-2.5-flash-lite even when using gemini-3.0, causing infinite ""usage limit reached"" warnings" OPEN priority/p2, area/core, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/14940 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. medium 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. 14623 "[Doc/UI Mismatch] ""Session Retention"" setting is missing from `/settings` UI but present in documentation" OPEN priority/p3, area/core, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/14623 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. small 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. 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. 14577 The command setup-github failed to execute with command rejection. OPEN priority/p1, area/non-interactive, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/14577 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 && 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. medium 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. 13614 Fix: JetBrains terminal auto-scroll behavior OPEN priority/p2, area/core, πŸ”’ maintainer only, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/13614 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. medium 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. 13545 Cannot get Gemini CLI to read images OPEN priority/p1, area/core, πŸ”’ maintainer only 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/13545 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. medium 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. 12468 Bug Report: run_shell_command output is garbled for Japanese characters on Windows OPEN priority/p2, area/core, Stale, status/need-retesting, status/bot-triaged, kind/bug, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/12468 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`. medium 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. 12083 Container name collisions due to sequential numbering in container name generation OPEN priority/p3, area/core, help wanted, type/bug 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/12083 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. small 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. 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. 5589 Vertex-AI Authentication does not prompt for an oauth screen OPEN priority/p2, area/core, Stale, πŸ”’ maintainer only 2026-04-21 https://github.com/google-gemini/gemini-cli/issues/5589 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. medium 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.