Groundwork

OpenAI coding agent

Use Codex when the work needs a repo, a diff, and verification.

Codex is OpenAI's coding agent across the terminal, desktop app, IDE, and hosted workflows. In Groundwork, it sits beside Claude Code as another capable agent that should read AGENTS.md, inspect before editing, show its work, and leave you with a diff you understand.

When you'll want this You want an OpenAI agent to read a project, make code or docs changes, run checks, and help you review the result.

#Which Codex surface to use

Codex CLIBest when you are already in a terminal or tmux pane. Start it in the project folder, give it a task, approve commands, review the diff, and commit with Git.
Codex appBest for juggling threads, screenshots, longer planning, reviews, and multiple pieces of work in parallel. It is the comfortable cockpit; the CLI is the fast lane.
IDE extensionBest when you want the agent attached to a visible editor buffer and your normal VS Code-style workflow.
Cloud / web tasksBest for offloading work that can run away from your laptop, then applying or reviewing the resulting diff locally.
Groundwork default

Use the CLI for daily repo work and the app when the work benefits from multiple threads, visual context, or longer-running supervision. Either way, the contract is the same: inspect, plan, edit, verify, review, commit.

#Daily commands

codexOpen the interactive terminal UI in the current project.
codex "explain this repo"Start with a one-shot prompt from the shell.
codex resumeReopen a previous local Codex session.
codex appOpen the Codex desktop app from the terminal.
codex exec "..."Run Codex non-interactively for scripted or repeatable tasks.
/reviewIn the CLI, ask Codex to review a diff, a commit, or uncommitted changes without editing them.
/permissionsChange the current approval/sandbox posture inside a Codex session.
/status & /usageThe two gauges: session config with remaining context capacity, and account usage. Check both before long work — see Know your AI budget.

#The safe loop

1
Start in a clean project
Run git status. Commit or stash unrelated work before handing the agent a larger task.
2
Ask for inspection first
Use prompts like: Inspect the repo and tell me the plan before editing files.
3
Approve narrowly
Let it read freely. Be more deliberate with writes, network calls, and commands outside the workspace.
4
Read the diff
The diff is where you learn and where you catch drift. Ask Codex to explain anything that is not obvious.
5
Verify and commit
Run the relevant check, then commit with a message that says what changed and why.

#Good first prompts

inspectRead AGENTS.md, inspect this repo, and summarize the project structure and validation commands. Do not edit files yet.
small changeMake the smallest change needed to fix this issue. Show me the plan first, then run the relevant validation after editing.
reviewReview my uncommitted changes for correctness, missing tests, docs drift, and risky assumptions. Do not modify files.

#Official references

  • OpenAI Codex docs — current entry point for Codex surfaces and workflows.
  • Codex manual — detailed reference for CLI, app, config, skills, plugins, MCP, and permissions.
  • Groundwork agent rules — how this repo keeps one shared agent contract across tools.