paneherd

Guide

Codex CLI sessions in VS Code: extension, terminal or a grid

By Eren Çolak, who makes Paneherd · Updated 24 October 2026

There are three ways to use Codex in VS Code: OpenAI's Codex extension (a chat in the sidebar), the Codex CLI in the integrated terminal, or several CLI sessions side by side in a grid. The extension suits one task at a time with your editor context; the CLI is the one to script, resume and run in parallel. This guide follows OpenAI's IDE and CLI documentation (checked 24 October 2026).

1. The Codex extension

Install the extension from the Visual Studio Marketplace (it is listed as openai.chatgpt); OpenAI also links installs for Cursor and Windsurf. Select the Codex icon, or run Codex: Open Codex Sidebar from the Command Palette, sign in, and start a chat with the files you have open as context. OpenAI's page does not say whether the extension runs on Windows, so check its listing for your platform.

2. The CLI in the integrated terminal

Install the CLI (on macOS and Linux: curl -fsSL https://chatgpt.com/codex/install.sh | sh; the docs have Windows, npm and Homebrew tabs), then run codex in your project's folder and choose Sign in with ChatGPT the first time. Useful commands from the docs:

The terminal is what you want when a task is long, when you want to resume it tomorrow, or when you run more than one.

3. Several sessions in a grid

Two Codex sessions in one editor terminal panel means tabbing between them and noticing, late, that one has been waiting for approval. Paneherd opens each CLI session as a terminal in the editor area, in a grid. Its sidebar shows which Codex panes are working, waiting for you or finished, from Codex's own hook events (Codex asks once whether to trust new hooks). You can send one prompt to several panes, restart a pane into the same conversation, and keep Codex's usage windows in view at the top of the sidebar. The free version runs up to four panes of any agent.

Several agent sessions in a grid in VS Code, with the Paneherd sidebar showing their status and usage limits.

Parallel Codex sessions: two cautions

Frequently asked questions

Extension or CLI?

The extension for quick tasks with editor context; the CLI for long, resumable or parallel work. They are separate surfaces, and OpenAI's page does not describe shared sessions between them.

Does it work in Cursor?

Yes: OpenAI lists the extension for Cursor, and the CLI runs in Cursor's terminal. Paneherd runs in Cursor too.

Next: run Codex and Claude Code together and check Codex's usage limits.

Install Paneherd free