Egor Urvanov

Codex CLI not available in your countrySupported countries, VPN and bans

Codex is officially unavailable in Russia: Russia is not on OpenAI's supported-countries list, and access outside it “may result in your account being blocked or suspended”. Codex CLI signs in through ChatGPT or an API key. No separate Codex regional rules were found, VPN is not mentioned, but bypassing restrictions and protective measures is forbidden.

Quick answer

Access to Codex is set by OpenAI's general list of countries for ChatGPT and the API. Russia is not on it.

Russia123456789101112131415On the OpenAI list — almost the whole worldFor example Kazakhstan, Georgia, Armenia, Uzbekistan.Dots — small countries on the listToo small to see their outline on the map.Only on the OpenAI listAnthropic has no entry for these.8Afghanistan9Myanmar10Yemen11GreenlandPartly — UkraineThe list entry reads “Ukraine (with certain exceptions)”.Orange — not on the listRussia (large label on the map). Orange dots: Hong Kong, Macao, Kosovo.1Belarus2China3Iran4Syria5North Korea6Cuba7VenezuelaGrey — disputed territoriesThe list has no separate entry, so no conclusion about access can be drawn.12Western Sahara13Northern Cyprus14Somaliland15Falkland Islands

Blue: the country is on the OpenAI list. Orange: the country is not on the list, with Russia in the stronger tone.

What this means in plain words

OpenAI is the company that makes ChatGPT and Codex. Codex is an agent for programmers: it works in the terminal and in an app, reads the files of a project and edits code for the task you give it. OpenAI publishes a list of countries where its services are available. If your country is on the list, the regional rules do not get in your way. If it is not, access can end with the account being blocked. OpenAI does not explain why it is built this way. In my own guess, it is company policy plus the risk of sanctions, export controls and laws of the United States and other countries.

Everyday example. Dana lives in Almaty and wants to try Codex. She opens the OpenAI list and finds the line “Kazakhstan”. The entry has no brackets and no reservations, so nothing in the region stands in the way. What remains is the ordinary part: sign in to a ChatGPT account or create an API key and choose a payment method. A person who is physically in Russia will not find such an entry.

A common mistake is to assume that Codex lives by separate rules because it runs in the terminal and installs with one command. There is no separate country list for Codex, either on OpenAI's public pages or in the program's repository. Codex sign-in points to the general ChatGPT and API list. The second mistake concerns VPN, a program that replaces the address from which you reach the network. VPN is not mentioned in the country help or in the terms of use. The terms forbid circumventing restrictions and protective measures, and replacing an address may fall under that; this conclusion is mine, OpenAI has made no direct statement about it.

You can check the answer in a minute: open the OpenAI page with the list of supported countries and find your country with the browser's page search. The help center at help.openai.com does not open for automated requests (error 403), so the rows of the list were checked on the developers.openai.com page.

QuestionAnswerStatus
🇷🇺 Russia on the OpenAI country listnoconfirmed
A separate country list for Codexnot found on public pages or in the repositorynot found
Sign-inChatGPT account or API keyconfirmed
VPN in the terms and in the country helpnot mentionednot found
A ban on circumventing restrictions and protective measurespresent in the termsconfirmed

Date checked: 18.11.2026. The article retells official documents and contains no ways to bypass restrictions.

OpenAI country list

OpenAI keeps one list for ChatGPT and the API and publishes no separate list of unavailable countries. What the list does not name is unavailable.

The country list is an OpenAI page that names the places where ChatGPT and the API can be used. Codex belongs to the same set: it connects either through a ChatGPT account or with an API key, so both ways of signing in run into this list. There is no separate page called “countries where Codex is closed”. So the absence of a country from the list is the only signal that access is closed. on the listoff the listOpenAI country listCodexnot available there● model, people, systems, data  ● agent and harness  ● risk, stop, boundary

The list works as one gate for ChatGPT, the API and Codex: a country on the list passes, a country outside it is stopped.

How to read an entry

