aws / aws/amazon-q-developer-cli

Default context paths lead to erroneous behavior in Q chat

Open
#943 0 comments 0 reactions 1 assignee Claimed by @GoodluckH View on GitHub
q chat
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.3.1 (24D70)

### Expected behaviour

Prompt:

```
> commit changes in this folder with a good commit message
```

Result:

```
Q should use git diff and commit the changes
```

### Actual behaviour

Prompt:

```
> commit changes in this folder with a good commit message
```

Result:
```
I notice that you want to commit changes in the current folder, but it appears that the files mentioned in your context don't exist yet. Let me check what files actually exist in the current directory before proceeding with the commit.
```

The context files for me are only the default ones:

```
> /context show

current profile: default

global:
.amazonq/rules/**/*.md
README.md
AmazonQ.md

profile:

>
```

Ideally, Q should not mention those files since the user has never explicitly added them to the context. Instead they should be used if they exist, but otherwise ignored.

### Steps to reproduce

_No response_

### Environment

```yaml
[q-details]
version = "1.7.2"
hash = "b6bf5f1675dd7395009e8bc65c1145820671f211"
date = "2025-03-21T01:36:16.66764Z (5d ago)"
variant = "full"
```

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.