[Bug] statusline-setup agent uses hardcoded path instead of $HOME on Windows

Resolved 💬 3 comments Opened Jan 30, 2026 by ibabencu Closed Feb 2, 2026

Description

The statusline-setup agent (invoked via /statusline command) searches for shell configuration files in a hardcoded path (C:/Users/Administrator/) instead of using the actual $HOME environment variable.

Steps to Reproduce

  1. On Windows with Git Bash/MINGW, run Claude Code as a user (e.g., ionut.babencu)
  2. Run /statusline command
  3. Agent attempts to read:
  • C:/Users/Administrator/.zshrc
  • C:/Users/Administrator/.bashrc
  • C:/Users/Administrator/.bash_profile
  • C:/Users/Administrator/.profile
  1. All fail with "File does not exist"

Expected Behavior

Agent should use $HOME (which is /c/Users/ionut.babencu in this case) to locate shell config files:

  • $HOME/.bashrc
  • $HOME/.bash_profile
  • etc.

Actual Behavior

Agent hardcodes /Users/Administrator/ path, which:

  1. Doesn't exist on this system
  2. Ignores the actual user's home directory
  3. Uses Unix-style path (/Users/) instead of Windows-style (/c/Users/)

Environment

  • Platform: Windows (MINGW64_NT-10.0)
  • Shell: Git Bash
  • $HOME: /c/Users/<username>
  • The .bashrc and .bash_profile files DO exist in the correct $HOME location

Suggested Fix

Replace hardcoded path with $HOME or use proper home directory detection that works cross-platform.

View original on GitHub ↗

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