Most entries in the list are a single word: “Armenia”, “Georgia”, “Kazakhstan”. Such an entry means the whole country is supported. Some entries carry a reservation. The most visible one is “Ukraine (with certain exceptions)”. I will take it apart. “Ukraine” names the country. The brackets with “with certain exceptions” mean that part of the territory is excluded. Which places are excluded is not named in the entry on the OpenAI page, and there is no list of exceptions on OpenAI's public pages. For comparison, Anthropic names the excluded regions of Ukraine one by one, while OpenAI has no such list in the entry. A practical rule follows: if your country is written with brackets, the single word from the list is not enough, and you will have to clarify the answer with OpenAI support.

Everyday example. Arsen lives in Yerevan and is building a team with colleagues from Armenia, Georgia and Ukraine. He opens the list and finds “Armenia” and “Georgia” without brackets: for people located in those countries there are no questions. He reads the entry “Ukraine (with certain exceptions)” more carefully and asks a colleague from Kyiv to write to OpenAI support to find out whether his city falls under the exceptions. You can check it yourself like this: find the country with the page search and see whether brackets follow the name.

CountryOpenAI (ChatGPT and API)
Russia, Belarusnot on the list
China, Hong Kong, Macaonot on the list
Iran, Cuba, North Korea, Syrianot on the list
Kazakhstan, Georgia, Armenia, Uzbekistanon the list
Ukraineon the list “with certain exceptions”

Rows checked on 18.11.2026 against the list on developers.openai.com. Before deciding, open the OpenAI page and find your country: the list changes.

Takeaway
In this exampleThe country is not named in the list: so there is no access to Codex through ChatGPT and the API there.
In generalOpenAI writes “not available there” about the API, and the terms warn of an account block for access outside the list. There is no exception for Codex on public pages.
Next stepBefore installing, find your country on the OpenAI page. If it is missing, treat access as closed.
How the OpenAI list differs from the Anthropic list

Anthropic, the company that makes Claude Code, has a list of its own, and it does not fully match OpenAI's. Russia, Belarus, China, Iran, Cuba, North Korea and Syria are on neither. Afghanistan, Myanmar and Yemen are on the OpenAI list and missing from Anthropic's. So a country check for one agent does not replace the check for another: open the list of the one you plan to install. Neither company explains the differences.

How Codex signs in

The Codex sign-in documentation points to the general list of countries and contains no regional restrictions of its own.

Sign-in is the way Codex proves to OpenAI's servers that requests come from your account. There are two ways, and each is tied to its own billing. Signing in with ChatGPT uses a ChatGPT subscription: you pay a fixed amount and use the agent within its limits. Signing in with an API key uses a programmatic key: you pay API rates for actual use. Both paths sit behind the same gate with the country list, and which one to choose depends on how you pay and what you need. Cloud Codex (Codex cloud), where the agent runs on OpenAI's servers, requires signing in with ChatGPT, and an API key does not work for it. youChatGPT accountAPI keyCodex~/.codex/auth.jsonsystem storewhere sign-in data lives● model, people, systems, data  ● agent and harness

Two sign-in paths: ChatGPT (subscription) and API key (pay per use). The sign-in data lives on your computer, in a file or in the system storage.

The program caches the sign-in data on the device. It lies in the file ~/.codex/auth.json or in the operating system's password storage. The mode is set by the parameter cli_auth_credentials_store with four values: file, keyring, auto and ephemeral. The file with the sign-in data is equivalent to a key to the account. Whoever copies it can use your account, and OpenAI's terms forbid sharing sign-in data and making an account available to others.

Sign-in with ChatGPTSign-in with an API key
PaymentChatGPT subscriptionAPI rates
Codex cloudthis way is requireddoes not work
Where sign-in data is storedin the file ~/.codex/auth.json or in the system storage; the mode is set by the parameter cli_auth_credentials_store (file, keyring, auto, ephemeral)
Regional checknot described on the sign-in page; the general country list applies
An end-to-end situation

Nika lives in Tbilisi and installs Codex on her work laptop. She launches the program and picks sign-in with ChatGPT, because she already has a subscription. The sign-in data is saved on the laptop. Her country is on the list as “Georgia”, without brackets, so there are no questions about the region. A week later she decides to use cloud Codex and finds out that it needs exactly the ChatGPT sign-in: the API key her colleague uses does not work for the cloud. To check how the program signed in, you can ask the agent itself: a ready prompt is at the end of the article.

