# Connection and licence problems

Fix a login that fails, an expired code, a replaced key or an environment variable that overrides your connection.

Use this page when the login command fails, or your agent says your licence is invalid or not set.

## The code expired

Login codes expire after a short time. Run the login again and approve it straight away.

## You see "license invalid or not entitled"

```output
⚠️ LeoPrevent · license invalid or not entitled. This turn was NOT reviewed (check your license_key / tier).
```

The service did not accept this installation's credential. Check these causes in order:

- A new key was generated in **Plugin setup**. That stops every installation that used the old one. Connect each machine again.
- You were removed from the account, or your access was suspended. Ask an Owner or Admin on your account to restore it.

## An environment variable overrides your login

If `LEOPREVENT_LICENSE_KEY` is set, it takes priority over the connection saved by browser login. The login command warns you when this applies. Remove the variable, or set it to your current key.

## The login worked but turns are not reviewed

A successful login confirms the credential, not the hooks. See [Installed but nothing happens](https://help.leotrace.io/installed-but-nothing-happens/).

## A login failed

A failed login keeps your existing saved connection, so it does not disconnect you. Run it again. If the browser cannot open, run the login with `--no-browser` and open the link on another device.

## Claude Code on the web keeps disconnecting

Each session runs on a rebuilt cloud machine, which does not keep a browser login. Set the `LEOPREVENT_LICENSE_KEY` environment variable in the environment's settings instead. See [Install in Claude Code on the web](https://help.leotrace.io/install-claude-code-web/).

Still stuck? [Contact support](https://help.leotrace.io/contact-support/).

Source: https://help.leotrace.io/connection-and-licence-problems/ (updated 2026-11-18)
