aws / aws/amazon-q-developer-cli
Output of "!command" is not loaded into context
- Dominant language
- Rust
- Stars
- 2k
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
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.3.2 (24D81)
### Expected behaviour
I would expect Q to have the output of the command in its context, so that in the above example it would respond with something like 'The result of the command was "super awesome"'.
### Actual behaviour
When I run the "!command", the agent does not seem to have the output of the command in its context.
See for example:
```
> I am about to run a command. It will output a string of the form "THE RESULT OF THE COMMAND IS ". After I run it, I will prompt you to tell me what the result was.
I understand you're about to run a command that will output a string in the format "THE RESULT OF THE COMMAND IS ". After you run the command, I'll help identify
what the result was when you prompt me. I'll be ready to extract the specific result value from that output format.
> !echo "THE RESULT OF THE COMMAND IS super awesome"
THE RESULT OF THE COMMAND IS super awesome
> What was the result of the command?
I don't see any command output in your message that follows the format "THE RESULT OF THE COMMAND IS ". It appears you've only shared an additional context section
but haven't yet run the command you mentioned earlier.
Once you run the command and share its output, I'll be able to tell you what the specific result was.
```
### Steps to reproduce
Can be reproduced with the prompts in the example above.
### Environment
```yaml
[q-details]
version = "1.8.0"
hash = "dd7442517f2f878fde45c744863412868eee7574"
date = "2025-04-23T18:52:24.776083Z (6d ago)"
variant = "full"
[system-info]
os = "macOS 15.3.2 (24D81)"
chip = "Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz"
total-cores = 6
memory = "16.00 GB"
[environment]
cwd = "/Users/USER"
cli-path = "/Users/USER"
os = "Mac"
...snip...
shell-version = "5.9"
terminal = "iTerm 2"
install-method = "toolbox"
[env-vars]
PATH = ...snip...
QTERM_SESSION_ID = "6ea3e06d3b9b4b14b4423cf029d8530d"
Q_SET_PARENT_CHECK = "1"
Q_TERM = "1.7.3"
SHELL = "/bin/zsh"
TERM = "screen.xterm-256color"
__CFBundleIdentifier = "com.googlecode.iterm2"
[chat-settings]
interactive=true
[chat-trusted_tools]
[chat-failed_request_ids]
none
[chat-context]
...snip...
```
Contributor guide
Research direction
Reproduce the issue with the two prompts shown in the report and confirm whether the `!command` output reaches the conversation context. The payload names no source files or tests, so trace the command-output handling from the CLI entry point; done means the follow-up prompt can identify the command result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, zsh
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100