What the servers check at sign-in

What OpenAI's servers actually check at sign-in is not described on public pages: the connection address, payment details, a phone number or all of them together. This is not confirmed. So the article makes no claim about the signal by which OpenAI would determine that you are outside the list. All that is known is that no regional checks are described at sign-in, and it points to the general list.

VPN: what is said and what is not

The terms for individuals (effective 1 January 2026) speak of “restrictions” and “protective measures” in general. VPN and region are not mentioned in them.

VPN is a program that replaces the address from which a site sees your connection. People install it for privacy on a public network or for access to a corporate network. OpenAI is silent about VPN in its documents, so I separated three things: what is written word for word, what follows from the terms and what remains opinion. This shows where the rule is and where the rumor is. the word “VPN”help pages and termscircumventing limitsand safeguards?a direct answer“allowed” or “banned”not in the textprohibitednot found● model, people, systems, data  ● risk, stop, boundary

OpenAI's documents say little about VPN: VPN is not mentioned, while circumventing restrictions and protective measures is forbidden.

Word for word, the documents contain the following. VPN is not mentioned in the country help or in the terms of use. The terms forbid circumventing limits, restrictions and protective measures. They also forbid passing the account to others and using the services in countries under a US embargo. Neither “VPN is allowed” nor “VPN is forbidden” appears in these documents. Any conclusion either way remains an interpretation of the text. Circumventionof limits and safeguardsAccount handovergiving it to another personUS embargocountries and restricted personsRule breakingof the terms and policies● model, people, systems, data  ● agent and harness  ● risk, stop, boundary

Four bans in OpenAI's terms: circumventing restrictions and protective measures, passing the account to others, use in countries under a US embargo and breaking the terms.

Four bans in the terms relate to the topic of access, and each can be read as a separate rule.

  1. 1
    Circumvent restrictions and protective measures
    Interfering with the services is forbidden, including circumventing limits, restrictions and protective measures. A regional check may count as such a measure, but the terms do not name it.
  2. 2
    Pass the account to others
    Sharing sign-in data and making the account available to anyone else is not allowed. Responsibility for everything that happens under the account stays with the owner.
  3. 3
    Use the services in countries under a US embargo
    The services may not be used in a country or territory under a US embargo, or for the benefit of persons with whom dealings are prohibited by trade laws.
  4. 4
    Break the terms and usage policies
    For breaking the terms or the Usage Policies OpenAI may suspend or close access. OpenAI draws the same conclusion in case of risk of harm and when the law requires it.
WhatPresent in the documents
VPN in the country helpnot mentioned
VPN in the terms of usenot mentioned
A ban on circumventing “restrictions” and “protective measures”yes
A ban on passing the account to othersyes
A ban on using the services in countries under a US embargoyes
“VPN is allowed” or “VPN is forbidden” word for wordneither: any such conclusion is an interpretation with no quotation behind it
Takeaway
In this exampleNeither a permission nor a ban on VPN can be derived word for word from the documents.
In generalOpenAI's criterion is the list of countries where the services are offered, together with the ban on circumventing restrictions. How OpenAI applies this in practice was not found in open sources.
Next stepDo not decide from retellings on forums. Read the terms and the country list on OpenAI's pages and, when in doubt, write to OpenAI support.
Common misconceptions

Since VPN is not mentioned in the terms, is it allowed? The absence of a mention permits nothing. The ban on circumventing restrictions and protective measures is worded in general terms, and replacing an address may fall under it. How to check: find the phrase about “circumvent any rate limits or restrictions” in OpenAI's terms of use and read it in full.

Do the terms forbid VPN outright? VPN is not mentioned in them. People derive a ban on bypassing the region from the general ban on circumventing protective measures, but such a derivation is an interpretation with no quotation behind it.

Does a paid subscription give the right to access from any country? The terms and the help name the list of countries as the criterion, and pricing plans are not mentioned among the criteria. A ChatGPT subscription and an API key stand behind the same gate. How to check: read the first sentence of the page with the list.

