Terminal interaction awareness + trusted mode with blacklist
Kiro Product
IDE
Feature Description
Summary
When Kiro runs terminal commands that enter an interactive state (e.g. test runners waiting for a keypress), the agent currently does not detect that the terminal is blocked and waiting for input. There is also no obvious UI indication that the workflow is stuck on a terminal prompt, so the agent appears to be “stuck” until the user happens to notice the terminal and manually interacts with it.
I’d like to propose:
- Better terminal interaction awareness and UX when the terminal is waiting for input.
- A “more trusted” execution mode that combines an allow-by-default approach with a user-configurable blacklist for risky commands.
Environment
- OS: macOS (Tahoe)
- Kiro product: IDE
- Shell / setup: Kiro built‑in terminal, running
npmtests with a watch mode (e.g. Vitest)
Problem: terminal interaction blocks the agent silently
Here is a concrete example:
Kiro runs a command like:
cd /path/to/project/frontend && npm run test -- __tests__/property/articles/ArticleBrowser.property.test.tsx
The test runner fails and then enters watch mode, showing something like:
FAIL Tests failed. Watching for file changes...
press h to show help, press q to quit
At this point:
- The terminal is waiting for user input (e.g.
qto quit). - Kiro’s agent does not seem to detect that the command is now blocked on interactive input.
- There is no clear UI signal that the workflow is stuck on a terminal prompt.
- The agent just appears to stop making progress until the user manually looks at the terminal and presses
q.
In practice, this means that long or autonomous workflows can silently stall, and the only way to recover is for the user to notice the terminal state and manually send the input. This is especially painful when running tests or tools that often enter watch/interactive modes.
Feature request 1: terminal interaction awareness & UX
It would be very helpful if Kiro could:
-
Detect common interactive prompts in terminal output, for example:
press q to quitPress any key to continueDo you want to continue? (y/n)- Other common yes/no or keypress prompts
-
Surface a clear UI status when the terminal is waiting for input, e.g.:
- A status banner like:
“Terminal is waiting for input:press q to quit” - Or a notification / message from the agent saying that it’s blocked on a specific prompt.
- A status banner like:
-
Optionally offer agent‑mediated actions, for example:
- Agent message: “The test runner is waiting for
qto quit. Do you want me to sendq?” - Buttons like:
[Send q] [Ignore] [Show terminal] - When the user clicks the button, Kiro sends the appropriate key to the terminal and continues the workflow.
- Agent message: “The test runner is waiting for
The key point is: instead of silently stalling, Kiro should make it obvious that the terminal is interactive and give a smooth way to resolve it (either via UI or via the agent itself).
Feature request 2: “trusted mode” with blacklist
Separately, I’d love to have a more “trusted” mode for terminal execution.
Right now, the trusted commands / approval system is great for safety, but in high‑frequency workflows it can become quite interruptive because the user has to keep approving similar commands manually.
My proposal:
- Add a “trusted mode” that allows Kiro to automatically execute commands that are considered low‑risk, without prompting every time.
- In this mode, also provide a user‑configurable blacklist for sensitive commands or patterns.
Concretely:
-
Trusted mode behavior
- When enabled, Kiro can auto‑run commands that:
- Match a configured trusted pattern (e.g.
npm run *,npm test *), and - Do not match any blacklist pattern.
- Match a configured trusted pattern (e.g.
- This would cover common, relatively safe commands like:
cd ...ls,cat,tail,headnpm test ...,npm run lint,npm run build, etc.
- These would execute without constantly asking for approval, making longer agent workflows much smoother.
- When enabled, Kiro can auto‑run commands that:
-
Blacklist behavior
- The user can define a blacklist of “always ask” commands or patterns, such as:
rm,rm -rf *sudo *docker system prune *curl * | sh- Other project‑specific dangerous commands.
- If a command matches any blacklist entry, Kiro must prompt for manual confirmation, even in trusted mode.
- The user can define a blacklist of “always ask” commands or patterns, such as:
-
Goal
- This keeps a strong safety model for truly dangerous operations, while allowing a much more fluid experience for everyday read‑only or low‑risk commands.
- It also fits well with longer autonomous sessions where the user wants the agent to keep making progress without continuous “trust this command” prompts.
Use Case
For agentic workflows (especially ones that run tests, scripts, linters, and other tools repeatedly), two things are very important:
- The agent should not silently stall on interactive terminal prompts.
- Safe, repetitive commands should not require constant manual approval.
Improving terminal interaction awareness plus adding a trusted mode with a blacklist would make Kiro much more usable for long‑running or semi‑autonomous development sessions, while still preserving good safety guarantees for truly risky operations.
Thank you for considering this!
Additional Context
The example above comes from using Vitest in watch mode, but the same pattern applies to any tool that waits for a simple keypress or yes/no confirmation in the terminal.
🤖 Potential Duplicate Detected
This issue appears to be similar to:
- #6717: executeBash: Terminal hangs after successful command, agent receives "Signal was cancelled" (85% similar)
- #6461: Temporary command approval / Per project approvals (85% similar)
- #6005: Kiro Stalls after running CLI Comands (85% similar)
- #5536: Kiro does not wait for command completion (85% similar)
- #5071: Feature Request: Subagent tool approval improvements (85% similar)
- #4909: When a large command is executed in the bash terminal, Kiro never receives the results (85% similar)
- #6498: Feature Request: Configurable timeout for commands executed by Kiro (82% similar)
- #5063: Subagent trust confirmation should be batched, not per-operation (82% similar)
- #4962: Allow trustedCommands wildcards in the middle of command strings and within command words (82% similar)
What happens next?
- ⏰ This issue will be automatically closed in 3 days
- 🏷️ If this is not a duplicate, you can prevent automatic closure by adding a comment or reacting with 👎 to this message.
- 💬 Comment on the original issue if you have additional information
Why is this marked as duplicate? Both issues describe terminal hanging/blocking problems where commands enter interactive states and the agent doesn't properly handle the situation, causing workflows to stall
Thank you for your feedback! 🙏
The 👎 reaction has been noted. The duplicate label has been removed and this issue has been sent back for maintainer review.
A maintainer will review this issue shortly.
Thanks for the detailed feature request! We've noted this and added it to our backlog for consideration. Community upvotes (👍 on the issue) help us prioritize, so if others want this too, please upvote.
We'll update this issue when there's progress to share. If you find a workaround or have additional context in the meantime, feel free to add it here.