aws / aws/amazon-q-developer-cli

Q doesn't add images to conversation history

Aperta
#2,256 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
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

macOS 15.5.0 (24F74)

### Expected behaviour

When creating the [conversation history](https://github.com/aws/amazon-q-developer-cli/blob/a566a2a472bc75465ceec9ca08ec9e617725fbf6/crates/chat-cli/src/cli/chat/message.rs#L144) to send to the LLM, Q does not append images it has read before. As a result, asking follow up information about an image that has already been sent in a previous message causes it to hallucinate, as it has lost access to the actual data of the image.

For example, when asked to read the text the following image in one go, it works fine:

Image

```
> there is a screenshot on my desktop with some text, read it and tell me what the text is

> I'll help you read the text from the screenshot on your desktop. Let me first check what files are on your desktop, then read the screenshot.

🛠️ Using tool: fs_read (trusted)

● Reading directory: /Users/USER/Desktop with maximum depth of 0

● Completed in 0.0s

> I can see there's a screenshot file on your desktop. Let me read the text from it:

🛠️ Using tool: fs_read (trusted)

● Reading images:
/Users/USER/Desktop/Screenshot 2025-07-08 at 11.49.25 AM.png

● Completed in 0.0s

> I can see the text in your screenshot. It reads:

"This is some text. This is an unrelated sentence Q should know about."

The text appears to be displayed in white text on a dark background.
```

### Actual behaviour

When asked some follow up information for the same image, but not as part of the original message, the following happens:

```
> there is a screenshot on my desktop with some text, read it and tell me only what the first sentence is

> I'll help you read the screenshot on your desktop. Let me first check what files are available on your desktop, then read the screenshot.

🛠️ Using tool: fs_read (trusted)

● Reading directory: ~/Desktop with maximum depth of 0

● Completed in 0.0s

> I can see there's a screenshot file on your desktop. Let me read it to extract the text.

🛠️ Using tool: fs_read (trusted)

● Reading images:
/Users/USER/Desktop/Screenshot 2025-07-08 at 11.49.25 AM.png

● Completed in 0.0s

> The first sentence is: "This is some text."

> what's the next sentence?

> The next sentence is: "This is the second sentence with more information."
```

### Steps to reproduce

_No response_

### Environment

```yaml

[q-details]
version = "1.12.3"
hash = "65aa9285fc7ec3716215386a89d3a626500a25a7"
date = "2025-07-03T01:14:12.212107Z (6d ago)"
variant = "full"

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

[environment]
cwd = "/Users/USER/mcp-attacks"
cli-path = "/Users/USER/mcp-attacks"
os = "Mac"
shell-path = "/bin/zsh"
shell-version = "5.9"
terminal = "iTerm 2"
install-method = "unknown"

[env-vars]
PATH = "/Users/USER/.nvm/versions/node/v24.0.2/bin:/Users/USER/.toolbox/bin:/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:/Users/USER/.nvm/versions/node/v24.0.2/bin:/Users/USER/.toolbox/bin:/Users/USER/.cargo/bin:/Applications/iTerm.app/Contents/Resources/utilities:/Users/USER/.local/bin:/opt/homebrew/bin:/Users/USER/.rvm/bin:/Users/USER/.local/bin:/opt/homebrew/bin:/Users/USER/.rvm/bin"
QTERM_SESSION_ID = "4146da80dc5e4e1783858de28e96de3b"
Q_SET_PARENT_CHECK = "1"
Q_TERM = "1.12.2"
SHELL = "/bin/zsh"
TERM = "tmux-256color"
__CFBundleIdentifier = "com.googlecode.iterm2"
```

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia da crates/chat-cli/src/cli/chat/message.rs, intorno al codice della cronologia della conversazione collegato nell’issue, e segui come vengono gestite le immagini lette in precedenza. Riproduci il follow-up dello screenshot in due turni descritto nel report, quindi verifica che il follow-up mantenga l’accesso ai dati dell’immagine precedente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
rust
Ambito
ai, cli
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Specificata chiaramente
Idoneità per principianti
38/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.