Startup falsely warns ~/.local/bin not in PATH when it is already in .bashrc

Status Closed — not planned
Maintainer reply None cached
Activity 2 comments · opened Feb 25, 2026 · closed Feb 25, 2026

Description

On every launch, Claude Code warns that ~/.local/bin is not in $PATH and suggests appending export PATH="$HOME/.local/bin:$PATH" to ~/.bashrc. However, the line is already present in ~/.bashrc and works correctly in interactive shells.

Environment

  • OS: CachyOS (Arch Linux)
  • Shell: bash
  • Terminal: Ghostty
  • Claude Code version: latest (as of 2026-02-24)

Shell config chain

  • ~/.bash_profile sources ~/.bashrc ([[ -f ~/.bashrc ]] && . ~/.bashrc)
  • ~/.bashrc line 6: export PATH="$HOME/.local/bin:$PATH"
  • Interactive shells correctly have ~/.local/bin in PATH

Problem

The startup PATH check appears to run in a non-interactive shell context that doesn't source .bashrc, so it doesn't see the PATH entry. It then prompts the user to add the line — which is already there. Following the suggestion repeatedly results in duplicate entries in .bashrc.

Expected behavior

The startup check should either:

  1. Source the user's shell config (.bash_profile → .bashrc) before checking PATH, or
  2. Check whether the PATH export already exists in .bashrc/.bash_profile/.profile before suggesting to add it, or
  3. Not warn at all if the line is already present in shell config files

View original on GitHub ↗

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