aws / aws/amazon-q-developer-cli
bug: Q is too eager to compact the context window
- Lingua principale
- Rust
- Stelle
- 2k
- Fork
- 439
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
### 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
AL2
### Expected behaviour
Q doesn't compact the context window until it is necessary
### Actual behaviour
q tries to compact the history, even though 30% of the context window is still available
in the following example, I used ctrl+c to stop the summarization, and then checked the usage. I still have 30% space, even though it tried to compact the history. I expect Q to use the entire context window before compacting, doing this early makes Q lose it train of thought and I usually just have to completely start over from scratch.
There is no way this prompt caused Q to use 30% more tokens. Its just a follow up from its previous prompt.
if this was 90-95% I wouldn't think this was a bug, but still having 30% and getting a compaction makes no sense.
```
> it didn't there are check styles errors
The context window has overflowed, summarizing the history...
> /usage
Current context window (142280 of 200k tokens used)
████████████████████████████████████████████████████████████████████████████████ 71.14%
█ Context files: ~0 tokens (0.00%)
█ Tools: ~58850 tokens (29.43%)
█ Q responses: ~19160 tokens (9.58%)
█ Your prompts: ~64270 tokens (32.14%)
💡 Pro Tips:
Run /compact to replace the conversation history with its summary
Run /clear to erase the entire chat history
Run /context show to see tokens per context file
```
### Steps to reproduce
_No response_
### Environment
```yaml
```
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia riproducendo il report nella sessione terminale interessata con q doctor, q restart e il prompt successivo, quindi ispeziona /usage per confrontare la percentuale di contesto quando inizia la compattazione. L'issue è completata quando Q non compatta a circa il 71% di utilizzo e compatta solo quando è effettivamente necessario riepilogare la finestra di contesto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- ai, cli
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100