kiro-cli error: File exists (os error 17)
Checks
- [x] I have searched github.com/aws/amazon-q-developer-cli/issues and there are no duplicates of my issue
- [x] I have run
q doctorin the affected terminal session - [x] I have run
q restartand replicated the issue again
Operating system
macOS 26.1.0 (25B78)
Expected behaviour
kiro-cli should start.
Actual behaviour
I had Q Developer installed, updated to kiro-cli and I get "error: File exists (os error 17)"
❯ kiro-cli chat
error: File exists (os error 17)
Steps to reproduce
`❯ curl -fsSL https://cli.kiro.dev/install | bash Kiro CLI installer:
Downloading package... ✓ Downloaded and extracted ✓ Package installed successfully
🎉 Installation complete! Happy coding!
Next steps: Use the command "kiro-cli" to get started!
$ kiro-cli
Welcome to Kiro CLI, let's get you signed in!
Press enter to continue to the browser or esc to cancel
Device authorized
Logged in successfully
error: File exists (os error 17)`
Environment
<This will be visible to anyone. Do not include personal or sensitive information>
[q-details]
version = "1.20.0"
hash = "ac0d8dec437123a79962295fdad4122ef9642da3"
date = "2025-11-16T23:27:14.134786Z (3d ago)"
variant = "full"
[system-info]
os = "macOS 26.1.0 (25B78)"
chip = "Apple M3 Pro"
total-cores = 12
memory = "36.00 GB"
[environment]
cwd = "/Users/USER"
cli-path = "/Users/USER"
os = "Mac"
shell-path = "/bin/zsh"
shell-version = "5.9"
terminal = "iTerm 2"
install-method = "unknown"
[env-vars]
PATH = "/Users/USER/Library/pnpm:/Users/USER/.nvm/versions/node/v24.7.0/bin:/opt/homebrew/opt/ruby/bin:/opt/homebrew/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/pmk/env/global/bin:/Applications/iTerm.app/Contents/Resources/utilities:/Users/USER/.local/bin"
QTERM_SESSION_ID = "26bc934bc54042889ba3bb6ca23c8d61"
Q_SET_PARENT_CHECK = "1"
Q_TERM = "1.20.0"
SHELL = "/bin/zsh"
TERM = "xterm-256color"
__CFBundleIdentifier = "com.googlecode.iterm2"
I'm not sure what to fix.
❯ kiro-cli doctor
✘ Kiro CLI settings corruption: Kiro CLI settings file is corrupted
Attempting to fix automatically...
Failed to fix: No such file or directory (os error 2)
✘ Doctor found errors. Please fix them and try again.
If you are not sure how to fix it, please open an issue with kiro-cli issue to let us know!
❯ kiro-cli issue
✔ Issue Title · error: File exists (os error 17)
Heading over to GitHub...
For anyone coming from the web to find this issue, for me it was because I had my ~/.kiro directory symlinked, then I accidentally deleted the source directory so the symlink was broken. After removing the stale link kiro-cli worked for me again.
Workaround: The issue seems to be that kiro-cli resolves sibling binaries (kiro-cli-chat, kiro-cli-term) relative to its own executable path. When invoked via the symlink at ~/.local/bin/kiro-cli, it fails to find them because the symlink directory doesn't contain the sibling binaries.
Replacing the symlink with a wrapper script fixes it:
bash
sudo rm ~/.local/bin/kiro-cli
echo '#!/bin/bash
exec /Applications/Kiro\ CLI.app/Contents/MacOS/kiro-cli "$@"' | sudo tee ~/.local/bin/kiro-cli > /dev/null
sudo chmod +x ~/.local/bin/kiro-cli
This way the binary is executed directly from its real path and can locate its sibling binaries correctly.