[BUG] False "symlink points to invalid binary" warning on boot when symlink is actually valid

Resolved 💬 3 comments Opened Oct 1, 2025 by b1zzu Closed Oct 4, 2025

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Claude Code displays a false warning on boot: "Claude symlink points to invalid binary: /home/davide/.local/lib/node_modules/@anthropic-ai/claude-code/cli.js"

What Should Happen?

No warning should be displayed when the symlink is valid and functional.

Error Messages/Logs

Warning is shown even though:
  - The symlink exists and points to the correct file: `/home/davide/.local/bin/claude -> /home/davide/.local/lib/node_modules/@anthropic-ai/claude-code/cli.js`
  - The target file exists and has execute permissions
  - The binary works correctly when executed (`claude --version` returns `1.0.119 (Claude Code)`)
  - The shebang is correct (`#!/usr/bin/env node`)

Steps to Reproduce

  1. Have Claude Code installed via npm with symlink in ~/.local/bin/
  2. Start a new terminal session
  3. Observe the false warning message

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

1.0.119

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Other

Additional Information

The symlink validation logic appears to incorrectly flag valid symlinks as invalid during the boot process.

This appears to be a validation bug in Claude Code's startup routine where it's incorrectly checking symlink validity.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