warpdotdev/warp · error
You are not logged in - please log in with `{cli_name} login
Error message
You are not logged in - please log in with `{cli_name} login` to continue. What it means
Raised in launch_command: the requested CLI command requires authentication (per command_requires_auth — agent, task, environment, runner, provider, model, secret, etc.), and command_authentication returned None. That means neither an explicit API key (--api-key / WARP_API_KEY) was supplied nor does AuthStateProvider report a logged-in user.
Source
Thrown at app/src/ai/agent_sdk/mod.rs:1627
fn launch_command(
ctx: &mut AppContext,
command: CliCommand,
global_options: GlobalOptions,
) -> anyhow::Result<()> {
let parent_span = tracing::Span::current();
let requires_auth = command_requires_auth(&command);
if !requires_auth {
return dispatch_command(ctx, command, global_options);
}
let cli_name = warp_cli::binary_name().unwrap_or_else(|| "warp".to_string());
let auth_state = AuthStateProvider::handle(ctx).as_ref(ctx).get();
let Some(authentication) =
command_authentication(global_options.api_key.clone(), auth_state.is_logged_in())
else {
return Err(anyhow::anyhow!(
"You are not logged in - please log in with `{cli_name} login` to continue."
));
};
// On staging the warp-server is fronted by IAP, so establish an IAP token
// before *any* warp-server request.
let iap = IapManager::handle(ctx);
if !iap.as_ref(ctx).is_enabled() || iap.as_ref(ctx).has_valid_token() {
authenticate_and_dispatch(ctx, command, global_options, authentication, parent_span);
return Ok(());
}
let mut handled = false;
let parent_span_for_iap = parent_span.clone();
ctx.subscribe_to_model(&iap, move |_, event, ctx| {
let _guard = parent_span_for_iap.enter();
if handled {
return;View on GitHub (pinned to e72fd7aacb)
Solutions
- Run `warp login` and complete the flow, then retry the command
- Set a valid API key: export WARP_API_KEY=... or pass --api-key
- For CI, provision an API key and inject it as an environment variable in the job
Example fix
# before warp agent list # not logged in, no key # after warp login warp agent list # or headless: WARP_API_KEY=$KEY warp agent list
Defensive patterns
Strategy: validation
Validate before calling
# Fail fast with your own message before any auth-required command
warp whoami >/dev/null 2>&1 || { echo "not logged in: run 'warp login' or set WARP_API_KEY" >&2; exit 1; }
warp agent list Try / catch
out=$(cmd 2>&1) || { case "$out" in *'not logged in'*) warp login && cmd;; *) echo "$out" >&2; exit 1;; esac; } Prevention
- Provision WARP_API_KEY as a secret in CI instead of relying on sessions
- Run `warp login` as an explicit setup step in onboarding scripts
- Centralize the auth check in a wrapper so every command benefits
When it happens
Trigger: Any auth-required command (`warp agent run`, `warp task list`, `warp whoami`, `warp runner list`, `warp model list`, ...) on a fresh install with no prior `warp login` and no WARP_API_KEY in the environment.
Common situations: Fresh machines or CI containers; credentials cleared by `warp logout` or cache wipe; cron/systemd contexts where the interactive login never happened and no API key is injected.
Related errors
- claude -p exited {result.returncode} stderr: {result.stderr}
- schema_unavailable_or_invalid
- {role}_settings_unavailable_or_invalid
- Authentication failed: {err:#}
- Could not determine user ID. Are you logged in?
AI-assisted analysis of warpdotdev/warp@e72fd7aacb (2026-08-16).
Data as JSON: /api/errors/5c420647590aba9a.
Report an issue: GitHub.