What happened?
What happened?*
The SearchText tool (grep_search) fails to find files in hidden directories (those starting with a dot, e.g., .reborna/, .gemini/, .config/), even when matching content exists in those directories. The tool silently excludes hidden directories from search scope and returns "No matches found" with no indication that the search was incomplete.
Concrete Example
When searching for "Instructional Conversion and Integration Protocol" with:
- Pattern:
Instructional Conversion and Integration Protocol
- dir_path:
. (root directory)
- File that should match:
C:\Users\ahome\OneDrive\Documents\GitHub\Sancturary\.reborna\system.md
Actual Result:
No matches found for pattern "Instructional Conversion and Integration Protocol" in path "."
Expected Result:
Found 1 match for pattern "Instructional Conversion and Integration Protocol" in path ".":
---
File: .reborna/system.md
L182: ### Instructional Conversion and Integration Protocol
---
Root Cause
The RipGrep tool implementation (packages/core/src/tools/ripGrep.ts, line 338) does not include the --hidden flag when invoking ripgrep. By default, ripgrep excludes hidden files and directories from search results unless explicitly told to include them with the --hidden flag.
Affected Code:
const rgArgs = ['--json'];
// Missing: rgArgs.push('--hidden');
Ripgrep's documented behavior: "By default, ripgrep will not search hidden files or directories. You can use the --hidden flag to enable searching hidden files and directories."
What did you expect to happen?
What did you expect to happen?*
The SearchText tool should search ALL files in the specified directory scope, including those in hidden directories. The tool should return matching results from hidden directories (.reborna/, .gemini/, .config/, etc.) with the same behavior as files in visible directories.
Client information*
[Must always be]
- CLI Version: 0.27.3 (Gemini CLI - version at time of fork)
- Git Commit: 9b7ddad (Reborna CLI namespace migration commit)
- Operating System: win32 (Windows 10 Home 10.0.19045)
- Sandbox Environment: no sandbox
- Model Version: gemini-3-flash-preview (upstream test version)
[Parity Statement]
This bug exhibits identical behavior in both:
- Upstream Gemini CLI v0.27.3 - Confirmed by examining ripGrep.ts in gemini-cli-0.22.5 and later versions
- Reborna CLI (forked from Gemini CLI v0.27.3) - Confirmed in production environment
The issue is NOT a regression introduced by Reborna's namespace changes, but rather a pre-existing limitation in the upstream Gemini CLI that becomes a functional problem in projects that place searchable content in hidden directories.
Client information
- CLI Version: 0.27.3
- Git Commit: d5a135b
- Session ID: 63d31634-1d8e-47ec-8c12-9e08d8a69bd5
- Operating System: win32 v22.21.1
- Sandbox Environment: no sandbox
- Model Version: auto-gemini-3
- Memory Usage: 193.1 MB
- Terminal Name: Unknown
- Terminal Background: Unknown
- Kitty Keyboard Protocol: Unsupported
Login information
No response
Anything else we need to know?
Anything else we need to know?
Why This Bug Wasn't Caught in Upstream Gemini CLI
The bug was operationally mitigated through human reinforcement learning (RLHF):
- Users/models were trained to avoid searching for system configuration content using generic patterns
- Instead, they learned to directly specify hidden directory paths or use alternative approaches
- This training kept the limitation invisible in typical usage patterns
- However, the underlying tool limitation still exists and affects any project that places searchable content in hidden directories
Impact on Derivative Projects
Projects that fork Gemini CLI and reorganize directory structure (e.g., .reborna/ instead of .gemini/) immediately encounter this bug because:
- They may not have matching RLHF training for the new namespace
- The tool limitation becomes a functional blocker for system configuration searches
- There is no programmatic way for AI models to know they should avoid generic searches on hidden directories
Suggested Resolution
Code Fix:
Add the --hidden flag to ripGrep arguments in packages/core/src/tools/ripGrep.ts line 338:
const rgArgs = ['--json', '--hidden'];
Operational Update:
- Update RLHF training to reflect that SearchText now includes hidden directories by default
- This ensures model behavior naturally adapts to the expanded tool capability
- No breaking changes; this only fixes false negatives
Testing Verification
After applying fix, verify:
- ✓ Searches for content in hidden directories (
.gemini/, .reborna/, .config/) return matches when content exists
- ✓ Searches for content in visible directories continue to work as before
- ✓ Exclude patterns (
--glob !pattern) still work correctly for hidden files
- ✓ Performance is not significantly impacted
- ✓ Behavior now matches the JavaScript fallback implementation (which uses
dot: true)
Files Affected
packages/core/src/tools/ripGrep.ts - Primary fix location
packages/core/src/tools/grep.ts - Already has correct behavior via dot: true; RipGrep should match
- Test files:
ripGrep.test.ts should include test cases for hidden directory searches
What happened?
What happened?*
The
SearchTexttool (grep_search) fails to find files in hidden directories (those starting with a dot, e.g.,.reborna/,.gemini/,.config/), even when matching content exists in those directories. The tool silently excludes hidden directories from search scope and returns "No matches found" with no indication that the search was incomplete.Concrete Example
When searching for "Instructional Conversion and Integration Protocol" with:
Instructional Conversion and Integration Protocol.(root directory)C:\Users\ahome\OneDrive\Documents\GitHub\Sancturary\.reborna\system.mdActual Result:
Expected Result:
Root Cause
The RipGrep tool implementation (
packages/core/src/tools/ripGrep.ts, line 338) does not include the--hiddenflag when invoking ripgrep. By default, ripgrep excludes hidden files and directories from search results unless explicitly told to include them with the--hiddenflag.Affected Code:
Ripgrep's documented behavior: "By default, ripgrep will not search hidden files or directories. You can use the
--hiddenflag to enable searching hidden files and directories."What did you expect to happen?
What did you expect to happen?*
The SearchText tool should search ALL files in the specified directory scope, including those in hidden directories. The tool should return matching results from hidden directories (
.reborna/,.gemini/,.config/, etc.) with the same behavior as files in visible directories.Client information*
[Must always be]
[Parity Statement]
This bug exhibits identical behavior in both:
The issue is NOT a regression introduced by Reborna's namespace changes, but rather a pre-existing limitation in the upstream Gemini CLI that becomes a functional problem in projects that place searchable content in hidden directories.
Client information
Login information
No response
Anything else we need to know?
Anything else we need to know?
Why This Bug Wasn't Caught in Upstream Gemini CLI
The bug was operationally mitigated through human reinforcement learning (RLHF):
Impact on Derivative Projects
Projects that fork Gemini CLI and reorganize directory structure (e.g.,
.reborna/instead of.gemini/) immediately encounter this bug because:Suggested Resolution
Code Fix:
Add the
--hiddenflag to ripGrep arguments inpackages/core/src/tools/ripGrep.tsline 338:Operational Update:
Testing Verification
After applying fix, verify:
.gemini/,.reborna/,.config/) return matches when content exists--glob !pattern) still work correctly for hidden filesdot: true)Files Affected
packages/core/src/tools/ripGrep.ts- Primary fix locationpackages/core/src/tools/grep.ts- Already has correct behavior viadot: true; RipGrep should matchripGrep.test.tsshould include test cases for hidden directory searches