Skip to content

Conversation

@guzus
Copy link
Owner

@guzus guzus commented Jan 10, 2026

Motivation

  • Provide an alternative executor that uses OpenAI Codex/Responses so the bot can run Codex-based workflows with tool calls.
  • Keep the existing Anthropic SDK execution path while allowing runtime selection of a Codex executor via EXECUTOR_TYPE.
  • Reuse the same task/event/action abstractions so UI/handlers and ralph-loop logic can remain unchanged.

Description

  • Add a new CodexSdkExecutor implementation at src/services/CodexSdkExecutor.ts that implements a request/response loop against the OpenAI Responses API and executes local workspace tools (read_file, write_file, edit_file, list_directory, glob, grep, bash).
  • Wire the codex option into the factory by extending ExecutorType in src/config/index.ts and returning CodexSdkExecutor from src/services/ExecutorFactory.ts when EXECUTOR_TYPE=codex.
  • Document the new mode and authentication variables (CODEX_API_KEY / OPENAI_API_KEY) in README.md and add the Codex mode entry to the Executor Modes table.
  • Implement a lightweight HTTP client inside the executor to call https://api.openai.com/v1/responses (uses CODEX_API_KEY/OPENAI_API_KEY) and translate responses into the project StreamEvent/action model.

Testing

  • Ran bun run lint which completed successfully (ESLint warnings about TypeScript version but no errors).
  • Ran bun run clean which completed successfully.
  • Built the project with bun build src/index.ts --outdir dist --target node, which bundled successfully and produced the distribution.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants