Juliusolsson05

Codex Headless — Development skill for Claude Code

Development community

Programmatically drive the real OpenAI Codex CLI in a PTY — structured events, live rollout-stream token streaming, and typed transcript access.

How to install Codex Headless

This entry records only its repository, not the path inside it, so there is no exact command to give. Open Juliusolsson05/codex-headless and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Codex Headless does

Programmatically drive the real OpenAI Codex CLI in a PTY — structured events, live rollout-stream token streaming, and typed transcript access. Sibling to claude-code-headless.

Alternatives in Development

  • Connect — Fancy stream processing made operationally mundane 8608 114 1 8.6k ★
  • Hive — Browser-native hive-mind for CLI coding agents — Claude Code, Codex, Gemini, and OpenCode collaborate as real 473 ★
  • Claude Code SDK TS — Configure models, enable tools, stream events, then fetch text, JSON, run details or token stats in one call v 206 ★

README

codex-headless

Programmatically drive the real OpenAI Codex CLI — structured events, live token streaming, full rollout-transcript access. No SDK shortcuts.

Stars Forks Issues License Last commit


Why this exists

OpenAI Codex is a terminal application. If you want to build on top of it programmatically, today's options are bad:

  • The SDK gives you a reduced surface — send a message, get a message back. It throws away most of what makes Codex good in practice: the approval flow, the slash-command system, compaction, session resume, the full tool loop, the real streaming behaviour.
  • Screen-scraping the TUI is brittle and gives you pixels, not meaning.

`codex-headless` takes the opposite approach. It runs the **actual `codex` binary** inside a pseudo-terminal and exposes everything the CLI does as structured, typed events. The full command surface, the real prompts, the real flows stay intact. You get the real product, programmatically.

This is a control layer. Build an editor, an automation, a multi-agent orchestrator, a harness — any