Skip to content

Add codex executor: run tasks on a ChatGPT subscription, no API key (v0.17.0) - #18

Merged
scr1p7k177y merged 2 commits into
mainfrom
feat/codex-executor
Jul 20, 2026
Merged

scr1p7k177y merged 2 commits into
mainfrom
feat/codex-executor

Conversation

@scr1p7k177y

Copy link
Copy Markdown
Member

Adds a codex executor so an autonomous run can use an OpenAI/ChatGPT plan instead of per-token API credits — the sibling of the existing claude-code executor.

What's new

  • lib/executors/codex.js — runs codex exec non-interactively with the prompt on stdin (same shape as claude -p). Default OFF (executors.codex.enabled), config-bound command/args/cwd, behind the same budget / approval / veto / comms/STOP gates as every other runtime. Sandbox policy is passed through args (e.g. --sandbox workspace-write); no bypass flag is ever injected.
  • No API key required. Both CLI runtimes bill your subscription, so they cost $0 in the ledger — keyed on the provider (a constant inside each executor), never the binary name, so a rename can't make a real API-backed model free. Tokens are still metered against the token caps.
  • API keys are stripped from the child env (ANTHROPIC_API_KEY/OPENAI_API_KEY). The daemon usually has those set for the llm executor, and an inherited key could silently flip the CLI to per-token API billing — spend the $0 price would then hide from the USD cap. Scrubbing makes subscription-billed true by construction. passApiKeys: true opts back in.

Verified

  • Live end-to-end against the real Codex CLI with no API key set: runner → codex exec → status: done, ledger provider=codex, usd=0. Re-verified after the env scrub (subscription auth via ~/.codex/auth.json is unaffected).
  • Standalone operation confirmed separately: node bin/ceauto-daemon.js --once drains a task to done with no MCP client and no key.
  • 240 tests + eslint green. Reviewed by a code-review pass; both findings (binary-name pricing escape, inherited-key billing flip) fixed above.

Docs / version

CHANGELOG (dated 0.17.0), README (executor list, no-API-key section, badge, test count), CLAUDE.md, ROADMAP, and config/settings.yaml + providers.yaml comments. All six version strings bumped to 0.17.0.

Please review — not requesting auto-merge.

https://claude.ai/code/session_01CKgPgAMauJxTHj7AM9ZxjW

…v0.17.0)

New lib/executors/codex.js runs `codex exec` (prompt on stdin), the OpenAI-plan
sibling of claude-code: default OFF, config-bound command/args/cwd, behind the same
budget/approval/veto/STOP gates. Both CLI runtimes are $0 in the ledger keyed on
PROVIDER (not the renameable binary name) and now strip ANTHROPIC_API_KEY/
OPENAI_API_KEY from the child env, so subscription billing is true by construction
instead of assumed; passApiKeys:true opts back in. Verified live end-to-end against
the real codex CLI with no API key set. 240 tests + lint green.
Adds codex to the Pillar 1 shipped runtimes + built-in executor list, and notes that
both CLI runtimes are subscription-billed, which closes the agent-runtimes gap.
@scr1p7k177y
scr1p7k177y merged commit cc4dd1f into main Jul 20, 2026
2 checks passed
@scr1p7k177y
scr1p7k177y deleted the feat/codex-executor branch July 20, 2026 12:42
scr1p7k177y added a commit that referenced this pull request Oct 4, 2026
Add codex executor: run tasks on a ChatGPT subscription, no API key (v0.17.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant