Agent fails to follow output and verify success of long-running commands
Before opening, please confirm:
- [x] I have searched for duplicate or closed issues
Operating System
win32
Kiro Version
0.2.0
Bug Description
When executing long-running commands (e.g., npm run build), the Agent starts the process but does not reliably follow the live output until completion. Instead:
- It stops early without waiting for the command to finish.
- It runs a timeout or echo in the terminal, losing the actual build output.
- It does not verify whether the command succeeded or failed before proceeding.
This leads to scenarios where the Agent continues execution without knowing if the build was successful, or repeats the command unnecessarily.
Steps to Reproduce
- Trigger a task that runs a long build command, e.g.:
npm run build
- Observe that the Agent does not wait for the build process to complete or follow the logs until the end.
- See that it may echo something to the terminal or run timeout instead, skipping the actual result.
Expected Behavior
- The Agent should follow the output of long-running commands until they fully complete.
- t should capture and parse the exit code to determine success or failure.
- Only proceed if the command finishes successfully; otherwise, ask for next steps.
Conversation ID
3c6129ca-e0f0-49da-8e8d-833e6f49e26a 4972792f-b971-4eea-b0e9-7946de963edf 7a1a6a32-174e-4871-bd20-5835a036972f eba9676e-08ca-4982-a282-66ee04967e31 e6547e88-4f71-4714-b5ed-e7e27ec7d8c9
Additional Context
No response
I'm also facing the same issue. I can understand why it might be good that Kiro doesn't wait for the long command to execute, because it keeps the user experience more responsive - but I think there should be an option to allow Kiro to wait for the command to complete... Otherwise we'll have to manually stop Kiro from doing something else, and use more credits just to paste the terminal output for Kiro to parse
Hi @KnightCoder27 👋 thanks for raising this issue.
I've definitely experienced the behavior described in this issue. However, I'm not sure how to consistently reproduce it and may need some help on that front. For example, I tried to prompt Kiro to run a build as suggested in the repro steps here but this time it was able to wait for and capture the output. This was on the latest version (0.2.13).
This may still be an issue so I will keep an eye out for other long terminal or command processes in my own use but next time this happens, please let us know what kind of prompt and/or command caused it so we can continue to make improvements.
Thank you for using and helping us improve Kiro! 🙏
Hi Chris, Sure, it could have been resolved in latest patches, i faced this issue while running npm build command
- where kiro goes on to run timer to let npm cmd run but in the end totally loses focus on primary terminal. if i encounter again i will let you know.
I have this issue from time to time but it doesn't seem consistent with the length of time the command takes.
I have a SvelteKit/Svelte5 project and I have this problem most times I run svelte-check and the check produces errors.
Kiro terminates before the errors are printed and interprets it as success (no errors)
I've been running into this issue regularly as Kiro builds and executes long running tests. If there is ever more than ~15 seconds without any text output to the terminal while a test is running Kiro will assume it hung and failed, requiring me to copy and paste the test output.
Thanks for raising this.
Closing this as stale -- it was filed against an older Kiro version and hasn't had activity in several months. If you're still seeing this on the current version, please open a new issue with your Kiro version, OS, and reproduction steps. To update, download from kiro.dev.