Codex is OpenAI's coding-focused AI assistant. orch supports Codex as an agent option.
Note: Codex support is currently in development. Some features may not be fully implemented.
Install the Codex CLI:
# Installation instructions depend on OpenAI's official distribution
# Check OpenAI's documentation for the latest installation method
# Verify installation
codex --version# .orch/config.yaml
agent: codexagent: codex
codex:
prompt_template: |
Think step by step. Follow best practices.
{{issue}}# Use default agent (if configured as codex)
orch run my-issue
# Explicitly specify codex
orch run --agent codex my-issueWhen starting a run, orch:
- Creates a tmux session
- Changes to the worktree directory
- Launches codex with the prompt:
codex "Your prompt here..."
Codex works well with explicit reasoning instructions:
codex:
prompt_template: |
Think step by step about this problem.
Task: {{issue_title}}
Details:
{{issue}}
Instructions:
1. Analyze the requirements
2. Plan your approach
3. Implement the solution
4. Test thoroughly
5. Create a PRcodex:
prompt_template: |
You are a coding assistant working on: {{issue_title}}
Requirements:
{{issue}}
Guidelines:
- Write clean, readable code
- Follow existing patterns in the codebase
- Add comments for complex logic
- Include tests for new functionalityConfigure OpenAI API access:
export OPENAI_API_KEY=sk-...orch attach my-issueorch send my-issue "Also add error handling"
orch send my-issue <<'EOF'
Also add error handling.
Cover the new path with tests.
EOFVerify your API key:
echo $OPENAI_API_KEYEnsure your OpenAI account has access to the Codex model.
OpenAI has rate limits that may affect long-running tasks. Monitor for rate limit errors in the session output.
| Feature | Claude | OpenCode | Codex |
|---|---|---|---|
| Provider | Anthropic | Multi | OpenAI |
| Focus | General + coding | General + coding | Code-specialized |
| Context | Large | Variable | Variable |
| Best for | Complex tasks | Flexibility | Code generation |