Skip to content

Gemini CLI Companion extension is not detected when VS Code is launched from an external terminal via code . #7092

@goodmai

Description

@goodmai

What happened?

Description:

When Visual Studio Code is launched from an external terminal using the code . command, the integrated terminal within VS Code fails to recognize or activate the Gemini CLI Companion extension. Running any gemini command results in a connection error, and the extension's features do not engage. The extension appears to work correctly when VS Code is launched directly from the OS (e.g., via an application menu).

Steps to Reproduce:

  1. Ensure the "Gemini CLI Companion" extension is installed and enabled in VS Code.
  2. Open a standard system terminal (e.g., GNOME Terminal, Konsole).
  3. Navigate to any project directory (e.g., cd /home/g/ansible).
  4. Launch VS Code by running the command: code .
  5. Once VS Code opens, open the integrated terminal (using Ctrl+ or from the "Terminal" menu).
  6. In the integrated terminal, run the gemini command.

Actual Behavior:

The gemini command fails to execute properly. The Gemini CLI Companion extension is not detected, and a connection error is displayed in the terminal.

Error Message:

1 [ERROR] [IDEClient] Failed to connect: TypeError: fetch failed

What did you expect to happen?

The gemini command should execute successfully, and the Gemini CLI Companion extension should detect the command and provide its corresponding UI features and integration.

Client information

  • CLI Version: 0.1.22
  • Git Commit: 5fe4e02
  • Session ID: cd0cc019-4dff-4455-b21b-495709785d01
  • Operating System: linux v20.12.2
  • Sandbox Environment: no sandbox
  • Model Version: gemini-2.5-pro
  • Memory Usage: 200.7 MB

Login information

oath2

Anything else we need to know?

/ide status

✕ 🔴 Disconnected: Failed to connect to IDE companion extension for VS Code. Please ensure the extension is running. To install the
extension, run /ide install.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions