amazon-q-developer-cli
amazon-q-developer-cli copied to clipboard
Unable to pipe command to q in `--non-interactive` mode
Checks
- [x] I have searched github.com/aws/amazon-q-developer-cli/issues and there are no duplicates of my issue
- [x] I have run
q doctorin the affected terminal session - [x] I have run
q restartand 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 <PROFILE> Context profile to use
--model <MODEL> Current model to use
--trust-all-tools Allows the model to use any tool to run commands without asking for confirmation
--trust-tools <TOOL_NAMES> 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
<This will be visible to anyone. Do not include personal or sensitive information>
[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"
Having the same issue.