aws / aws/amazon-q-developer-cli
bug: CLI Bug: Amazon Q doesn't detect manual file changes between interactions
- 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
Expected Behavior:
Amazon Q should detect and respect manual changes made to files between CLI interactions. When reading a file that was previously created or modified in
the session but has since been manually edited, Q should work with the current state of the file rather than using a cached version or previous state.
### Actual behaviour
Actual Behavior:
When a user makes manual edits to a file that was created or modified through the CLI session, Amazon Q doesn't detect these changes in subsequent
interactions. For example, when creating a file with 10 numbered words, then manually removing the last 2 words outside the CLI, and then asking Q to
"write 3 more words into the file", Q adds the new content but also brings back the deleted content. During processing, it shows "Reading from
filesystem..." and "Reading: temp.txt", but doesn't accurately reflect the current state of the file.
### Steps to reproduce
Steps to Reproduce:
1. Ask Amazon Q to create a file called temp.txt with 10 numbered words
2. Manually edit the file outside the CLI session (e.g., remove the last 2 words)
3. Ask Amazon Q to "write 3 more words into the file"
4. Observe that Q adds the new content but also restores the deleted content, indicating it's not detecting the manual changes
### Environment
```yaml
[q-details]
version = "1.7.2"
```
Contributor guide
Assessment
This issue has not been assessed yet.