[BUG] LS tool returns empty results for non-empty directories

Resolved 💬 3 comments Opened Jul 30, 2025 by ebogdum Closed Aug 15, 2025

Environment

  • Platform (select one):
  • [x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other:
  • Claude CLI version: 1.0.63 (Claude Code)
  • Operating System: macOS (Darwin 15.4.1)
  • Terminal: Terminal App - zsh

## Bug Description
The LS tool fails to list files and directories that are present in a directory, returning empty results even when the directory contains multiple items. PS: {user_name} is a placeholder.

## Steps to Reproduce

  1. Navigate to a directory that contains files (e.g., /Users/{user_name}/.claude)
  2. Run claude "list the directory you're in"
  3. Claude uses the LS tool which returns empty results
  4. Verify files exist by running claude then !ls -la in interactive mode

## Expected Behavior
The LS tool should list all files and directories present in the specified path, similar to the ls command output.

## Actual Behavior
The LS tool returns an empty result showing only the directory path itself:

  • /Users/{user_name}/.claude/

Meanwhile, ls -la via Bash tool shows the directory actually contains: ide/, projects/, prompts/, shell-snapshots/, statsig/, todos/

## Additional Context
This bug impacts Claude's ability to explore file systems when invoked with direct commands. The @ mention feature and interactive mode !ls commands work correctly, but the LS tool itself appears broken. Workaround is to use Bash tool with ls commands instead

I have also added LS to the global permissions, I'm still getting the same results:

> list the directory you're in

⏺ I'll list the contents of the current directory.

⏺ List(.)
  ⎿  Listed 2 paths (ctrl+r to expand)

⏺ The directory /Users/{user_name}/.claude is empty.

View original on GitHub ↗

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