If the country is on the list, can you stop worrying about VPN? The ban on circumventing protective measures is written in the terms for all users, and the country list does not cancel it. The country help also has a reservation about the device: the error “OpenAI's services are not available in your country.” can appear even in a supported country. The conditions for its appearance are not described in the help, so it is worth asking support.

Is it simpler with Claude Code? Anthropic does not mention VPN in its region rules either, but the Claude Code documentation has its own wording on the program's compatibility with VPNs. The wording differs between the companies and the logic is similar: a list of countries plus a general ban on circumventing protective measures. A detailed analysis for Claude Code is in a separate article.

The decision about risk stays with you. I do not describe or recommend ways to connect: on this topic I have only the wording of the terms.

Bans and their causes

A ban is the suspension or closure of an OpenAI account, after which sign-in to ChatGPT, the API and Codex stops working. OpenAI's terms name three grounds, and one of them is a breach of the terms or the usage policies.

The grounds are written in the terms of use for individuals (Terms of Use, effective 1 January 2026) and in the help article on the country list. The terms give three grounds: a breach of the terms themselves or of the Usage Policies, a legal requirement, and a risk of harm to OpenAI, other users or anyone else. A fourth ground sits in the help article on the country list: access to the services outside the listed countries “may result in your account being blocked or suspended”. 1. A grounda terms violation2. Access closedsuspended or closed3. Appealthrough support?not on the public pages: response times, outcome● model, people, systems, data  ● risk, stop, boundary

The path in the diagram: a ground, then suspension or closure, then an appeal through support. OpenAI makes the decision, and the person is left with a request to support; the terms promise no outcome.

How quickly a ban arrives and what it looks like on screen is not described on OpenAI's public pages: I found nothing. They say only that the right to suspend or terminate access belongs to the company, and that an appeal can be filed if the decision was a mistake.

Causes according to the documents
CauseWhat is said
Access outside the country listthe account may be blocked or suspended: «Accessing or offering access to our services outside of the countries and territories listed below may result in your account being blocked or suspended.»
Breach of the terms or usage policiesOpenAI may suspend or terminate access (the quote is at the start of the chapter)
Error in some regionthe error text in the country help article: «OpenAI's services are not available in your country.» The article adds that the error is possible even in a supported country after a device was used in an unsupported region
Appealthrough support

Another provision of the terms concerns responsibility: an account cannot be passed to others, and the owner is responsible for everything that happens under it. So someone else's account, or shared access inside a team, remains a ground for restriction even if the country is on the list.

Appeal step by step
  1. 1
    Support
    write to OpenAI support and state that, in your view, the ban is a mistake
  2. 2
    Details
    attach the date, the country you signed in from, the error text and copies of the emails
  3. 3
    Waiting
    wait for a reply: the terms give no deadlines and no chance of success

The public pages have no appeal form with a name, no address and no review deadlines, so the steps contain only what the terms say: a request to support. An appeal fixes a mistake, but the ground named in the help article stays the same while a person keeps using the service from a country outside the list. This is my reading of the terms and the help article; OpenAI makes no such comparison.

A running example
  1. 1
    Oleg lives in Russia and wants to try Codex
    He installs the program, tries to sign in and sees the text “OpenAI's services are not available in your country.” Russia is absent from OpenAI's country list, and the terms warn of a block or suspension of the account for access outside the list. Which check actually fired, the address, the phone number or the payment details, is not described on the public pages. An appeal through support is possible, but it does not put the country on the list. To check it yourself: open OpenAI's country list, find Russia in it and compare the result with the error text from the help article.

Common misconceptions

Are bans given only for breaking the terms? No: the terms have two more grounds, a legal requirement and a risk of harm, and the country help article separately names access outside the list.

Does an appeal bring access back? The terms say only that an appeal can be filed through support. They promise no result.

Are the causes of an OpenAI ban fully listed in the help center? OpenAI's separate help article on the causes of account bans is closed to automated checking (error 403), so I do not retell its provisions. The business terms, the Service Terms and the Usage Policies are closed in the same way. For organizations these documents have to be read separately on openai.com and help.openai.com.

