Kiro icon indicating copy to clipboard operation
Kiro copied to clipboard

kiro-cli chat silently crashes with exit code 1 on Ubuntu Server (TUI mode), --classic works fine

Open wulukewu opened this issue 7 months ago • 4 comments

Before opening, please confirm:

Operating System

Ubuntu Server (Linux x86_64)

Kiro Version

2.0.1

Bug Description

kiro-cli chat silently exits with code 1 on Ubuntu Server. No output to stdout or stderr, no log file generated. The process terminates immediately without rendering anything.

kiro-cli chat --classic works perfectly in the same environment.

This appears to be a TUI renderer initialization failure specific to headless/server Linux environments.

Steps to Reproduce

  1. SSH into an Ubuntu Server instance
  2. Run kiro-cli chat
  3. The command exits immediately with no output

Verified the following:

  • kiro-cli chat; echo "Exit code: $?" → Exit code: 1
  • kiro-cli chat 2>/tmp/kiro-stderr.log → stderr log is empty
  • KIRO_LOG=debug kiro-cli chat 2>&1 → no output at all
  • No log file created at /tmp/kiro-log/kiro-chat.log
  • TERM=xterm-256color kiro-cli chat → same result
  • Happens in both tmux and plain zsh
  • kiro-cli chat --classic → works perfectly

Environment details:

  • $TERM: tmux-256color (also tested xterm-256color)
  • Locale: en_US.UTF-8
  • ldd $(which kiro-cli): all shared libraries resolved (libgcc_s, libm, libc — no missing deps)
  • Same user account works fine on macOS

Expected Behavior

kiro-cli chat should either:

  1. Launch the TUI successfully, or
  2. Print a meaningful error message explaining why TUI mode cannot start in this environment (e.g., unsupported terminal capabilities), and suggest using --classic as a fallback.

Silent exit with code 1 and zero diagnostic output makes it very difficult to troubleshoot.

Conversation ID

No response

Additional Context

  • The binary is a standard ELF 64-bit dynamically linked executable; ldd shows no missing libraries.
  • --classic mode works flawlessly, confirming that authentication, network, and core CLI functionality are all fine.
  • The issue is isolated to the TUI rendering/initialization path.
  • macOS with the same kiro-cli version does not have this problem.

wulukewu avatar Apr 25 '26 09:04 wulukewu

🤖 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 report kiro-cli TUI mode crashing silently with no error output, though different operating systems (Ubuntu vs macOS) and different crash mechanisms (exit code 1 vs SIGTRAP)

github-actions[bot] avatar Apr 25 '26 09:04 github-actions[bot]

Confirmed this is the same root cause as #6902 — the bundled Bun binary requires AVX2, which my CPU doesn't support.

$ ~/.local/share/kiro-cli/bun --version
[1] 54850 illegal hardware instruction (core dumped)

$ grep avx2 /proc/cpuinfo
(no output)

wulukewu avatar Apr 25 '26 09:04 wulukewu

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 25 '26 09:04 github-actions[bot]

I was able to solve this issue by just using Bun's specific version for older devices. Here are the steps to fix it manually:

  • Step 1: Download the Bun baseline build for older devices without AVX2:
wget https://github.com/oven-sh/bun/releases/latest/download/bun-linux-x64-baseline.zip
  • Step 2: Unzip the downloaded file:
unzip bun-linux-x64-baseline.zip
  • Step 3: Move the baseline binary to override Kiro's bundled engine:
mv ./bun-linux-x64-baseline/bun ~/.local/share/kiro-cli/bun

And voila! kiro-cli started successfully! WITHOUT --classic mode 🥀

pwnxpl0it avatar Jul 18 '26 18:07 pwnxpl0it