VSCodex is a Visual Studio extension that brings OpenAI Codex into the IDE as a docked, theme-aware developer tool window. It is designed for developers who want Copilot-style editor integration plus explicit control over model selection, failover behavior, MCP servers, skills, memory, prompt context, analytics, approvals, sandboxing, and task orchestration.
The extension is built as a classic in-process Visual Studio VSIX using ReactiveUI.WPF, ReactiveUI.Extensions, and System.Reactive. The solution entry point is src/VSCodex.slnx.
- Visual Studio 2022 17.x or newer on Windows.
- Visual Studio SDK workload for building or debugging the extension.
- .NET Framework 4.8 runtime. The VSIX targets
net48because in-process Visual Studio packages run on the Visual Studio .NET Framework host. - Node.js LTS and npm on the same PATH seen by Visual Studio.
- Codex SDK bridge package:
npm install -g @openai/codex-sdk- Optional Codex CLI fallback:
npm install -g @openai/codex
codex loginVSCodex reads local Codex configuration from %USERPROFILE%\.codex\config.toml.
- Install Node.js LTS and restart Visual Studio so
nodeandnpmare available to the IDE process. - Install
@openai/codex-sdkglobally. - Install
@openai/codexglobally if you want the CLI fallback transport. - Authenticate Codex/OpenAI from PowerShell if your account requires it.
- Install VSCodex from the Marketplace or build the VSIX locally.
- Open Visual Studio. VSCodex opens on first run and can be reopened from the VSCodex, View, Tools, editor context, project, solution, error, and debug menus.
- Open a solution or repository folder. VSCodex treats that opened project as the Codex project boundary and runs Codex from the resolved repository root.
- Open the VSCodex tool window, select Settings, and run setup validation if prompted.
msbuild src\VSCodex.slnx /restore /p:Configuration=Release /m
dotnet test src\VSCodex.slnx --configuration Release --no-build
python scripts\validate_structure.pyThe Release build writes VSCodex.vsix, Install-VSCodex.cmd, and Install-VSCodex.ps1 to src/VSCodex/bin/Release/net48. If double-clicking VSCodex.vsix does not open Visual Studio's installer because the Windows .vsix file association is broken, run Install-VSCodex.cmd; it resolves VSIXInstaller.exe from the installed Visual Studio instance and launches the installer directly. To launch the visible installer as part of a command-line Release build, add /p:VSCodexLaunchVsixInstaller=true.
Debugging from Visual Studio installs the VSIX into the Experimental instance through scripts/install-vsix-experimental.ps1. The project intentionally disables the older raw VSSDK deployment path and uses VSIXInstaller so command tables, runtime assemblies, and VSIX assets are installed consistently.
The VSCodex tool window is the primary workflow surface. It includes:
- Conversation history with user, system, assistant, and error messages.
- A prompt composer with Enter to send, Ctrl+Enter for a newline, and Esc to cancel.
- Voice-to-text prompt input on Windows installations with speech recognition and a microphone available.
- Quick actions for review, active errors, tests, planning, explain, fix, optimize, and documentation.
- Inline context suggestions for
/,#, and@. - A collapsible controls panel for settings, context, skills, MCP, analytics, memory, agents, and attachments.
- Current thread status and Codex rate-limit telemetry for five-hour and weekly windows when emitted by the SDK.
The tool window uses Visual Studio environment colors and includes the VSCodex icon in the header. It is laid out for docked use and constrains narrow views so the core prompt and run controls remain available.
VSCodex supports prompt tokens that map to Visual Studio workspace context:
#inserts selected code and solution-aware references.@searches repository files and can open a file picker for references elsewhere on disk./lists focused commands, settings, and tool surfaces.
These suggestions are resolved through the Visual Studio workspace and DTE services on the UI thread, then inserted into the prompt as stable references. Large selected code blocks are preserved for explicit code-selection commands.
VSCodex registers Copilot-style Visual Studio command surfaces:
- Editor selection context menu: Ask VSCodex, Explain, Fix, Review, Optimize, Generate Documentation, and Create Tests.
- Project, solution, and item context menus: open VSCodex, ask about selected items, create tests, and create plans.
- Error List and error correction menus: fix or debug the selected issue with VSCodex.
- Debug menu and exception break state: Debug Exception with VSCodex when Visual Studio is stopped on a runtime exception.
Commands use query-status routing so they appear in context-sensitive locations instead of being permanently visible everywhere.
The Settings panel controls how Codex is called:
- Mode: chat, plan, or build workflows.
- Primary model, failover model, and budget model.
- Budget-driven model selection.
- Reasoning effort, verbosity, approval policy, sandbox mode, profile, and service tier.
- Transport selection for SDK bridge and optional CLI fallback.
Settings are locked while a task is running so delayed binding updates cannot change model, MCP, or sandbox behavior mid-request.
Tool-window setting changes are retained per Visual Studio solution under the VSCodex app-data workspace state. Global Visual Studio options remain the default profile for newly opened solutions.
VSCodex prefers the @openai/codex-sdk bridge shipped in the VSIX under Resources/codex-bridge.mjs. At startup and before execution it verifies:
- Node.js is available.
- npm is available.
@openai/codex-sdkcan be resolved.- the bundled bridge file exists.
- the optional
@openai/codexCLI fallback can be found when configured.
If setup is incomplete, VSCodex shows Windows-specific instructions in the conversation and Settings panel rather than failing silently.
The MCP tab reads and writes server configuration from %USERPROFILE%\.codex\config.toml. It can list configured servers, discover tools, prompt for required inputs, and insert MCP tool calls into the current prompt.
ReactiveMemory is configured as the default durable memory server. VSCodex prefers the Codex-shared [mcp_servers.cp-reactivememory-mcp-server] entry and migrates the older VSCodex fallback [mcp_servers.reactivememory] entry instead of keeping both active. If the ReactiveMemory source repo is present locally it can launch that project; otherwise it falls back to the versioned CP.ReactiveMemory.Mcp.Server package identity through dnx. When Visual Studio opens a solution or repository folder, VSCodex waits until startup has settled before running a small, throttled ProjectMiner-compatible scan. Full repository mining is available from the Memory tab with the Scan project button, so Visual Studio load is not dominated by memory writes.
ReactiveMemory source: https://github.com/ChrisPulman/ReactiveMemory.MCP.Server
Memory support is designed to reduce lost context across sessions:
- User memories capture durable preferences and recurring instructions.
- Workspace memories capture repository-specific facts.
- VSCodex calls ReactiveMemory before each request, injects recovered project memory into the Codex prompt, and writes a diary entry after meaningful responses complete.
- The tool window keeps an in-memory session cache for display and search, but durable memory is stored through ReactiveMemory instead of repository-local JSON files.
The Memory tab exposes explicit save actions, while the prompt builder also injects memory context automatically with minimal user input.
The Skills tab lists available Codex skills and controls which skills are injected for a run. Skills can provide workflow instructions, tool usage patterns, and domain-specific context. VSCodex keeps skill selection explicit so a developer can choose the right behavior for a request instead of relying on hidden defaults.
The Analytics tab estimates prompt size, output size, complexity, primary model cost, budget model cost, savings percentage, and recommended model. This helps decide whether a cheaper model is appropriate before sending the request.
Rate limits are displayed from real Codex SDK telemetry when present. VSCodex maps Codex primary telemetry to the five-hour window and secondary telemetry to the weekly window so the display matches the Codex rate-limit UI.
The prompt editor accepts file drops and pasted files where supported. Attachments are tracked in the Attachments tab and included in the prompt context where the active Codex transport can use them.
For larger tasks, VSCodex can split work across logical planner, architect, builder, reviewer, and verifier roles. The Agents tab controls role enablement, per-role model selection, orchestration model, budget-driven model mode, and maximum agent concurrency.
The repository includes Marketplace packaging assets and a publish workflow:
src/VSCodex/Resources/VSCodexIcon.svgis the source icon artwork.src/VSCodex/Resources/VSCodexIcon-128.pngis used as the Visual Studio Marketplace icon.src/VSCodex/Resources/VSCodexIcon-256.pngis used as the Marketplace preview image.marketplace/vs-publish.jsonis the VSIX publish manifest and uses this README as the Marketplace overview..github/workflows/publish-vsix.ymlbuilds the Release VSIX, uploads the VSIX plusInstall-VSCodex.cmdandInstall-VSCodex.ps1as an installer artifact, and can publish the VSIX to the Visual Studio Marketplace.
Publishing requires a Visual Studio Marketplace personal access token stored as the VS_MARKETPLACE_PAT GitHub secret. The workflow publishes when a v* tag is pushed or when it is run manually with the publish input enabled.
MIT. See LICENSE.
VSCodex - Visual Studio AI assistance with Codex, ReactiveMemory, MCP, and solution-scoped control.