aws / aws/amazon-q-developer-cli
fs_write tool fails with "No such file or directory" error when trying to modify MCP configuration
- 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.3.2 (24D81)
### Expected behaviour
The fs_write tool should be able to modify the MCP configuration file to fix JSON syntax errors like trailing commas.
### Actual behaviour
When attempting to use the fs_write tool to fix a trailing comma in the MCP configuration file (~/.aws/amazonq/mcp.json), the tool fails with the following error:
"Amazon Q is having trouble responding right now:
0: failed to print tool, `fs_write`: No such file or directory (os error 2)
Location:
/private/tmp/788abf33-519d-4264-918b-e563eeb425ff/crates/q_chat/src/lib.rs:1019"
```
Chat history
````
I'll help you fix the trailing comma error in your MCP configuration file. Let's examine the file and fix the issue at line 74, column 3.
🛠️ Using tool: fs_read (trusted)
⋮
● Reading file: ~/.aws/amazonq/mcp.json, all lines
⋮
● Completed in 0.0s
```
### Steps to reproduce
1. Identify a JSON syntax error in ~/.aws/amazonq/mcp.json (trailing comma at line 74, column 3)
2. Use fs_read to examine the file contents
3. Attempt to use fs_write to fix the trailing comma by replacing the problematic section
4. Observe the "No such file or directory" error
### Environment
```yaml
[q-details]
version = "1.9.1"
hash = "5d2c2807cab9bc6c9dc5fcd05f92c7a979e8a4f7"
date = "2025-04-29T06:22:42.917989Z (1d ago)"
variant = "full"
[system-info]
os = "macOS 15.3.2 (24D81)"
chip = "Apple M1 Pro"
total-cores = 10
memory = "32.00 GB"
[environment]
os = "Mac"
shell-path = "/bin/zsh"
shell-version = "5.9"
terminal = "VSCode"
install-method = "unknown"
[env-vars]
Q_SET_PARENT_CHECK = "1"
Q_TERM = "1.9.1"
SHELL = "/bin/zsh"
TERM = "xterm-256color"
ZDOTDIR = "/Users/USER"
__CFBundleIdentifier = "com.microsoft.VSCode"
[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=none
```
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia riproducendo il fallimento di fs_write durante la modifica di ~/.aws/amazonq/mcp.json, quindi ispeziona crates/q_chat/src/lib.rs:1019 e il percorso circostante di segnalazione degli strumenti. Conferma il comportamento con il caso documentato della virgola finale e considera completata la issue quando fs_write può modificare quella configurazione MCP senza l’errore “No such file or directory”.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- cli
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100