Factory Droid: Authentication failed. Please log in using /login
Droid has no session and no API key, which is the normal state on a fresh machine and in scripts that run `droid exec`. The exact message, why Factory Droid prints it, and the fix.
Updated November 23, 2026 · Checked against Factory Droid 0.249.0, reproduced in EnvHaven 1.9.0
The message
Error during droid execution: Authentication failed. Please log in using /login or set a valid FACTORY_API_KEY environment variable.
What it means
Droid has no session and no API key, which is the normal state on a fresh machine and in scripts that run droid exec.
Fix
- Interactive: run
droidand complete/loginin the browser. - Scripts and servers: create an API key in Factory and export it as
FACTORY_API_KEYbeforedroid exec.
In an EnvHaven workspace
Yes, until Droid is signed in once.
Where this comes from
This message was produced by Factory Droid (Factory Droid 0.249.0) itself, in a throwaway EnvHaven 1.9.0 container, on 2026-11-23; the text above is copied from that output.