Skip to content

[BUG] JetBrains plugin: "Cannot launch Claude Code" error #6100

Description

@zzJinux

Environment

  • Platform (select one):
    • Anthropic API
    • AWS Bedrock
    • Google Vertex AI
    • Other:
  • Claude CLI version: 1.0.84 (Claude Code)
  • Operating System: 15.6 (24G84)
  • Terminal: n/a

Bug Description

When the claude is launched with CLAUDE_CONFIG_DIR env var, the JetBrains plugin complains that it cannot launch Claude Code, and the claude command itself can't locate the IDE as well.

Steps to Reproduce

  1. Make a shell script that proxies the real claude:
#!/usr/bin/env bash

claude=~/.local/bin/claude  # Native install location
cwd_abs=$(pwd -P)

for d in \
  ~/work \
; do
  d_abs=$(cd "$d" && pwd -P)
  if [[ $cwd_abs = $d_abs || $cwd_abs = "$d_abs"/* ]]; then
    export CLAUDE_CONFIG_DIR=~/.claude-work
    exec "$claude" "$@"
  fi
done
exec "$claude" "$@"
  1. Add the script file to the PATH to override the original claude.
  2. Specify the script file path to the JetBrains IDE Settings > Tools > Claude Code [Beta] > General > Claude command
  3. Change the working directory to where the custom CLAUDE_CONFIG_DIR is active.

Expected Behavior

  • When executing the claude from within the IDE integrated terminal, it can detect the IDE
  • When executing the claude from within the external terminal and running /ide, it can detect the IDE.

Actual Behavior

  • It can't detect the IDE.
  • Launching Claude Code from the IDE button (top-right), "Cannot launch Claude Code" is shown.
Image

Additional Context

The Claude Code is installed with curl -fsSL https://claude.ai/install.sh | bash.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:idebugSomething isn't workingplatform:macosIssue specifically occurs on macOS

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions