Kiro CLI: error: Already logged in, please logout with kiro-cli logout first
`kiro-cli login` refuses to start because it thinks a session already exists. The exact message, why Kiro prints it, and the fix.
Updated November 23, 2026 · Checked against kiro-cli 2.24 to 2.34 (issue #11661, September 2026; also seen on 2.5.1 in #9103)., reproduced in EnvHaven 1.9.0
The message
error: Already logged in, please logout with kiro-cli logout first
What it means
kiro-cli login refuses to start because it thinks a session already exists. When KIRO_API_KEY is set in the environment, that key counts as being logged in, and kiro-cli logout can’t clear it, so login and logout loop.
Fix
- Run
kiro-cli whoamito see which method is active. - If KIRO_API_KEY is set (shell profile, CI secret, container environment),
unset KIRO_API_KEYbefore runningkiro-cli login. - Otherwise run
kiro-cli logout, thenkiro-cli login.
In an EnvHaven workspace
Yes, until Kiro CLI is signed in once. Sign in once from the workspace’s Launch menu (Sign in, or Set key for an API key); the sign-in stays on the workspace, across restarts and on every device.
Where this comes from
This message was produced by Kiro (kiro-cli 2.24 to 2.34 (issue #11661, September 2026; also seen on 2.5.1 in #9103).) itself, in a throwaway EnvHaven 1.9.0 container, on 2026-11-23; the text above is copied from that output.