Boundary of knowledge: what the terms for individuals and the country help article say is confirmed. What lies in the closed documents is not confirmed.

What Codex sends to the server

Requests to the model always go to the server, otherwise the agent does not work. The other flows (analytics, metrics, feedback submission) are switched off in config.toml, and the text of prompts reaches OpenTelemetry logs only with explicit consent.

I based this on the source code of Codex CLI (commit 8011b92 of 18.11.2026) and on OpenAI's settings page. Codex is a coding agent: it works in the terminal and in the app and constantly talks to the server. Some data is needed for the work, some is collected on top. The needed data is your requests to the model and its replies. The extra flows are analytics of Codex products, metrics, and feedback sent by the /feedback command. Telemetry is the automatic sending of information about how the program runs: how long an action took, whether an error occurred. OpenTelemetry is an open standard for such information. CodexOpenAIserverrequests to the model — alwaysanalyticsmetrics/feedbackon by defaultconfig.tomlturn them off hereprompt texts in OpenTelemetryonly with explicit consent● model, people, systems, data  ● agent and harness  ● risk, stop, boundary

Requests to the model always go out. Analytics, metrics and /feedback are switched off by settings. Prompt text goes into OpenTelemetry only with consent.

What is sent when enabled
WhatDefaultHow to turn off
OpenAI analytics in Codex productson in the release build[analytics] enabled = false
OpenTelemetry metrics (built-in exporter)on, follow the analytics setting[otel] metrics_exporter = "none"
Feedback submission through /feedbackon[feedback] enabled = false
Prompt text in OpenTelemetry logsoff, explicit consent neededno need to enable

The first two rows are linked: by default the built-in metrics exporter follows the analytics setting. Feedback submission stands apart: nothing is sent until the person runs /feedback. The last row shows the only flow that is off by default.

Settings in config.toml

Codex config.toml

[analytics]
enabled = false

[otel]
metrics_exporter = "none"

[feedback]
enabled = false

The settings schema in the repository clarifies: with analytics enabled = false, the program's own OTLP exporters stay on, and to switch metrics off you need metrics_exporter = "none". What exactly OpenAI stores from the code and requests, and for how long, is not found on the public pages for Codex CLI: not confirmed.

These settings concern data collection. They have no effect on the country list: switched-off analytics does not make use from a country outside the list permitted.

A running example
  1. 1
    Timur lives in Tashkent and writes code for a client
    Uzbekistan is on OpenAI's country list, so he signs in to Codex through his ChatGPT account. The client asks him not to send anything extra. Timur opens config.toml and writes three blocks: analytics off, metrics off, feedback submission off. Requests to the model keep going out, because the agent's work depends on them. To check it yourself: ask the agent to show the values of the three settings and make sure each one is set to off.

Common misconceptions

Does turning off analytics stop requests to the model from being sent? No: requests and replies always go to the server, this is the basis of the agent's work.

Is the single line [analytics] enabled = false enough? The settings schema clarifies that the program's own OTLP exporters stay on in that case, and metrics are fully switched off by metrics_exporter = "none".

Does everything the agent recorded locally go to the server? No: in the Codex CLI code, local databases in the ~/.codex directory (session history, logs) are always written, but no network code that syncs them was found. The exception: logs from them can go out when /feedback is submitted, and only by the person's decision.

Access: Codex and Claude Code

For both agents sign-in is tied to the country list of the company behind it, and Russia is on neither. The criteria of the lists differ: for OpenAI it is the countries where the services are offered, for Anthropic it is also the person's physical location, the company's registration and who owns the company.

Claude Code is Anthropic's coding agent, and it also works in the terminal. The comparison helps when a person chooses between two agents and wants to know whether access works the same way for both. It is the same in the main point: both companies publish a country list, and outside the list access is not offered. What differs is what exactly is checked and what the list covers. CodexClaude CodeOpenAI listAnthropic listplace · registration · ownersonly on OpenAIAfghanistan · Myanmar · YemenRussiaon neither list● model, people, systems, data  ● agent and harness  ● risk, stop, boundary

