Codex RestartEnglish | 简体中文 Codex frozen or not responding in VS Code? Keep a restart button within reach. Install from the Visual Studio Marketplace · Report a problem · Source code Codex Restart adds a status bar button, a Codex sidebar action, and an emergency reload shortcut. Click once to restart the current window's extension hosts and reopen the Codex sidebar. Other extensions in the same window restart too. Running extension tasks may be interrupted. This is an independent tool by zhouhl, not an official OpenAI product. Install in seconds
You can also paste this into VS Code Quick Open (
Requires VS Code 1.96.0+ and Codex - OpenAI's coding agent ( Two recovery options
The restart action is also available in the Codex sidebar title. Search for Codex Restart in the Command Palette to find both commands. Change shortcuts in VS Code's Keyboard Shortcuts editor if they conflict with your setup. The emergency shortcut does not depend on this extension's JavaScript. After a reload, open the Codex sidebar manually if necessary. If the entire VS Code window is frozen, quit and reopen VS Code. Why this extension?VS Code already provides Restart Extension Host and Reload Window. This extension puts those actions next to Codex and adds a one-time request to reopen its sidebar after a restart. It has no runtime dependencies and does not send telemetry or make its own network requests. It does not modify Codex installation files, accounts, conversation history, or configuration. It does not clear caches or kill processes by name. Scope and limitations
Troubleshooting and feedbackOpen View > Output and select Codex Restart for recovery messages. The output channel is recreated when its extension host restarts. If restarting does not help, try the emergency reload shortcut, then check that Open an issue with your operating system, VS Code version, Codex version, local/remote setup, and what happened after the restart. Remove private prompts, tokens, and file paths from any logs you share. DevelopmentUse Node.js 20 or later:
Open this directory in VS Code and press F5 to launch an Extension Development Host. Validation: nine automated tests pass. On macOS arm64 with VS Code 1.147.0, activation and command registration were checked in a real extension host. An isolated test window successfully restarted its host and reloaded its window, with changed process IDs and successful sidebar command calls. That test used a Codex command fixture; it did not reproduce a real Codex crash. Windows, Linux, and remote windows have not been tested. See CONTRIBUTING.md for development and issue-reporting guidance. Author and licensezhouhl · zhl809041737@gmail.com · Homepage MIT licensed. See LICENSE. |