aws / aws/amazon-q-developer-cli

Q doesn't add images to conversation history

Ouverte
#2,256 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Rust
Étoiles
2k
Forks
439
Métriques de merge des PR
Aucune PR mergée en 30 j

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.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"
```

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par crates/chat-cli/src/cli/chat/message.rs, autour du code d’historique de conversation référencé dans l’issue, et suivez la manière dont les images lues précédemment sont gérées. Reproduisez le suivi de capture d’écran en deux tours décrit dans le rapport, puis vérifiez que le suivi conserve l’accès aux données de l’image précédente.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
rust
Domaine
ai, cli
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Clairement spécifiée
Accessibilité débutants
38/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.