aws / aws/amazon-q-developer-cli

Q chat edits and deletes files without being instructed to

Aperta
#2,212 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

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 14.7.5 (23H527)

### Expected behaviour

Given an instruction to add logic to code, amazon q should not do edits such as changing file names and deleting files.

### Actual behaviour

q chat made unasked for changes to code, including deleting files, changing file names, changing imports, changing variable names, despite only being instructed to add logic.
Context: during the session a few files were created.
I edited the files manually, and changed some of the names.
In following asks to change the logic in specific functions, amazon q kept reverting the code to the way it was before my manual changes, including deleting some of the existing files at some point. At the same time, it reported that the changes I asked for were done as requested.
I kept asking it re-read the files and it didn't help, some of the same changes were done again and again.

I think the issue could be that q retains the code it generated or read in the first iteration, and does not replace it with changes made later on.
Another issue is that when asked to perform specific changes, it also does other changes on the fly without being asked to do them. It should be more selective about changes, and only do the ones the user actually asked for, not all possible changes.

### Steps to reproduce

### Environment

```yaml

[q-details]
version = "1.12.1"
hash = "a1adeaf5df9e144dcfa0bac728de942891254df0"
date = "2025-06-18T00:46:00.699098Z (15d ago)"

[system-info]
os = "macOS 14.7.5 (23H527)"
chip = "Apple M1 Pro"
total-cores = 8
memory = "32.00 GB"

[environment]
cwd = "/Users/USER"
cli-path = "/Users/USER"
install-method = "unknown"

[env-vars]
PATH = "/Users/USER/.pyenv/plugins/pyenv-virtualenv/shims:/Users/USER/.pyenv/shims:/Users/USER/.pyenv/bin:/opt/homebrew/opt/mysql-client@8.0/bin:/Users/USER/.docker/bin:/Users/USER/.local/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/opt/anaconda3/bin:/opt/anaconda3/condabin:/Users/USER/.pyenv/plugins/pyenv-virtualenv/shims:/Users/USER/.pyenv/bin:/opt/homebrew/opt/mysql-client@8.0/bin:/Users/USER/.docker/bin:/Users/USER/.local/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:/Library/Apple/usr/bin:/usr/local/munki"
QTERM_SESSION_ID = "fac9660c41984691ba6cccb219e3f0dc"
Q_SET_PARENT_CHECK = "1"
Q_TERM = "1.7.3"
SHELL = "/bin/zsh"
TERM = "xterm-256color"
__CFBundleIdentifier = "com.apple.Terminal"

[chat-settings]
interactive=true

[chat-trusted_tools]

[chat-failed_request_ids]
none

[chat-context]
current_profile=default
profiles=
default

global_context=
.amazonq/rules/**/*.md
README.md
AmazonQ.md

profile_context=
.
~/dev/mdm
~/dev/bod-ui
~/dev/commongwt

files=none
```

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Il report cita q chat, q doctor e q restart, ma non fornisce passaggi per la riproduzione, file sorgente o test. Inizia isolando un caso riproducibile che coinvolga file modificati manualmente e modifiche successive, quindi verifica che vengano apportate solo le modifiche richieste e che i file esistenti rimangano intatti.

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

Valutazione

Stack tecnologico
rust
Ambito
ai, cli
Tipo di issue
Bug
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
15/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.