Kiro icon indicating copy to clipboard operation
Kiro copied to clipboard

`--trust-all-tools` should skip confirmation prompt

Open syukawa-gh opened this issue 7 months ago • 12 comments

Kiro Product

CLI

Feature Description

--trust-all-tools flag now shows an interactive confirmation prompt before starting the session. This breaks aliases and scripted usage. Please add a --yes / --no-confirm flag to skip the prompt, or respect --trust-all-tools as implicit consent.

Use Case

I use a shell alias like alias kc="kiro-cli chat --trust-all-tools --agent kiro --model claude-opus-4.6" to start sessions quickly. Since a recent update, the confirmation prompt blocks startup and requires manual interaction, defeating the purpose of --trust-all-tools. This also breaks non-interactive/scripted usage with --no-interactive.

Additional Context

No response

syukawa-gh avatar Apr 13 '26 08:04 syukawa-gh

🤖 Potential Duplicate Detected

This issue appears to be similar to:

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 deal with tool approval problems where the --trust-all-tools flag or autoApproveTools configuration doesn't properly skip confirmation prompts, requiring manual approval despite being configured to auto-approve

github-actions[bot] avatar Apr 13 '26 08:04 github-actions[bot]

Second this - I picked this flag for a reason, I understand the risks and have already consented

csvan avatar Apr 13 '26 17:04 csvan

Thank you for your feedback! 🙏

The duplicate label has been removed and this issue has been sent back for maintainer review.

A maintainer will review this issue shortly.

github-actions[bot] avatar Apr 13 '26 17:04 github-actions[bot]

Adding my case here — same issue in a CI/CD (Jenkins) environment.

Environment:

  • kiro-cli 2.0.0
  • macOS (Jenkins node)
  • Running in Jenkins pipeline (non-interactive by nature)

Command:

kiro-cli chat --trust-all-tools --no-interactive "<prompt>"

Error (from verbose logs):

Command execute_bash is rejected because it matches one or more rules on the denied list:
  - non-interactive mode (no user to approve)

The --trust-all-tools flag should override the non-interactive deny rule for execute_bash. The whole point of combining these two flags is to enable fully autonomous execution in CI — there's no human to approve, and we've explicitly opted in to trust all tools.

This is a blocker for any CI/CD integration that needs kiro-cli to execute shell commands as part of its workflow.

Mrxyx avatar Apr 14 '26 02:04 Mrxyx

Update: After checking the Kiro CLI 2.0 changelog and headless mode docs, it turns out this is likely by design — headless mode (--no-interactive + --trust-all-tools) requires API Key authentication via KIRO_API_KEY env var, not SSO.

However, this creates a blocker for enterprise SSO users:

  • Our org uses enterprise SSO (AWS IAM Identity Center) for Kiro authentication
  • API Key generation is controlled by the enterprise admin and may not be enabled
  • Without API Key access, there's no way to use headless mode in CI/CD even with a valid SSO session

Request: Either:

  1. Allow --trust-all-tools to work with SSO authentication in --no-interactive mode (the user has already authenticated and explicitly opted in), or
  2. Make the error message clearer — instead of non-interactive mode (no user to approve), say something like headless mode requires KIRO_API_KEY authentication. See https://kiro.dev/docs/cli/headless/

The current error gives no hint that the auth method is the issue, which sends users on a wild goose chase debugging tool permissions.

Mrxyx avatar Apr 14 '26 03:04 Mrxyx

We could have a setting for this - chat.disableTrustAllToolsWarning

brandonskiser avatar Apr 14 '26 17:04 brandonskiser

I use kiro-cli chat --no-interactive --trust-all-tools <TASK> for sub-agents in Claude Code and this change completely breaks my workflow. I'm running Kiro on a dedicated machine in full isolation, AWS shouldn't decide for me what's safe or not.

stefanprodan avatar Apr 15 '26 06:04 stefanprodan

I use kiro-cli chat --no-interactive --trust-all-tools <TASK> for sub-agents in Claude Code and this change completely breaks my workflow. I'm running Kiro on a dedicated machine in full isolation, AWS shouldn't decide for me what's safe or not.

This is a bug that will be fixed in the next release. You should be able to run all tasks in headless mode if --trust-all-tools without requiring any prompt confirmation / approval.

erbenmo avatar Apr 16 '26 08:04 erbenmo

This should be fixed in 2.0.1

erbenmo avatar Apr 20 '26 18:04 erbenmo

Thanks @erbenmo for fixing this so fast. I have updated to 2.0.1 and in headless mode the shell tool works when run with --trust-all-tools.

stefanprodan avatar Apr 20 '26 18:04 stefanprodan

Kiro CLI 2.1 (Apr 24, 2026) includes several improvements to tool trust and the terminal UI. This may have been addressed as part of those changes.

Could you please update to CLI 2.1.1 and verify whether --trust-all-tools now skips the confirmation prompt as expected? We'll close this once confirmed.

AnilMaktala avatar Apr 28 '26 15:04 AnilMaktala

This issue has been automatically closed due to inactivity. It has been 7 days since we requested additional information.

If you still need help with this issue, please feel free to reopen it or create a new issue with the requested details.

github-actions[bot] avatar May 06 '26 00:05 github-actions[bot]