`!` (local shell) commands return empty output despite files existing
Resolved 💬 3 comments Opened Feb 22, 2026 by justinmae Closed Mar 22, 2026
Bug
The ! local shell shortcut returns empty output for commands like ls, even though files exist in the directory. The Bash tool works correctly for the same commands.
Steps to Reproduce
- Navigate to a directory with files
- Launch Claude Code (
claude) - Run
! ls— returns no output - Ask Claude to run
lsvia the Bash tool — correctly lists files - Run
! pwd— works correctly (returns the path)
Expected
! ls should list the directory contents.
Environment
- Claude Code v2.1.50
- macOS (Darwin 24.6.0)
- Shell: zsh
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