Checks
Operating system
Linux 5.14.0-570.28.1.el9_6.x86_64 - Rocky Linux 9.6 (Blue Onyx)
Expected behaviour
Description
kiro-cli chat (TUI mode) exits immediately with exit code 1, displaying misleading authentication error messages. The --legacy-ui mode works perfectly,
confirming that authentication and the chat engine are functioning correctly.
Environment
- kiro-cli: 2.2.2
- OS: Rocky Linux 9.6
- Virtualization: KVM
- TERM: xterm
- TTY: /dev/pts/1
- Shell: bash
Steps to Reproduce
kiro-cli login --use-device-flow → succeeds
kiro-cli whoami → shows correct user
kiro-cli chat → exits immediately
Expected Behavior
TUI chat interface should start.
Actual Behavior
$ kiro-cli chat -vv
2026-05-07T01:01:54.605520Z INFO q_cli::cli: 542: no social token found
2026-05-07T01:01:54.606142Z INFO q_cli::cli: 560: no idp token found
$ echo $?
1
Workarounds (all work)
kiro-cli chat --legacy-ui ✅
echo "hello" | kiro-cli chat ✅ (pipe mode)
Notes
- The error message "no social token found / no idp token found" is misleading. Authentication is verified working via
kiro-cli whoami and --legacy-ui mode.
- The actual issue appears to be TUI initialization failure, with incorrect error reporting falling through to an auth check path.
- Tested with both root and non-root users — same result.
- Tested with
TERM=xterm-256color — same result.
Actual behaviour
$ kiro-cli chat -vv 2>&1; echo "exit: $?"
2026-05-07T01:01:54.605520Z INFO q_cli::cli: 542: no social token found
2026-05-07T01:01:54.606142Z INFO q_cli::cli: 560: no idp token found
exit: 1
$ kiro-cli chat --legacy-ui
(works normally - chat interface starts)
verified working via kiro-cli whoami
Steps to reproduce
No response
Environment
<This will be visible to anyone. Do not include personal or sensitive information>
[q-details]
version = "2.2.2"
hash = "7b8bf7d8e854fbf3b4071b047526b3dd851b2563"
date = "2026-05-05T23:02:24.043902Z (1d ago)"
variant = "minimal"
[system-info]
chip = "QEMU Virtual CPU version 2.5+"
total-cores = 2
memory = "23.22 GB"
[system-info.os.linux]
kernel_version = "5.14.0-570.28.1.el9_6.x86_64"
id = "rocky"
name = "Rocky Linux"
pretty_name = "Rocky Linux 9.6 (Blue Onyx)"
version_id = "9.6"
version = "9.6 (Blue Onyx)"
[environment]
cwd = "/USER"
cli-path = "/USER"
os = "Linux"
shell-path = "/usr/bin/bash"
install-method = "unknown"
in-ssh = true
[env-vars]
PATH = "/USER/.local/bin:/USER/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
QTERM_SESSION_ID = "5d19a34b3ca34c658e3245f4baa561b8"
Q_SET_PARENT_CHECK = "1"
Q_TERM = "2.2.2"
SHELL = "/bin/bash"
TERM = "xterm"
XDG_SESSION_TYPE = "tty"
Checks
q doctorin the affected terminal sessionq restartand replicated the issue againOperating system
Linux 5.14.0-570.28.1.el9_6.x86_64 - Rocky Linux 9.6 (Blue Onyx)
Expected behaviour
Description
kiro-cli chat(TUI mode) exits immediately with exit code 1, displaying misleading authentication error messages. The--legacy-uimode works perfectly,confirming that authentication and the chat engine are functioning correctly.
Environment
Steps to Reproduce
kiro-cli login --use-device-flow→ succeedskiro-cli whoami→ shows correct userkiro-cli chat→ exits immediatelyExpected Behavior
TUI chat interface should start.
Actual Behavior
$ kiro-cli chat -vv
2026-05-07T01:01:54.605520Z INFO q_cli::cli: 542: no social token found
2026-05-07T01:01:54.606142Z INFO q_cli::cli: 560: no idp token found
$ echo $?
1
Workarounds (all work)
kiro-cli chat --legacy-ui✅echo "hello" | kiro-cli chat✅ (pipe mode)Notes
kiro-cli whoamiand--legacy-uimode.TERM=xterm-256color— same result.Actual behaviour
verified working via kiro-cli whoami
Steps to reproduce
No response
Environment