← Back to blog

Using GridTerm with OpenAI Codex CLI

GridTerm Team

OpenAI’s Codex CLI is a terminal-based AI coding agent that reads your codebase, generates code, and executes commands. Like Claude Code, it runs entirely in the terminal — which means it benefits from the same multi-terminal workflow that makes GridTerm valuable.

Getting started with Codex in GridTerm

Prerequisites:

  • OpenAI API key configured
  • Codex CLI installed (npm install -g @openai/codex)
  • GridTerm installed

Step 1: Launch GridTerm and select a 2x2 grid layout.

Step 2: In the first terminal, navigate to your project and run codex. The agent starts and waits for your prompt.

Step 3: Do the same in the second terminal. You now have two Codex sessions running side by side.

Step 4: Prompt them with different tasks and review results as they come in.

That’s the core workflow. Simple to set up, immediately productive.

Multi-agent Codex workflows

Parallel feature development

Run three Codex sessions on different features simultaneously:

Terminal 1: "Add user profile endpoint with avatar upload"
Terminal 2: "Create email notification service for order updates"  
Terminal 3: "Build rate limiting middleware for public API routes"

Each agent works independently. Review and approve as they finish.

Test-driven development

Use one Codex session to write tests and another to implement:

Terminal 1: "Write integration tests for the payment flow"
Terminal 2: "Implement the payment processing service"

When both are done, run the tests. If they fail, prompt the implementation agent to fix the issues.

Code review assistance

While Codex works on a task in one terminal, use another to review:

Terminal 1: Codex working on refactoring (in progress)
Terminal 2: "Review the changes in src/auth/ and flag any security concerns"

Mixing Codex with Claude Code

Each terminal in GridTerm is independent. You can run Codex in some and Claude Code in others. Different agents have different strengths:

  • Codex for tasks where you want OpenAI’s model
  • Claude Code for tasks where you want Anthropic’s model
  • Aider for focused file editing with explicit context control

Use GridTerm as the orchestration layer across all of them.

Workspace setup for Codex

Save a GridTerm workspace with Codex pre-configured:

TerminalDirectoryAuto-command
Top-left~/projectcodex
Top-right~/projectcodex
Bottom-left~/projectnpm run dev
Bottom-right~/project(free for git/testing)

Load this workspace and you’re immediately in a multi-agent Codex environment. No setup time, no manual navigation.

Screenshots with Codex

Codex accepts images as input. Use GridTerm’s screenshot feature to capture error messages, UI states, or design mockups and paste them directly into your Codex session.

The workflow: hotkey → select region → paste. Two seconds instead of the usual file-save-and-path-type dance.

Tips

Watch your API costs. Multiple Codex sessions means multiple API calls running in parallel. Keep an eye on your OpenAI usage dashboard, especially with larger models.

Use the file browser. When Codex modifies files, check them in GridTerm’s sidebar file browser instead of switching to VS Code. Ctrl+click file paths in the terminal output to jump straight to the editor.

Start with 2x2. Two Codex sessions is already a big upgrade from one. Scale up to 2x3 or 3x3 as you get comfortable managing parallel agents.

Get GridTerm — $67 one-time purchase