Atlas throws "CLOUDFLARE_ACCOUNT_ID is missing. Set it with: export CLOUDFLARE_ACCOUNT_ID=<your-account-id>" because the cloudflare loader found no account id in the environment and none in the api auth metadata, and the fix is to run exactly the export command in the message. You can instead re-run atlas auth login for cloudflare so the accountId is stored in auth metadata. Use the 32-character Cloudflare account identifier, not the zone id.
Why does Atlas say CLOUDFLARE_ACCOUNT_ID is missing
Atlas says "CLOUDFLARE_ACCOUNT_ID is missing" because the cloudflare loader reads the account id from 2 places, the environment and the api auth metadata, and neither supplied one. With no account id from either source, the cloudflare provider does not autoload and its getModel throws.
Cloudflare Workers AI requests are addressed per account, so Atlas cannot construct a model without an account id. The cloudflare loader looks in exactly two places: the environment, and the api auth metadata that atlas auth writes. Missing from both means the provider will not autoload, and the error is raised at getModel with the literal export command you need. That message is not generic advice. It is the command, and copying it and filling in your account id is the whole fix in most cases.
How to fix CLOUDFLARE_ACCOUNT_ID is missing in Atlas
Fix "CLOUDFLARE_ACCOUNT_ID is missing" in Atlas by running export CLOUDFLARE_ACCOUNT_ID=<your-account-id> in the shell that launches Atlas, which is the exact command the error prints. Use the 32-character Cloudflare account identifier, or re-run atlas auth login for cloudflare so the accountId is stored in auth metadata.
Two supported sources, one choice. Exporting CLOUDFLARE_ACCOUNT_ID puts the id in the environment where the cloudflare loader reads it, which suits a local shell, a dotfile, or a container environment block. Running `atlas auth login` for cloudflare persists the accountId into the api auth metadata that Atlas manages, which suits people who would rather not carry Cloudflare identifiers in shell config. The cloudflare loader accepts either, so pick one and stay with it. Setting both is not harmful but makes it harder to reason about where the value actually came from.
Account id vs zone id: the mistake that keeps the error alive
The most common reason CLOUDFLARE_ACCOUNT_ID stays broken in Atlas is pasting the zone id instead of the account id. Confirm the value is the 32-character Cloudflare account identifier, not the zone id, because Cloudflare shows both in the dashboard and they look alike at a glance.
Cloudflare surfaces a zone id for each domain and an account id for the account that owns them. Both are long hexadecimal strings, and both are sitting near each other in the dashboard, which is exactly why the wrong one gets copied. Atlas needs the 32-character account identifier. Check the length and check where you copied it from before you conclude the export failed. A wrong-but-present value produces a different failure than a missing one, so if you cleared the "CLOUDFLARE_ACCOUNT_ID is missing" message but Cloudflare Workers AI still does not answer, this is the first thing to re-verify.
How to verify the CLOUDFLARE_ACCOUNT_ID fix worked
Verify the CLOUDFLARE_ACCOUNT_ID fix by restarting Atlas so the provider loader re-reads the environment, then re-selecting the Cloudflare Workers AI model. The loader checks its 2 sources at load time, so an export made after Atlas started, or in a different shell, will not be picked up until a restart.
Restarting is not optional here. The cloudflare provider does not autoload without an account id, and it does not re-check the environment mid-session, so a correct export in the wrong shell produces an identical error and looks like a failed fix. After the restart, select the Cloudflare Workers AI model and send a message. A completion with no "CLOUDFLARE_ACCOUNT_ID is missing" thrown from getModel means the loader now resolves the account id from the env or from auth metadata. Atlas lets you switch the active model and provider on the fly with favorites and recents, so re-selecting the model is a single step.
How to fix it
- 01Export CLOUDFLARE_ACCOUNT_ID exactly as the message shows: export CLOUDFLARE_ACCOUNT_ID=<your-account-id>.
- 02Or re-run `atlas auth login` for cloudflare so the accountId is stored in auth metadata.
- 03Confirm the account id is the 32-character Cloudflare account identifier, not the zone id.
- 04Restart Atlas so the provider loader re-reads the environment, then re-select the Cloudflare Workers AI model.
Frequently asked questions
- How do I set CLOUDFLARE_ACCOUNT_ID for Atlas
- Run export CLOUDFLARE_ACCOUNT_ID=<your-account-id> in the shell that launches Atlas, using the 32-character Cloudflare account identifier, then restart Atlas so the provider loader re-reads the environment.
- Where does Atlas look for the Cloudflare account id
- The cloudflare loader reads the account id from the environment or from the api auth metadata. If neither supplies one, the provider does not autoload and getModel throws with the export command to run.
- Is the Cloudflare account id the same as the zone id
- No. Atlas needs the 32-character Cloudflare account identifier, not the zone id. Both appear in the Cloudflare dashboard and are easy to confuse, and the zone id will not work.
- Can atlas auth login store my Cloudflare account id
- Yes. Re-run `atlas auth login` for cloudflare so the accountId is stored in auth metadata. The cloudflare loader reads it from there as an alternative to the environment variable.
- I exported CLOUDFLARE_ACCOUNT_ID and Atlas still throws the error
- Restart Atlas. The cloudflare provider loader reads the environment at load time, so an export made after Atlas launched, or in a different shell, is not visible to it.
- Why does the Cloudflare provider not load in Atlas
- Without an account id from the env or from api auth metadata, the cloudflare provider does not autoload in Atlas. Supplying CLOUDFLARE_ACCOUNT_ID makes it load and lets Workers AI models resolve.
Try Atlas in your terminal
The terminal-native AI coding agent. Free core, single binary.
Install AtlasRelated guides
Atlas with Claude Opus 4.5: The Price Break Opus in 2026
Claude Opus 4.5 runs Atlas on a 200K context at $5 per Mtok input, $25 per Mtok output, down from $15/$75 on Opus 4.1. Setup, extended thinking, and tradeoffs.
Atlas with Gemma 4 31B IT: Running Google's Open Weights Locally in 2026
Gemma 4 31B IT in Atlas: Google's April 2026 open-weights release with a 262,144 token window, free self-hosted via ollama pull gemma4:31b, or $0.99 / $1.49 on Cerebras.
Atlas with GPT-5.6 Terra: The Mid Tier GPT-5.6 Pick for 2026
GPT-5.6 Terra drives Atlas on a 1,050,000 token context at $2.50 per Mtok input, $15 per Mtok output. Setup, cost math, and when Sol or Luna is the better pick.
Atlas for Dart in 2026
Adopt Atlas, the terminal-native AI coding agent, for Dart development in 2026. Enhance productivity with intelligent code search, refactoring, and robust safety features across your Dart projects.
Run Atlas Headless in CI with Atlas (2026 Workflow)
How to run Atlas headless in CI in 2026: atlas run sends one prompt and exits when the session goes idle, with --format json, --command, and --continue for pipeline steps.
Atlas vs Base44: Terminal AI Coding Agents in 2026
Compare Atlas, the terminal-native AI coding agent, with Base44, the Wix-owned no-code app builder, for developers in 2026. Evaluate features, pricing, and workflow.
Atlas with IBM Granite 4.1 8B in 2026
IBM Granite 4.1 8B in Atlas, 2026: a dense 8B model at $0.05/$0.10 per Mtok with a 131,072 token context where max output equals the full window.
Atlas with Claude Opus 4.1: The Pre Price Cut Opus in 2026
Claude Opus 4.1 runs Atlas on a 200K context at $15 per Mtok input, $75 per Mtok output, with a 32K output ceiling. Setup, cost warnings, and better alternatives.