list tool returns empty directory for readable hidden directories
Description
The list tool returns an empty directory listing for directories that are readable but have restrictive permissions, even when the user is the owner.
Steps to Reproduce
- Create a hidden directory with 700 permissions (owned by current user)
- Add files inside the directory
- Use the
listtool to read the directory
Expected Behavior
The list tool should enumerate all files in the directory, matching the output of bash ls
Actual Behavior
The list tool returns an empty directory listing, while bash ls correctly shows the files.
Example
Directory: .claude/commands/ (permissions: drwxrwxr-x)
- Owner: uptown (current user)
- Files exist: add-frontmatter.md, cross-link.md, execute.md, etc.
-
bash lsoutput: Shows all 10 files -
listtool output: Empty (no files listed)
Environment
- Platform: Linux
- Tool: OpenCode list command
- Working directory: /home/uptown/Projects/research
the list tool uses ripgrep, ripgrep respects your .gitignore could that be the issue?
You can make exclusions to this by making a .ignore file and putting something like:
!.claude/….
and then list tool can read that dir
the list tool only lists the subfolders that have files in them. In other words does not list empty folders. Only when I ask model to run bash tool it creates a correct list of the working folder content. BTW, can we edit system prompt to leave those tools that work (and avoid having to write to the prompt every time to use the bash tool to be able to see folders)?
can we edit system prompt to leave those tools that work
Idk what that means
the list tool only lists the subfolders that have files in them
Okay we can fix that
can we edit system prompt to leave those tools that work
Idk what that means
I was just wondering how I could disable that built-in List tool (at least until it is fixed).
just set:
tools: list: false
in ur json config