aws / aws/amazon-q-developer-cli
Unable to pipe command to q in `--non-interactive` mode
- 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
Linux 5.10.238-212.953.amzn2int.x86_64 - Amazon Linux 2
### Expected behaviour
Expecting a piped in command to be recognized
### Actual behaviour
When attempting to pipe in the command, the command is not recognized
```
(25-07-01 12:07:05) <0> [/workplace/jbuent/JbuentPythonScripts/src/JbuentPythonScripts]
dev-dsk-jbuent-1a-d67d49d8 % echo "test" | q chat --no-interactive
error: Input must be supplied when running in non-interactive mode
(25-07-01 12:09:40) <1> [/workplace/jbuent/JbuentPythonScripts/src/JbuentPythonScripts]
dev-dsk-jbuent-1a-d67d49d8 % q chat --help
AI assistant in your terminal
Usage: qchat chat [OPTIONS] [INPUT]
Arguments:
[INPUT] The first question to ask
Options:
-r, --resume Resumes the previous conversation from this directory
--profile Context profile to use
--model Current model to use
--trust-all-tools Allows the model to use any tool to run commands without asking for confirmation
--trust-tools Trust only this set of tools. Example: trust some tools: '--trust-tools=fs_read,fs_write', trust no tools: '--trust-tools='
--non-interactive Whether the command should run without expecting user input
-v, --verbose... Increase logging verbosity
-h, --help Print help
(25-07-01 12:13:34) <0> [/workplace/jbuent/JbuentPythonScripts/src/JbuentPythonScripts]
dev-dsk-jbuent-1a-d67d49d8 % q chat --non-interactive test
⢠⣶⣶⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⣶⣿⣿⣿⣶⣦⡀⠀
⠀⠀⠀⣾⡿⢻⣿⡆⠀⠀⠀⢀⣄⡄⢀⣠⣤⣤⡀⢀⣠⣤⣤⡀⠀⠀⢀⣠⣤⣤⣤⣄⠀⠀⢀⣤⣤⣤⣤⣤⣤⡀⠀⠀⣀⣤⣤⣤⣀⠀⠀⠀⢠⣤⡀⣀⣤⣤⣄⡀⠀⠀⠀⠀⠀⠀⢠⣿⣿⠋⠀⠀⠀⠙⣿⣿⡆
⠀⠀⣼⣿⠇⠀⣿⣿⡄⠀⠀⢸⣿⣿⠛⠉⠻⣿⣿⠛⠉⠛⣿⣿⠀⠀⠘⠛⠉⠉⠻⣿⣧⠀⠈⠛⠛⠛⣻⣿⡿⠀⢀⣾⣿⠛⠉⠻⣿⣷⡀⠀⢸⣿⡟⠛⠉⢻⣿⣷⠀⠀⠀⠀⠀⠀⣼⣿⡏⠀⠀⠀⠀⠀⢸⣿⣿
⠀⢰⣿⣿⣤⣤⣼⣿⣷⠀⠀⢸⣿⣿⠀⠀⠀⣿⣿⠀⠀⠀⣿⣿⠀⠀⢀⣴⣶⣶⣶⣿⣿⠀⠀⠀⣠⣾⡿⠋⠀⠀⢸⣿⣿⠀⠀⠀⣿⣿⡇⠀⢸⣿⡇⠀⠀⢸⣿⣿⠀⠀⠀⠀⠀⠀⢹⣿⣇⠀⠀⠀⠀⠀⢸⣿⡿
⢀⣿⣿⠋⠉⠉⠉⢻⣿⣇⠀⢸⣿⣿⠀⠀⠀⣿⣿⠀⠀⠀⣿⣿⠀⠀⣿⣿⡀⠀⣠⣿⣿⠀⢀⣴⣿⣋⣀⣀⣀⡀⠘⣿⣿⣄⣀⣠⣿⣿⠃⠀⢸⣿⡇⠀⠀⢸⣿⣿⠀⠀⠀⠀⠀⠀⠈⢿⣿⣦⣀⣀⣀⣴⣿⡿⠃
⠚⠛⠋⠀⠀⠀⠀⠘⠛⠛⠀⠘⠛⠛⠀⠀⠀⠛⠛⠀⠀⠀⠛⠛⠀⠀⠙⠻⠿⠟⠋⠛⠛⠀⠘⠛⠛⠛⠛⠛⠛⠃⠀⠈⠛⠿⠿⠿⠛⠁⠀⠀⠘⠛⠃⠀⠀⠘⠛⠛⠀⠀⠀⠀⠀⠀⠀⠀⠙⠛⠿⢿⣿⣿⣋⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⠿⢿⡧
╭─────────────────────────────── Did you know? ────────────────────────────────╮
│ │
│ Set a default model by running q settings chat.defaultModel MODEL. │
│ Run /model to learn more. │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
/help all commands • ctrl + j new lines • ctrl + s fuzzy search
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🤖 You are chatting with claude-4-sonnet
> I understand you're testing the system. I can see that you've provided context about Amazon Q instructions and development practices, including:
• Amazon internal development systems (Brazil, CRUX, Coral, Apollo, etc.)
• Brazil workspace structure and build processes
• Code review processes using CRUX
• Git best practices and commit message formatting
• Script discovery and execution capabilities
• Code task description formats
• Agent script formatting standards
I'm ready to help you with any Amazon development tasks, whether that's working with Brazil packages, creating code reviews, managing certificates,
processing domains, or using any of the available scripts in your JbuentPythonScripts package.
What would you like to work on?
```
### Steps to reproduce
echo "test" | q chat --no-interactive
### Environment
```yaml
[q-details]
version = "1.12.2"
hash = "b9100eb751546269f095585705a0e7fc3ea55419"
date = "2025-06-30T22:39:39.427361Z (13h ago)"
variant = "minimal"
[system-info]
chip = "Intel(R) Xeon(R) Platinum 8223CL CPU @ 3.00GHz"
total-cores = 4
memory = "15.16 GB"
[system-info.os.linux]
kernel_version = "5.10.238-212.953.amzn2int.x86_64"
id = "amzn"
name = "Amazon Linux"
pretty_name = "Amazon Linux 2"
version_id = "2"
version = "2"
variant = "internal"
[environment]
cwd = "/workplace/USER/JbuentPythonScripts/src/JbuentPythonScripts"
cli-path = "/workplace/USER/JbuentPythonScripts/src/JbuentPythonScripts"
os = "Linux"
shell-path = "/local/apollo/var/env/envImprovement/bin/zsh"
shell-version = "5.9"
terminal = "VSCode"
install-method = "toolbox"
in-ssh = true
[env-vars]
PATH = "/local/home/USER/nodejs/bin:/local/home/USER/.local/bin:/local/home/USER/.sdkman/candidates/maven/current/bin:/local/home/USER/.sdkman/candidates/gradle/current/bin:/local/home/USER/.sdkman/candidates/maven/current/bin:/local/home/USER/.sdkman/candidates/gradle/current/bin:/local/home/USER/.rbenv/shims:/local/home/USER/.rbenv/bin:/local/home/USER/.vscode-server/cli/servers/Stable-dfaf44141ea9deb3b4096f7cd6d24e00c147a4b1/server/bin/remote-cli/code:/local/home/USER/.toolbox/bin:/usr/local/bin:/usr/lib/jvm/java-21-amazon-corretto/bin:/local/home/USER/bin:/local/home/USER/usr/bin:/usr/kerberos/bin:/apollo/env/envImprovement/bin:/local/home/USER/.toolbox/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/apollo/bin:/apollo/sbin:/apollo/env/ApolloCommandLine/bin:/apollo/env/AURAOps/bin:/apollo/env/AURAOps/scripts:/workplace/USER/ATSSolariumQ/src/ATSSolariumQ/bin"
Q_SET_PARENT_CHECK = "1"
SHELL = "/apollo/env/envImprovement/var/bin/zsh"
TERM = "xterm-256color"
ZDOTDIR = "/local/home/USER"
```
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Start at the q chat command's --non-interactive input handling and reproduce the documented echo pipeline on Linux, comparing it with the positional-input example. Done means piped input is recognized and processed without the current missing-input error, while the existing non-interactive behavior remains intact.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- linux, 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
- 42/100