Private VS Code extension for inline ghost text suggestions powered by the locally installed and signed-in Codex CLI.
What It Does
- Registers a VS Code
InlineCompletionItemProvider. - Requests suggestions automatically after a short debounce by default.
- Warms an isolated completion thread during the debounce and immediately continues a suggestion when you type through its prefix.
- Can be switched to manual mode through a command or
codexGhostText.triggerMode. - Shows a
Codex: <model>status bar item that opens a Quick Pick of models exposed by the current Codex CLI. - Uses
lowreasoning and thestandardservice tier by default; both can be changed in Settings or with the reasoning and speed commands. - Stores the selected model in workspace settings. The default is
gpt-5.4-mini, which keeps ghost text suggestions cost-conscious. - Uses
codex app-server --stdio, which keeps the extension transport local and JSONL-based.
Privacy And Data Flow
The extension itself:
- does not read tokens or account configuration,
- does not make its own network calls,
- does not send telemetry,
- does not store source code,
- does not provide its own OAuth flow or API key.
It sends only bounded editor context to Codex: language, document URI, cursor position, text before the cursor, text after the cursor, and the current selection when present. Network communication and data handling are left to the local Codex CLI.
The app-server process is started with autocomplete-specific overrides that disable MCP servers, remote plugins, connector apps, tool suggestions, subagents, and web search for this extension session. It also uses an isolated Codex home under the extension global storage directory, with only an auth file link when the default Codex auth file exists. The extension does not read or copy token contents; the local Codex CLI remains responsible for authentication.
The extension runs only in trusted workspaces. In an untrusted workspace, no ghost text is generated.
Requirements
- VS Code 1.95 or newer.
- Codex CLI 0.145.0 or newer.
- A signed-in Codex CLI session:
codex login
Windows And WSL
The extension is not macOS-specific. It starts codex app-server --stdio in the VS Code extension host where it is running:
- Local Windows window: install Codex CLI for Windows and keep
codexavailable in the WindowsPATH. - Remote WSL window: install this VSIX into the WSL remote extension host and keep Codex CLI available in the WSL Linux
PATH. - Non-standard installs: set
codexGhostText.cliPathto the executable path visible from that same extension host, for example/home/me/.local/bin/codexin WSL orcodex.cmdon Windows.
If you open a WSL workspace from Windows, make sure the extension is installed on the WSL side. Otherwise VS Code may run the extension locally on Windows and it will not see the WSL codex binary.
Development
npm install
npm run compile
npm test
npm run package
npm run package creates a local .vsix. This extension is private and should not be published to the Marketplace without a separate review.
Settings
All settings live under codexGhostText and are intended for workspace configuration:
enabled: enables or disables inline suggestions, defaulttrue.triggerMode:automaticormanual, defaultautomatic.debounceMs: automatic suggestion debounce, default350.model: model selected from the status bar, defaultgpt-5.4-mini; empty means Codex CLI default.reasoningEffort:low,medium,high,xhigh,max, orultra; defaultlow.speed:standardorfast; defaultstandard.contextBeforeLines: lines before the cursor, default40.contextAfterLines: lines after the cursor, default20.maxSuggestionLines: maximum suggestion length, default20.timeoutMs: request timeout, default20000.maxRequestsPerMinute: request rate limit, default30.cliPath: path to the Codex CLI executable, defaultcodex.
Commands
Codex Ghost Text: Trigger SuggestionCodex Ghost Text: Toggle EnabledCodex Ghost Text: Toggle Automatic/Manual ModeCodex Ghost Text: Select ModelCodex Ghost Text: Set Reasoning EffortCodex Ghost Text: Set SpeedCodex Ghost Text: Restart Local Codex ProcessCodex Ghost Text: Show DiagnosticsCodex Ghost Text: Open Output
The extension does not register a default keybinding. You can map the manual trigger command in VS Code Keyboard Shortcuts.
Known Limitation
Codex App Server is experimental. The extension fails safely when the protocol changes or when the local CLI is not signed in. Because this uses the agentic Codex CLI rather than a specialized completion API, latency may not match Cursor-style dedicated completions.