OpenAI Codex Research Preview
OpenAI introduces Codex software engineering agent
OpenAI has launched a research preview of Codex, a cloud-based software engineering agent capable of performing complex development tasks in parallel. Codex allows users to write features, fix bugs, answer codebase questions, and propose pull requests, with each task executing in its own isolated cloud sandbox environment preloaded with the user's repository.
Technical Architecture and the codex-1 Model
Codex is powered by codex-1, a version of OpenAI o3 optimized specifically for software engineering. The model was trained using reinforcement learning on real-world coding tasks across diverse environments to ensure the generated code adheres to human style, follows PR preferences, and iteratively runs tests until a passing result is achieved.
Execution Environment and Workflow
- Isolated Sandboxes: Each task is processed independently in a separate environment where Codex can read and edit files and execute commands, including type checkers, linters, and test harnesses.
- Verification: Codex provides verifiable evidence of its actions via citations of terminal logs and test outputs, allowing users to trace the steps taken to complete a task.
- Task Duration: Completion typically takes between 1 and 30 minutes depending on the complexity of the request.
- Integration: Users can review results, request revisions, open GitHub pull requests, or integrate changes directly into their local environment.
Repository Guidance via AGENTS.md
Users can guide Codex using AGENTS.md files placed within their repository. These files function similarly to README.md and provide the agent with instructions on how to navigate the codebase, which commands to run for testing, and project-specific standard practices.
Safety and Security Framework
OpenAI has implemented several safeguards to ensure the secure execution of AI-driven software engineering:
- Secure Execution: The agent operates in a secure, isolated cloud container. By default, internet access is disabled during task execution to limit interaction to the provided GitHub repositories and user-configured dependencies.
- Abuse Prevention: The model is trained to identify and refuse requests aimed at developing malicious software (such as malware) while continuing to support legitimate low-level engineering tasks.
- Transparency: Users can verify outputs through terminal logs, test results, and citations. The agent is designed to explicitly communicate uncertainty or test failures to the user.
Codex CLI and codex-mini
Alongside the cloud agent, OpenAI provides the Codex CLI, an open-source tool for local workflows. A new smaller model, codex-mini-latest (based on o4-mini), is now the default for the CLI. This model is optimized for low-latency code Q&A and editing while maintaining strong instruction following.
codex-mini-latest Pricing (Responses API):
- Input: $1.50 per 1M tokens
- Output: $6 per 1M tokens
- Discount: 75% prompt caching discount
Early Adoption and Use Cases
Internal teams at OpenAI and external partners are utilizing Codex for various engineering workflows:
- OpenAI Engineers: Use the tool for refactoring, renaming, writing tests, and scaffolding new features to reduce context-switching.
- Cisco: Evaluating Codex for real-world use cases across its product portfolio.
- Temporal: Using the agent to accelerate feature development, debug issues, and refactor large codebases.
- Superhuman: Applying Codex to improve test coverage and fix integration failures, allowing product managers to contribute lightweight code changes.
- Kodiak: Utilizing Codex for writing debugging tools and understanding unfamiliar parts of the stack.
Availability and Roadmap
Codex is currently rolling out to ChatGPT Pro, Enterprise, and Business users. Support for ChatGPT Plus and Edu users is expected soon.
Current Limitations:
- Lack of image inputs for frontend work.
- No ability to course-correct the agent mid-task.
- Higher latency compared to interactive editing due to the remote nature of the agent.
Future Plans: OpenAI intends to introduce more interactive workflows, allowing developers to provide mid-task guidance and receive proactive updates. Future integrations are planned for the Codex CLI, ChatGPT Desktop, issue trackers, and CI systems.
Sources
- OriginalIntroducing Codex