Skip to content

Native Claude Code binary not detected as IDE #8

Description

@weytani

Problem

devreap's IDE detection doesn't recognize the native Claude Code binary, causing parent_ide_dead to fire on all MCP servers even when Claude Code is actively running.

The native binary installs to ~/.local/share/claude/versions/<ver> and is symlinked from ~/.local/bin/claude. On macOS, gopsutil reports:

  • Name: claude (or the version number like 2.1.74)
  • Cmdline: claude --dangerously-skip-permissions (no full path)

The existing IDE signatures only match the old npm-based install paths:

{pathContains: "/node_modules/.bin/claude"},
{pathContains: "/@anthropic-ai/claude-code"},

Neither matches because macOS doesn't include the resolved binary path in Cmdline — it uses the symlink name.

Impact

Every MCP server gets parent_ide_dead (0.30) + no_tty (0.15) = 0.45 baseline. Any server that also has has_listener (0.20) scores 0.65, which exceeds the default 0.60 threshold and gets killed. devreap then fights Claude Code's reconnect logic in a kill/restart loop every 30 seconds.

Suggested fix

gopsutil's p.Exe() returns the resolved binary path (e.g. /Users/x/.local/share/claude/versions/2.1.74), which would match a /.local/share/claude/ signature. The Exe path would need to be added to ProcessInfo and checked in checkIDERunningFromList alongside Cmdline.

Environment

  • macOS (Apple Silicon)
  • Claude Code 2.1.74 (native binary install)
  • devreap at ef3af6b (main)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions