JetBrains shipped Codex inside PyCharm on January 22, 2026. It’s a third-party coding agent from OpenAI that lives in the AI Chat of JetBrains AI Assistant, and it needs PyCharm 2025.3 or later. Once it’s running, it edits project files and runs commands, and it reviews code too, all under approval rules you set.
How you sign in matters more than you’d expect. JetBrains’ AI Assistant documentation (October 2026) states that the chosen method handles both request processing and billing. A ChatGPT account activates the agent only, while a JetBrains AI subscription or an OpenAI API key also unlocks other AI Assistant features.
Guides written in 2025 that report no official integration are out of date.
What is PyCharm Codex, and which versions include it?

JetBrains announced the integration on January 22, 2026. You need PyCharm 2025.3 or later and a current AI Assistant plugin, and Codex then shows up in the agent picker next to Junie, Claude Agent and GitHub Copilot.
Inside AI Chat it answers questions about your repository, reviews code, and edits files or runs commands when you allow it.
The launch build ran on GPT-5.2-Codex, according to InfoWorld’s January 2026 report.
JetBrains named Codex the recommended agent in AI Chat in June 2026, after testing agents on 225 Java, 38 C# and 90 Python tasks (JetBrains AI blog).
The post pairs that pick with GPT 5.6 Luna at medium reasoning, and JetBrains says it will update the recommended setup if a better model version proves itself.
Guides written in 2025, including one from eesel, say no official Codex integration exists for PyCharm. They were accurate then and have been wrong since January 22, 2026.
On licensing, PyCharm is now one unified product, with core features free and Pro behind a subscription (JetBrains PyCharm Help). AI Assistant needs unified PyCharm 2025.1 or later, and Codex needs 2025.3.
The ChatGPT account and API key routes list no JetBrains AI subscription requirement.
How to set up PyCharm Codex
Setup is quick. Install the AI Assistant plugin, select Codex in AI Chat, accept the install prompt, then sign in. The method you sign in with also decides who bills you and which other AI features stay available.
Which sign-in method should you pick?
The chosen method handles both request processing and billing, so the table below is worth a look before you click anything.
| Sign-in method | What you need | What it unlocks | Who bills you |
|---|---|---|---|
| JetBrains AI subscription | A JetBrains AI plan or trial | All AI Assistant features and other integrated agents | JetBrains AI quota (AI Credits) |
| ChatGPT account | A ChatGPT login (browser or device code) | Codex only | Your ChatGPT plan |
| OpenAI API key | A key issued by OpenAI | Codex plus features the OpenAI models support | OpenAI API usage |
If you already pay for ChatGPT and want only the agent, the ChatGPT account route is enough. It unlocks nothing else in AI Assistant.
PyCharm 2026.2.1 added a Jupyter notebook skill and an agent environment coordinator. JetBrains’ release notes describe both as skills for agents such as Claude Code and Codex and do not tie them to a particular sign-in route (JetBrains blog, August 2026). If notebooks and virtual environments are your daily work, confirm both skills appear on the route you use before you count on them.
API keys come with a hard limit. Codex accepts only keys issued directly by OpenAI, so keys from a third-party gateway won’t work, even when they reach OpenAI models.
To switch methods later, revoke the current one under Settings | Tools | AI Assistant | Providers & API keys and start a new chat. Existing chats keep the old method.
Install and start Codex in PyCharm
- Update PyCharm to 2025.3 or later.
- Install the AI Assistant plugin: click Install Plugin in the AI Chat tool window, or search for AI Assistant in Settings | Plugins | Marketplace.
- If you use a JetBrains AI subscription, select Log in with JetBrains AI subscription in AI Chat and sign in to your JetBrains Account first.
- Select Codex in the AI Chat agent picker and send any message to trigger activation.
- Click Install and Continue to accept the terms and install the agent.
- Choose JetBrains AI, ChatGPT (or ChatGPT device code), or API Key at the authentication prompt. For API Key, pick OpenAI as the provider, paste the key and click Test Connection.
- Open Settings | Tools | AI Assistant | Providers & API keys. The Agent Authorization section shows the active method.
- Start in Read-only mode with a small question about one file before you allow edits.
The plugin is not bundled with PyCharm and is disabled by default, apart from organization setups, according to JetBrains’ install page (September 2026). Third-party setup guides, such as Kumo’s, treat the plugin as something to confirm is enabled, so trust the JetBrains page for the default state.
New users without a JetBrains AI subscription are eligible for a 30-day AI Pro trial, which JetBrains links to your account and activates automatically.
Codex runs in Read-only, Workspace access, Auto review or Full access mode. On top of that sit the Default and Plan collaboration modes and a picker for model and reasoning level. Earlier JetBrains docs listed Agent and Agent (full access), but the October 2026 page uses the current names.
Operation modes and approvals
- Read-only asks for approval before it edits files or reaches the internet.
- Workspace access lets Codex edit inside the project, and it asks before touching anything outside it or using the network.
- Auto review only interrupts for actions that look potentially unsafe.
- In Full access, Codex edits files anywhere on the machine and has unrestricted internet access.
Certain sensitive actions can still require explicit approval, even in the looser modes.
When an approval prompt appears, you can answer Allow Once, Allow for Session, Allow Commands Starting With (a command prefix), or Reject.
Click a changed file to review the diff, and roll back one file or all changes from the changed-files pane.
Plan mode proposes an implementation plan without changing anything, which suits an unfamiliar Python repository. Start in Read-only or Workspace access, and keep Full access for throwaway environments because it lifts both the file and network limits.
Models and reasoning level
The model story changed a lot during 2026, and the sources don’t agree on a single name.
- At launch in January 2026 it was GPT-5.2-Codex (InfoWorld).
- In June 2026 JetBrains recommended GPT 5.6 Luna at medium reasoning (JetBrains AI blog).
- By October 2026, OpenAI’s documentation pointed to GPT-6.1 Sol and GPT-6 Luna as the recommended Codex models.
OpenAI’s models page also retires GPT-5.5 from ChatGPT sign-in on October 14, 2026 and marks gpt-5.2 and gpt-5.3-codex as deprecated there. The GPT-5.5 retirement does not apply to the OpenAI API.
OpenAI says availability depends on the rollout, your sign-in method and your client, so the model picker in your own build is the reference, not a guide.
Higher reasoning levels improve results on complex tasks and take longer. Fast mode speeds up output without switching to a smaller model, costs more per response, and is not supported by every model (JetBrains Help).
How PyCharm Codex works with a Python project
Your open file and selection go to Codex automatically, and it reads AGENTS.md from the project root. Anything further has to come through @ attachments, skills and MCP servers. PyCharm 2026.2.1 added two Python-specific skills on top, one for notebook access and one for environment selection.
What Codex sees in the editor
- The file open in the editor and any selected text get attached to each prompt while IDE context is on.
- Nothing else goes along unless you attach it with @, so other open files, recent edits and wider project context are not added.
- A context indicator shows the share of the model’s window used, plus the token count.
- A toggle in the chat input switches automatic context on or off.
Once the window fills, the agent can lose track of earlier parts of the session, so start a fresh chat for each new task.
There’s also a gap around .aiignore. Codex does not honor AI Assistant’s .aiignore rules, so files listed there can still reach it (JetBrains Help). Keep secrets out of the open project, or leave Codex off for repositories that depend on .aiignore.
Instructions, skills and MCP tools
Kumo’s setup guide for its KumoRFM coding agent shows the pattern. Codex reads AGENTS.md on its own, and the guide installs its skills with $skill-installer inside the chat.
| Mechanism | Where it lives | How Codex uses it |
|---|---|---|
| AGENTS.md | Project root | Read automatically as standing instructions |
| Skills | Codex environment | Added with $skill-installer or $skill-creator, listed with /skills |
| MCP servers | Settings | Tools |
Typing / lists the supported slash commands for session status and configuration. MCP tools do not show up in that menu, and Codex only sees them after you turn on Pass custom MCP servers under Tools | AI Assistant | Agents.
Notebooks and Python environments
PyCharm 2026.2.1 (August 12, 2026) gave AI agents two skills built for Python work.
- The Jupyter notebook skill lets the agent create, edit and run .ipynb notebooks through PyCharm’s notebook model and a live kernel, so variables and data persist across cells.
- The agent environment coordinator hands the agent your configured interpreter and tool (uv, Poetry, pip in a venv, or conda), so installs land in the project environment instead of the system one.
JetBrains’ release notes name Codex among the agents these skills serve and state no sign-in requirement. Check that they work on the ChatGPT or API key route you use before you rely on them.
Kumo’s Jupyter-in-PyCharm guide adds a practical caveat. Save the notebook before Codex edits it, or PyCharm can keep your unsaved version and treat Codex’s edits as the previous file version.
Revert File refreshes the notebook view when the changes do not appear.
How much does PyCharm Codex cost?
PyCharm Codex has no license fee of its own. What you pay depends on the sign-in route: AI Credits, a ChatGPT plan allowance, or per-token API rates.
The personal plan figures below come from JetBrains and OpenAI documentation, 2026.
- AI Free gives 3 AI Credits per 30 days, and it is not offered in PyCharm Unified when it is used for free.
- AI Pro costs $10 for 10 AI Credits per 30 days.
- AI Ultimate costs $30 for 35 AI Credits per 30 days.
- Top-up AI Credits stay valid for 12 months and are spent only after the monthly quota is gone.
- ChatGPT Plus runs $20 a month, with OpenAI’s estimate of 15 to 160 local GPT-6.1 Sol messages per five-hour window.
The JetBrains AI route
JetBrains documents the credit quota but no fixed price per Codex task. Usage is calculated per interaction from the tokens in your input and the agent’s response, so the same prompt costs more deep in a long session than in a fresh one.
The January 2026 launch promotion made Codex free through JetBrains AI until each user’s promotional credits ran out, and JetBrains reserved the right to cancel it. Current JetBrains documentation does not mention the promotion, so budget as if every request draws on your quota.
The quota resets 30 days after you first used your license, not on the first of the month.
ChatGPT plan or API key
With a ChatGPT account, Codex draws on your plan’s allowance, which Codex cloud chats and other agent features share. Plus and Pro users who hit the limit can buy credits instead of upgrading. Fast mode counts 2.5x against included usage (OpenAI pricing page).
An OpenAI API key means you pay per token at standard API rates, and the available models follow whatever the API offers your key.
A plan puts a ceiling on routine use, while an API key bills every token.
What drains the quota fastest
- One long chat reused across unrelated tasks, because its context keeps growing
- Models with higher token costs
- Extended agent sessions compared with one-off chat questions
JetBrains’ own fix list is short: open a new chat for each unrelated task, pick cheaper models, and move heavy agent work to AI Ultimate.
OpenAI adds two levers for ChatGPT-plan users. Trim AGENTS.md and turn off MCP servers you are not using, since each one adds context to every message.
PyCharm Codex vs Codex CLI, Junie and Claude Agent
Use PyCharm Codex when you want agent edits reviewed inside the editor, and the Codex CLI when you need a custom model provider or scripted runs. Junie and Claude Agent fit projects whose rules or instruction files differ from Codex’s.
PyCharm Codex or Codex CLI?
Go with PyCharm Codex if you’d rather review edits in the editor’s own diff view, or if you sign in with a JetBrains AI subscription or a plain ChatGPT account.
The Codex CLI is the better pick when your OpenAI traffic runs through a gateway or Azure, because config.toml accepts custom model providers on Responses API endpoints. It also suits scripted runs with codex exec, which works non-interactively, and pinning a model per run with the –model flag.
OpenAI’s documentation adds one limit for gateways: an endpoint that only speaks Chat Completions does not work with current Codex releases.
The CLI runs in any terminal, including PyCharm’s built-in one, so the two are not exclusive.
Junie, Claude Agent and GitHub Copilot
- Junie is JetBrains’ own agent. It signs in with JetBrains AI or an OpenAI or Anthropic API key, reads AGENTS.md, and respects .aiignore.
- Claude Agent comes from Anthropic and signs in with JetBrains AI, an Anthropic key or Anthropic Console. It reads CLAUDE.md instead of AGENTS.md.
- GitHub Copilot signs in through a GitHub account only and does not work in Remote Development sessions.
Codex and Junie both read AGENTS.md from the project root, so one instruction file serves both. Of Junie, Claude Agent and Codex, only Junie honors .aiignore (JetBrains Help, October 2026).
Beyond JetBrains’ default pick, no primary source ranks these agents against each other, and forum opinions are not evidence.
Connecting other agents through ACP
The Agent Client Protocol (ACP) is the standard interface AI Assistant uses for external agents. InfoQ’s February 2026 coverage says Zed Industries initiated it and JetBrains now supports it.
Registry agents install from AI Chat with no extra setup. Custom agents go into ~/.jetbrains/acp.json, with a command, arguments and environment variables for each entry (JetBrains Help, July 2026).
- No JetBrains AI subscription required
- Not supported in Windows Subsystem for Linux
- Administrators of centrally managed organizations can restrict the registry and block custom agents
When PyCharm Codex does not work
Most failures trace back to out-of-date builds, quota, credit accounting on the ChatGPT route, or settings PyCharm doesn’t read.
| Symptom | Likely cause | Fix |
|---|---|---|
| Codex missing from the agent picker | IDE older than 2025.3 or an outdated AI Assistant plugin | Update PyCharm, then click Update AI Assistant in the plugin notification |
| Selected text not reaching Codex | A bug in builds before 2026.1.1 (JetBrains support reply, May 2026) | Update to 2026.1.1 or later |
| Cloud AI features stop on the JetBrains AI route | Monthly quota used up | Wait for the reset, buy top-up credits, or sign in with ChatGPT or an API key |
| AI Credits drop while signed in with ChatGPT | Known bug tracked as LLM-24506 | Watch the JetBrains AI widget and check the issue’s status |
| Azure or gateway settings have no effect | The PyCharm agent does not appear to read config.toml | Use the Codex CLI for those setups |
Where the sources disagree on config.toml
OpenAI’s documentation says the ChatGPT desktop app, Codex CLI and IDE extension all read one shared config.toml (OpenAI Codex documentation, October 2026).
JetBrains users report something different. A June 2026 support-forum thread says the PyCharm integration installs its own Codex and does not use that file, and JetBrains’ Codex page documents no config.toml support.
The thread’s author works at an institution that routes OpenAI through Azure, and the API-key login failed in PyCharm. The one on-topic reply was tentative: the integration does not currently appear to use the file.
The likeliest reading is that OpenAI’s extension and JetBrains’ AI Assistant agent are separate integrations. Until JetBrains documents config.toml support, treat custom provider settings as unsupported in PyCharm.
Setups where PyCharm Codex is the wrong fit
- Custom providers, Azure deployments and gateways
- Organizations where an administrator restricts which agents you can use
PyCharm Codex FAQ
How do I sign out of PyCharm Codex or switch it off?
Open Settings | Tools | AI Assistant | Providers & API keys. To sign out of Codex itself (a ChatGPT login or an API key), click Revoke next to Codex in the Agent Authorization section, then start a new chat. To drop the JetBrains AI sign-in, click Log out in the JetBrains AI section. To turn AI Assistant off, use the JetBrains AI widget to disable it for one project or disable the plugin permanently.
Does Codex also work in IntelliJ IDEA, WebStorm and other JetBrains IDEs?
Yes. JetBrains offers Codex in the AI chat of its IDEs from version 2025.3, chosen from the same agent picker.
The AI Free tier is the part that varies by IDE: JetBrains does not offer it in Android Studio or in Community editions.
Can I add an ACP agent by hand, and does that include Codex?
Any ACP-compatible agent can be added manually. Choose Add Custom Agent in the AI Chat options, which creates ~/.jetbrains/acp.json, then fill in the command, args and env for each agent.
For Codex, the agent picker is the documented route. JetBrains’ ACP page lists no Codex-specific manual entry.
Is PyCharm Codex available in every country?
No. The JetBrains AI subscription route is limited to JetBrains’ allowed territories, and the service has been unavailable in China since July 13, 2026.
JetBrains says own API keys and ACP-compatible agents remain usable there. Whether OpenAI serves your region is a separate question.
Does PyCharm Codex send my code to OpenAI?
Treat any file Codex reads as shared with OpenAI, because Codex is a third-party agent built by OpenAI.
To keep a project away from AI Assistant entirely, add an empty .noai file to its root, which JetBrains says disables all AI Assistant features for that project.
Where can I see how many AI Credits Codex has used?
The JetBrains AI widget in the window header shows monthly credits left, a progress bar, the renewal date and a separate top-up counter.
It tracks only the JetBrains AI route. ChatGPT usage appears in your OpenAI usage dashboard, and API key usage in your OpenAI account.
Which First Task Shows Whether PyCharm Codex Pays Off?
One failing pytest test makes the best first task for PyCharm Codex, because running the suite verifies the result and a single short session costs little.
- Start in Read-only mode and let the agent explain the failure.
- Switch to Workspace access and let it apply the fix.
- Compare the JetBrains AI widget before and after to see what it cost.
Explaining first shows whether the agent reads the code correctly before any edit lands. A fresh chat keeps a growing context from inflating the reading.
JetBrains and OpenAI each publish a meter, so pricing the same task on both routes gives a comparison neither vendor states. The trade-off is that one small task understates the cost of long agent sessions on a large repository.
This position was verified on October 14, 2026, and changes if JetBrains documents config.toml support for the agent.
- PyCharm Codex Integration: How to Set It Up - November 19, 2026
- Who Answers Your Users After Launch? - November 18, 2026
- How to Create a Folder in GitHub From the Browser - November 17, 2026



