Kiro icon indicating copy to clipboard operation
Kiro copied to clipboard

AWS CLI commands are not read by Kiro

Open paulbrazell opened this issue 6 months ago • 5 comments

Operating System

darwin

Kiro Version

0.1.0

Bug Description

Whenever I ask Kiro to run an AWS CLI command, it pulls the data up in a paginated window. When I hit :q to exit the window, Kiro only reads the empty output. I have to copy and paste the output into the Kiro window before closing it.

Steps to Reproduce

  1. Ask Kiro in Vibe Coding mode to run an AWS CLI command that paginates the displayed output (ex aws iam get-role)
  2. View the file in the terminal, then exit using :q
  3. Kiro will not know what data was in the output of the aws cli command

Expected Behavior

Kiro should be able to capture that output.

Conversation ID

46f652ae-894e-4afc-86df-80127517427f 8c4154b0-d503-41f6-a1af-e3631a0c8a83 afb37dc2-e6f9-4e03-addb-1ec3592d3532 ce3685b9-ea08-424f-a5d9-0459d28ab114 fcbf7e2e-d395-46bf-a356-ed4969dd941b

Additional Context

No response

paulbrazell avatar Jul 15 '25 22:07 paulbrazell

Hi @paulbrazell 👋, thanks for raising this. We are aware of this issue where if the CLI command output is paginated, it does not stream into the chat appropriately and will only stream after entering :q in the terminal, after which the output may be truncated. In the interim, I'd recommend adding the --no-cli-page flag to the tech.md steering file in Kiro to ensure the output is not paginated for AWS CLI commands. Refer to this documentation for the steering file - https://kiro.dev/docs/steering/#default-steering-files

Jay2113 avatar Jul 21 '25 20:07 Jay2113

I found root cause on my system: The Kiro CLI redirection made it go haywire. Commenting it out and relaunching fixed it.


# Kiro CLI pre block. Keep at the top of this file.
# [[ -f "${HOME}/Library/Application Support/kiro-cli/shell/bash_profile.pre.bash" ]] && builtin source "${HOME}/Library/Application Support/kiro-cli/shell/bash_profile.pre.bash"


obijan42 avatar Nov 25 '25 22:11 obijan42

https://github.com/kirodotdev/Kiro/issues/4440 and https://github.com/kirodotdev/Kiro/issues/3972

jojo786 avatar Jan 05 '26 15:01 jojo786

https://www.reddit.com/r/kiroIDE/comments/1mvjdoa/working_on_terminal_command_execution_it_never/ seems to help

jojo786 avatar Jan 05 '26 15:01 jojo786

I think this is a common problem in agentic terminal access. The problem I commonly observe is shell plugins (especially those that change the format of the prompt and the output) seem to mess with an agent's ability to access or interpret terminal output. I've found that putting the following lines around an existing shell rc file (.zshrc or .bashrc) fixes it for me:

# Check if the current terminal is NOT Kiro
if [[ "$TERM_PROGRAM" != "kiro" ]]; then
    # Your standard Zsh configuration goes here

    # Example Oh My Zsh sourcing and plugins (adjust as needed for your setup):
    export ZSH="$HOME/.oh-my-zsh"
    ZSH_THEME="powerlevel10k/powerlevel10k" # or your preferred theme
    plugins=(
        git
        zsh-autosuggestions
        # ... other plugins ...
    )
    source "$ZSH/oh-my-zsh.sh"

    # Other customizations (aliases, functions, etc.) can also go here
else
    source "$(kiro --locate-shell-integration-path zsh)"
fi

This allows a user created shell to still have all the bells and whistles but creates a clean shell for kiro to execute commands.

ydgupta-amzn avatar Jan 05 '26 22:01 ydgupta-amzn