# Kiro CLI: error: You are not logged in, please log in with kiro-cli login

> kiro-cli found no saved sign-in and no KIRO_API_KEY for the command you ran. The exact message, why Kiro prints it, and the fix.

_Updated November 23, 2026 · Checked against kiro-cli 2.32.0 to 3.4.0 (2026)., reproduced in EnvHaven 1.9.0_

## The message

```text
error: You are not logged in, please log in with kiro-cli login
```

## What it means

kiro-cli found no saved sign-in and no KIRO_API_KEY for the command you ran. Scripts, containers and sandboxes often run without the sign-in store from your normal user session.

## Fix

1. Run `kiro-cli login` and choose a sign-in method (Builder ID, Google, GitHub or your organization).
2. On a machine without a browser, use device flow: `kiro-cli login --use-device-flow`, then open the URL it prints on any device and enter the code.
3. For automation on Pro and higher plans, create an API key at app.kiro.dev, set KIRO_API_KEY and run Kiro CLI in non-interactive mode.
4. Check the result with `kiro-cli whoami`.

## 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.32.0 to 3.4.0 (2026).) itself, in a throwaway EnvHaven 1.9.0 container, on 2026-11-23; the text above is copied from that output.

## Keep reading

- [Kiro](https://envhaven.com/agents/kiro)
- [Is Kiro down?](https://envhaven.com/status/kiro)
- [Every agent error](https://envhaven.com/errors)

Source: https://envhaven.com/errors/kiro/not-logged-in
