简体中文 · Windows guide · Support matrix
Codex Bridge is an MIT-licensed open-source tool for working with your local Codex from ChatGPT. Discuss, plan and review in ChatGPT while Codex reads your repository and runs commands, edits and tests on your computer.
Before installing: You need an existing, authorized private ChatGPT Connector and its Tunnel. Bridge cannot provision them. Without access to both, you cannot complete the ChatGPT connection.
Connection: ChatGPT ↔ private Connector and Tunnel ↔ Bridge ↔ local Codex App Server. One trusted operator manages the shared connection. Codex and your OS handle execution, native approvals and sandboxing. Bridge forwards scoped requests and results; it has no separate agent loop, execution engine or OS sandbox.
- Windows 11, PowerShell 7.2 or later, and Node.js 22.13 or later with npm.
- Codex CLI installed and signed in locally.
- Your private Connector and Tunnel already set up, with the Tunnel ID and Runtime Key available for local entry.
- Git on PATH if installing from source.
Use the GitHub Releases page. Use a version that is listed there and has a matching tarball and SHA-256. The filenames below use v1.0.0 as an example.
Download the tarball and run these commands in the download directory. Compare the computed hash with the SHA-256 on the release page before proceeding to installation.
Get-FileHash -Algorithm SHA256 .\codex-bridge-1.0.0.tgznpm install -g --offline --ignore-scripts .\codex-bridge-1.0.0.tgz
codex-bridge --versionOffline installation covers the npm package only. If the pinned Tunnel Runtime is not cached, the launcher downloads it on first start. Connecting requires access to the authorized upstream service.
Use the tag shown on the release page. For example, for v1.0.0:
git clone --branch v1.0.0 https://github.com/devcodex-labs/codex-bridge.git
cd codex-bridgeRun the source commands below from this checkout. On start, the launcher installs locked dependencies when needed.
- Check the configuration before starting. Without
--config, Bridge reads%LOCALAPPDATA%\CodexBridge\config.jsonif it exists. Review its sandbox andallowedRootsbefore using it. Only when that file is absent and you omit--configdoes Bridge use the built-inread-onlysandbox and%LOCALAPPDATA%\CodexBridge\workspace. Then runcodex-bridge startfor a tarball installation ornpm run startfrom the source checkout. - Enter Tunnel credentials locally. At the first prompts in PowerShell, enter the existing Tunnel ID and Runtime Key. Keep both out of ChatGPT. After verifying the Runtime is ready, the launcher saves credentials for reuse under your Windows account and protects the key with Windows DPAPI.
- Connect and check. Open ChatGPT with your existing private Connector enabled. In a second PowerShell, run
codex-bridge doctor(tarball) ornpm run doctor(source). Then ask ChatGPT, “Check whether my Codex Bridge is ready.” Doctor checks the local components. The ChatGPT check verifies that the existing Connector can reach Bridge. If the tools are missing or readiness fails, see Windows startup diagnostics. - Try your first task. Pick a path from
Authorized directoriesin the Bridge startup output. Ask, “Use local Codex in<authorized path>. RunWrite-Output 'BRIDGE-HELLO'and report whether the task completed.” Check that the response contains the marker and a completed status.
- Review a change: “Look at the uncommitted diff in my project. Flag correctness risks and suggest tests. Leave the files unchanged.”
- Develop and test: “Fix the failing test in my authorized project, then run the relevant test suite and summarize the results.” This requires a writable sandbox.
- Follow up on work: “Check the progress of the existing task and show its elapsed time. Continue using the same Codex session.” The progress card can refresh while work runs and show the native duration when available.
- Plan before editing: “Use Plan mode to propose a migration. Ask me which compatibility path to keep before proceeding.” If native Codex presents a question, choose or provide your answer in ChatGPT.
You can request a native model and reasoning effort supported by your Codex installation. If Codex sends a human approval request, the approval card shows available choices. To allow an action, review it and confirm separately in the local Bridge console. Eligible requests may instead be handled by Codex automatic review if configured.
With no explicit config, Bridge reads %LOCALAPPDATA%\CodexBridge\config.json if it exists. For a tarball installation, open it with the editor.
codex-bridge config editThe editor opens Notepad and preserves existing files. If the file is missing, it creates an advanced template with danger-full-access, on-request, auto_review, and high. Review and adjust it before starting. From source, use config.example.json as the advanced template and edit your own JSON file locally.
- Set
allowedRootsto existing absolute project directories. Bridge matches the exact canonical working directory. The native sandbox sets filesystem and network permissions. - Choose
read-onlyfor inspection,workspace-writefor edits under native workspace rules, ordanger-full-accessonly when you intend to grant the Windows user's file and network access. - New sessions default to
highreasoning effort. Setxhighexplicitly only where native Codex supports it.
Before switching configurations, finish or reconcile active tasks and pending approvals. Press Ctrl+C in both the old launcher and Bridge consoles and confirm both have stopped. Changes do not hot-reload, and an old instance can still hold the same port.
For a separate config, use the same --config path throughout. Relative paths are resolved from the calling directory. For a tarball installation, open and review the selected file first.
codex-bridge config edit --config .\bridge-config.jsonSave the reviewed config, then start Bridge. Run doctor in a second PowerShell from the same directory.
codex-bridge start --config .\bridge-config.json
codex-bridge doctor --config .\bridge-config.jsonFrom a source checkout, edit the JSON locally and run:
npm run start -- --config .\bridge-config.json
npm run doctor -- --config .\bridge-config.jsonIf prompted at startup, enter Tunnel credentials only in the local terminal. Run doctor with the same --config and check Sandbox. Check Authorized directories in the Bridge startup output for the actual project paths.
To replace the saved Tunnel credentials, use codex-bridge configure or npm run start:configure from source. Pass the same --config path (after -- for npm scripts) when using an explicit file. Configure may start Bridge and Tunnel. See Windows configuration.
For example, to replace credentials for the explicit config:
Tarball installation
codex-bridge configure --config .\bridge-config.jsonSource installation
npm run start:configure -- --config .\bridge-config.jsonFinish or reconcile active tasks and approvals, then press Ctrl+C in both the launcher and Bridge consoles. Stopping only the launcher or Tunnel can leave Bridge running.
To upgrade a tarball installation, download and verify the newer release tarball, then repeat the offline install command with the new filename. Check the version, start with the same configuration and run doctor. For source, use a checkout at the new release tag. Keep the old checkout or tarball if you need to roll back.
After verifying the newer tarball’s SHA-256, run this and enter the path to the downloaded file:
$tarball = Read-Host 'Path to the new release tarball'
npm install -g --offline --ignore-scripts "$tarball"
codex-bridge --versionTo remove the installed CLI after stopping it:
npm uninstall -g codex-bridgeFor source, remove the unneeded checkout after saving any local files you want to keep. Preserve %LOCALAPPDATA%\CodexBridge and any separately selected config, project or artifact directories you want to retain. Codex CLI, Codex history and the private Connector have their own lifecycle. Windows upgrade and removal guide
- The first release targets Windows 11. Existing private Connector use has been exercised. First-time Connector binding and upgrades from older installations are unverified.
- Optional browser and desktop tools depend on your Codex environment. Windows MCP has been exercised for launching an app. Full desktop control and resuming a task after a live browser sign-in remain unverified.
- Remote approval in the card alone is unavailable. Progress timing and Plan behavior can vary by ChatGPT client and native Codex version.
Support matrix · Windows guide · Architecture and advanced integration reference
See Contributing for development and tests and Security for private vulnerability reporting. Codex Bridge source is licensed under the MIT License. The separately distributed Tunnel Runtime retains its Apache-2.0 license.