Two entrances: the OpenAI list and the Anthropic list. Russia is absent from both, and the criteria of the lists differ.

Summary table
Codex (OpenAI)Claude Code (Anthropic)
Russia on the listnono
What the list coversChatGPT and the API; no separate rule for Codexapps, including Claude Code, and the API
Criterionlist of countries where the services are offeredphysical location, registration and who owns the company
VPN in the region policynot mentionednot mentioned
Sign-inChatGPT or an API keya Claude subscription or a Console account
Differences between the listsAfghanistan, Myanmar and Yemen are on OpenAI's list and not on Anthropic's

Three rows of the table need an explanation. In the coverage row, OpenAI has one list for ChatGPT and the API, and Codex gets no rule of its own, while Anthropic's list names the apps directly, Claude Code among them. In the criterion row, Anthropic checks three signs, so a company from an unsupported region is closed out even if its employees are in a listed country. OpenAI's country list has no such signs for companies. The last row is the difference by country: Afghanistan, Myanmar and Yemen are named on OpenAI's list and absent from Anthropic's.

The analysis for Claude Code, with install errors, phone verification and payment, is in a separate article on regions, VPNs and bans.

Frequently asked questions

Does Codex work in Russia?

Officially no: Russia is not on OpenAI's list of supported countries for ChatGPT and the API, and the public pages have no separate rules for Codex. Source: help.openai.com/en/articles/7947663 and developers.openai.com/api/docs/supported-countries. Date checked: 18.11.2026.

Can I use Codex through a VPN?

VPN is not mentioned in the terms or in the country help article. A VPN is a program that replaces the address from which you reach the network. The terms forbid getting around restrictions and protective measures, and OpenAI warns of an account block for access outside the list. The documents give no clear answer, so the decision is yours and at your own risk. Source: openai.com/policies/row-terms-of-use. Date checked: 18.11.2026.

Why does OpenAI ban accounts?

What is confirmed: access outside the country list, a breach of the terms or usage policies, a legal requirement and a risk of harm. Check the separate help article on the causes of bans by hand on help.openai.com. An appeal goes through support. Date checked: 18.11.2026.

How do I turn off analytics in Codex?

In config.toml add [analytics] enabled = false, [otel] metrics_exporter = "none" and [feedback] enabled = false. The first two switch off built-in analytics and metrics, the third turns off feedback submission. Requests to the model keep going out. Source: learn.chatgpt.com/docs/config-file/config-reference. Date checked: 18.11.2026.

How does OpenAI's country list differ from Anthropic's?

The criteria differ. For OpenAI it is the countries where ChatGPT and API services are offered. For Anthropic it is also the person's physical location, the company's registration and who owns the company. Afghanistan, Myanmar and Yemen are on OpenAI's list and not on Anthropic's. Date checked: 18.11.2026.

What should I do if the country is on the list but sign-in does not work?

Write to OpenAI support and attach the error text: the country help article says the error is possible even in a supported country after a device was used in an unsupported region. An appeal against a ban goes through the same support. Date checked: 18.11.2026.

Prompts for the agent

Three ready-made prompts that change nothing without your confirmation.

The first prompt only reads: it shows three data-collection settings. The second shows how Codex signed in, through ChatGPT or an API key, and where the sign-in data lives. The third writes to the settings file, so the agent first shows a diff, that is, the difference between the old and the new file, and waits for confirmation.

1. Which data-collection settings are set

Show which analytics, otel and feedback settings are currently set in the Codex config.toml. Change nothing.

2. How Codex signed in

Show how Codex is currently signed in for me: through ChatGPT or an API key, and where the sign-in data lives.

3. Turn off extra data sending

Add the blocks [analytics] enabled = false, [otel] metrics_exporter = "none" and [feedback] enabled = false to config.toml. First show the diff and wait for my confirmation.

The first and second prompts only read. The third writes to the settings file, so look at the diff before it is written.

Based on OpenAI's country lists and terms, the Codex documentation and the Codex CLI source code. Date checked: 18.11.2026. Country lists change; open the primary source before deciding.
© 2026 Egor Urvanov