Kiro icon indicating copy to clipboard operation
Kiro copied to clipboard

Command approval UI misparses shell redirections (`2>&1`)

Open ScottNoPantsOn opened this issue 5 months ago • 4 comments

Before opening, please confirm:

Operating System

Windows 11 Pro 25H2

Kiro Version

IDE Version 1.0.0

Bug Description

When a subagent executes a shell command containing 2>&1 piped to another command, the permission approval UI displays only 1 as the command requiring approval. Allowing the request fails because the actual command was not passed correctly.

Image

Steps to Reproduce

  1. Use a subagent (e.g., general-task-execution) to run a command like:
    npx jest --forceExit --testPathPattern="observability-stack" 2>&1 | Select-Object -Last 50
    
  2. The permission approval dialog appears.
  3. The "Your approval is required to continue" section shows only 1 as the command text.
  4. Clicking "Allow" fails — the command does not execute successfully.

Expected Behavior

The approval dialog should display the full command string exactly as submitted by the agent, and allowing it should execute that full command.

Conversation ID

sess_c4055795-1143-4d32-ab5b-9d16e306e38b

Additional Context

IDE Info: Version: 1.0.0 (user setup) VSCode Version: 1.107.1 Commit: 0974fb9837d3a1c159ee4016bbbcd4fc21e14111 Date: 2026-06-17T02:49:48.300Z Electron: 39.6.0 Chromium: 142.0.7444.265 Node.js: 22.22.0 V8: 14.2.231.22-electron.0 OS: Windows_NT x64 10.0.26200

ScottNoPantsOn avatar Jun 25 '26 03:06 ScottNoPantsOn

Thanks for filing this issue with such clear reproduction steps and screenshots! We can see how the command approval UI is incorrectly parsing shell redirections like 2>&1, resulting in only 1 being displayed instead of the full command. A maintainer will review this shortly. We appreciate you helping us improve the agent command experience! 🙌

github-actions[bot] avatar Jun 25 '26 03:06 github-actions[bot]

I'm experiencing similar issue.

Actual command: cd /Users/user_1/src/project_1 && mvn test -pl module_1 ...130 characters more... Command presented by Kiro in 'Your approval is required to continue' block is only: cd /Users/user_1/src/project_1

I could not expand it, copy/paste etc. It's hard to me to accept YOLO approvals...

phalicz-apptio avatar Jul 01 '26 11:07 phalicz-apptio

Thanks for reporting this and sorry for the trouble. You're running Kiro version 1.0.0, and we've shipped several patch releases since then with targeted fixes:

  • 1.0.52 (Jul 2): Compaction fixes, session migration, permissions/MCP reliability
  • 1.0.89 (Jul 3): Session restore, performance, hooks/steering fixes
  • 1.0.116 (Jul 9): Hooks on agent writes, lazy MCP OAuth, connectivity fixes
  • 1.0.138 (Jul 13): Compaction loop fix, PowerShell trust, MCP network recovery

Could you please retest on the latest version (1.0.138) from https://kiro.dev/downloads and let us know if this is still an issue? If we don't hear back within 7 days, we'll assume it's resolved and close this out.

AnilMaktala avatar Jul 15 '26 16:07 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 Jul 23 '26 00:07 github-actions[bot]