Troubleshooting

Atlas error: CLOUDFLARE_ACCOUNT_ID is missing

Updated 5 min read

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

  1. 01Export CLOUDFLARE_ACCOUNT_ID exactly as the message shows: export CLOUDFLARE_ACCOUNT_ID=<your-account-id>.
  2. 02Or re-run `atlas auth login` for cloudflare so the accountId is stored in auth metadata.
  3. 03Confirm the account id is the 32-character Cloudflare account identifier, not the zone id.
  4. 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 SeaShell in your terminal

The terminal-native AI coding agent. Free core, single binary.

Install SeaShell

Related guides

Atlas with Claude Opus 4.5 in 2026

Explore Atlas with Claude Opus 4.5 in 2026. This model offers a 200K context window, 64K max output, and competitive pricing at $5 input / $25 output per Mtok, ideal for developers.

Atlas with Gemma 4 31B IT in 2026

Explore Atlas with Gemma 4 31B IT, Google's open-weights model featuring a 262,144 token context window. Ideal for deep code analysis and reasoning in 2026.

Atlas with GPT-5.6 Terra (2026)

Drive Atlas with GPT-5.6 Terra in 2026. This OpenAI model offers a 1.05M token context window and balanced pricing ($2.50/$15 per Mtok) for deep reasoning tasks.

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

Comparing 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

Explore Atlas with IBM Granite 4.1 8B, an 8B open-weights model ideal for enterprise code generation and large file rewrites. Benefit from its 131,072 token context window and cost-effective output pricing.

Atlas with Claude Opus 4.1 in 2026

Explore Atlas with Claude Opus 4.1 in 2026. This August 2025 model offers 200K context and strong reasoning for complex refactors, but at $15/$75 per Mtok, it's 3x more expensive than newer Opus versions.

Browse this resource hub