aws / aws/amazon-q-developer-cli

File search efficiency

Open
#2,948 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2k
Forks
439
PR merge metrics
No merged PRs in 30d

Description

### Checks

- [x] I have searched [github.com/aws/amazon-q-developer-cli/issues](https://github.com/aws/amazon-q-developer-cli/issues?q=) and there are no duplicates of my issue
- [x] I have run `q doctor` in the affected terminal session
- [x] I have run `q restart` and replicated the issue again

### Operating system

macOS 15.6.1 (24G90)

### Expected behaviour

When Q searches for files, it should use `git ls-files` or `git grep` instead of the `find` command. The find command should be the last thing that it tries unless it is not in a git controlled directory.

### Actual behaviour

Q defaults to running `find`, it writes very inefficient find + grep commands. In a git repository, `git grep` performs a lot better. If it is just looking for files by name, `git ls-files` is even better.

### Steps to reproduce

Ask Q about a file which is not in the current directory (it should be somewhere deeper in the folder structure).

### Environment

```yaml

[q-details]
version = "1.16.1"
hash = "012e81d1e8344e4e928e3deeef067083929be0df"
date = "2025-09-17T19:30:06.768894Z (2d ago)"

[system-info]
os = "macOS 15.6.1 (24G90)"
chip = "Apple M3 Pro"
total-cores = 12
memory = "36.00 GB"

[environment]
cwd = "/Users/USER/code/gtnexus/development"
cli-path = "/Users/USER/code/gtnexus/development"
install-method = "brew"

[env-vars]
PATH = "/Users/USER/code/tools/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Applications/iTerm.app/Contents/Resources/utilities:/Users/USER/.local/bin:/Users/USER/.dots/bin:/Users/USER/.local/bin:/Users/USER/.poetry/bin:/Users/USER/Applications/Visual Studio Code.app/Contents/Resources/app/bin:/Users/USER/.cargo/bin"
QTERM_SESSION_ID = "7be6aac0e5d24cb0a60e7b6843b1c669"
Q_SET_PARENT_CHECK = "1"
Q_TERM = "1.16.1"
SHELL = "/bin/zsh"
TERM = "xterm-256color"
__CFBundleIdentifier = "com.googlecode.iterm2"
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.