# Claude Code: Not logged in · Please run /login

> Claude Code found no usable credential for the session: no claude.ai or Console login in its config directory, no ANTHROPIC_API_KEY in the environment and no apiKeyHelper. The exact message, why Claude Code prints it, and the fix.

_Updated November 23, 2026 · Checked against Claude Code 2.x. Sessions run by the Claude Desktop app show 'Authentication required · Sign in again to continue' instead., reproduced in EnvHaven 1.9.0_

## The message

```text
Not logged in · Please run /login
```

## What it means

Claude Code found no usable credential for the session: no claude.ai or Console login in its config directory, no ANTHROPIC_API_KEY in the environment and no apiKeyHelper.

## Fix

1. Run `claude`, then /login (or `claude auth login` from the shell), and sign in with your Claude subscription or Console account.
2. If you meant to use an API key, export ANTHROPIC_API_KEY in the same shell that starts claude.
3. For CI and other places where nobody can sign in interactively, use ANTHROPIC_API_KEY, an apiKeyHelper script, or a long-lived token from `claude setup-token`.
4. Run /status to confirm which credential Claude Code is using.

## In an EnvHaven workspace

Yes, until Claude Code 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 Claude Code (Claude Code 2.x. Sessions run by the Claude Desktop app show 'Authentication required · Sign in again to continue' instead.) itself, in a throwaway EnvHaven 1.9.0 container, on 2026-11-23; the text above is copied from that output.

## Keep reading

- [Claude Code](https://envhaven.com/agents/claude-code)
- [Is Claude Code down?](https://envhaven.com/status/claude-code)
- [Every agent error](https://envhaven.com/errors)

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