aws / aws/amazon-q-developer-cli

bug: Context overflow when reading large files

Open
#2,187 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.5

### Expected behaviour

Q should inspect file sizes before reading files to prevent overflowing the context window. The better solution is for the fs_read tool to refuse to read large files and adhere to a reasonable default which is user definable.

### Actual behaviour

Q gleefully shoots itself in the head 🤯🔫 , and then much of my context is lost in the summarization process.

### Steps to reproduce

Tell Q to read a ridiculously large log file. This happens to me when conductng code debugging and e2e testing.

### Environment

```yaml

```

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.