An unofficial Visual Studio Code extension that connects GitHub Copilot Chat to local Codex models using your ChatGPT subscription. Codex handles reasoning while Copilot executes tools and workspace edits, without requiring an OpenAI API key.
[!IMPORTANT] This is an independent, unofficial project. It is not affiliated with or endorsed by OpenAI, GitHub, or Microsoft.
0.6.0 Provider Reliability
- Links Copilot-supplied virtual workspace URI resolvers to compatible editing tools while keeping all tool execution inside Copilot.
- Compacts long conversations as complete tool-call/result groups with a configurable bridge input budget.
- Treats the narrowly identified skill-description budget warning as recoverable only when the final structured response remains valid.
- Keeps unknown Runtime errors, forbidden Codex side effects, and unauthorized tool calls fail-closed.
How It Works
GitHub Copilot Agent
-> conversation, images, selected model, and available tools
Codex Subscription Provider
-> local Codex runtime and ChatGPT/Codex subscription
Codex
-> text response or structured tool-call request
Provider
-> response returned to Copilot Agent
GitHub Copilot Agent
-> executes VS Code tools, MCP calls, and workspace edits
The provider does not register or execute SAP, MCP, terminal, or file-editing tools itself. It only forwards the tools supplied by Copilot for the current request. Copilot remains responsible for tool execution, confirmation, and virtual-file changes.
Features
- Explicit Codex model selection in the Copilot model picker
- Configurable model reasoning effort
- Image and screenshot input
- Structured forwarding of Copilot tool calls
- ChatGPT subscription authentication with API-key authentication rejected
- Automatic discovery of the local Codex runtime
- Read-only, isolated Codex working directory with network and MCP disabled
- Runtime, model-catalog, and last-request diagnostics
- No extension-specific analytics or telemetry
Requirements
- Visual Studio Code
1.109.0or later - GitHub Copilot Chat in Agent mode
- Codex signed in with Sign in with ChatGPT
- For the Thin distribution, an official Codex runtime available from an explicitly configured path, the system
PATH, or the official OpenAI VS Code extension
Installation
Install the Thin distribution from the Visual Studio Marketplace, or install a VSIX from GitHub Releases.
After installation:
- Run
Developer: Reload Window. - Run
Codex Subscription Provider: Check Codex Runtime. - Run
Codex Subscription Provider: Refresh Models. - Open Copilot Chat and switch to Agent mode.
- Select an explicit
Codex Subscription | ...model. - Ask Copilot to analyze, edit, review, or test your workspace.
Configuration
{
"copilotCodexProvider.runtimeMode": "auto",
"copilotCodexProvider.codexExecutablePath": "",
"copilotCodexProvider.modelSource": "discovered",
"copilotCodexProvider.enabledModels": [],
"copilotCodexProvider.reasoningEffort": "model-default"
}
Runtime modes
auto: configured path, systemPATH, official OpenAI VS Code extension, then the bundled runtime when available.external: require an external official Codex runtime.bundled: require the runtime included in a Full distribution.
Models and reasoning
The extension discovers subscription-visible models through the local codex app-server model catalog. Each model is exposed as a separate Copilot model-picker entry. The selected model ID is passed to Codex without a silent fallback.
copilotCodexProvider.reasoningEffort supports model-default, minimal, low, medium, high, xhigh, max, and ultra. Unsupported values are rejected instead of silently downgraded.
Image input
- Up to 20 images and 50 MiB per request
- Duplicate images removed using SHA-256
- Temporary image files deleted after each request
- Requests rejected when the selected model does not declare image support
Privacy and Security
The extension checks the local Codex ChatGPT authentication state and removes common API-key and custom OpenAI endpoint variables before starting Codex. It does not log prompts, source code, image contents, credentials, tool arguments, or tool results.
Requests are processed by the selected local Codex runtime under the applicable OpenAI terms. Copilot and any enabled MCP tools remain subject to their own terms and privacy policies.
See PRIVACY.md, SECURITY.md, and THIRD_PARTY_NOTICES.md for details.
Development
npm ci
npm run validate
npm run package:thin
The test suite covers subscription-auth validation, runtime resolution, model catalog parsing, image handling, structured tool-call bridging, and SDK loading.
Contributions are welcome. Read CONTRIBUTING.md before opening an issue or pull request.
Distributions
| Distribution | Target | Runtime |
|---|---|---|
| Thin | Marketplace and cross-platform VSIX | Uses an official runtime installed by the user |
| Full Win64 | GitHub Release for Windows x64 | Includes the official Codex runtime |
Marketplace releases use the Thin package. Full Win64 packages are distributed only through GitHub Releases.
License
The extension source code is licensed under the MIT License. OpenAI Codex components retain their original Apache-2.0 license.