Overview
Start several Codex Cloud tasks from one environment, each writing property-based tests for a different module of your repository, then review the failures and proposed fixes before any pull request.
Problem or Objective
- Which agents write or run tests against an application?
- Which agents turn an issue report into a fix?
More in Coding and Code Review
AI Agents and Models
Tools and Integrations
- Tools
- Codex
- Prerequisites
- A ChatGPT account eligible for Codex Cloud (eligible Plus, all Pro tiers, Business, Enterprise, Healthcare, and Education accounts, subject to rollout and workspace settings), a repository connected to Codex, and a property-based testing library for your language.
How It Works
In Codex Cloud, create and publish an environment for a repository you own or maintain, with its dependencies and a property-based testing library for its language installed. Pick a handful of modules with clear rules (parsers, serializers, date or money arithmetic) and start one task per module, so each runs with its own working state. Ask each task to state the properties the module should hold, write property-based tests for them, run the tests, and report any failing input it finds with the smallest example it can reduce it to. Read each report, rerun the failing test yourself, and decide whether the property or the code is wrong. Ask for a fix in the same task only for real defects, inspect the changed files and test results, and commit or open a pull request only after you approve the diff. For a project you do not maintain, report the failing example through its normal issue process instead.
Implementation Workflow
Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.
- Choose the agentSet up Codex CLI.
- Connect the toolsConnect the tools this workflow relies on: Codex.
- Check the prerequisitesA ChatGPT account eligible for Codex Cloud (eligible Plus, all Pro tiers, Business, Enterprise, Healthcare, and Education accounts, subject to rollout and workspace settings), a repository connected to Codex, and a property-based testing library for your language.
- Gather your detailsCollect what the prompt asks for: Module or folder to test, A rule the code must keep, Property-based testing library for your language.
- Run the starter promptPaste the starter prompt below into Codex CLI and adapt it to your case.
- Check against the documentationCompare what you get with the documentation at developers.openai.com before you rely on it.
Practical Starter Prompt: Write property-based tests for one module
Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].
Work on [Module or folder to test] in this repository. List the properties this code should always satisfy, such as [A rule the code must keep]. Write property-based tests for them with [Property-based testing library for your language], run them, and report every failing case with the smallest input that reproduces it. Do not change application code yet. For each failure, say whether you think the code or the property is wrong. I will review the report and approve any fix before anything is committed or a pull request is opened.Run one task per module. Rerun each failing example yourself, approve fixes only for real defects, and inspect the diff and test results before committing or opening a pull request.
Expected Results and Benefits
This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.
This is a suggested workflow, not a reported outcome. The Codex pages support running coding tasks in reusable cloud environments, keeping each task's working state separate, and reviewing changes before committing or opening a pull request. They do not mention property-based testing by name or say how many real defects such tests will find; that depends on the code and on the properties you choose.
Limitations and Considerations
Codex Cloud is available to eligible Plus, all Pro tiers, Business, Enterprise, Healthcare, and Education accounts, subject to rollout and workspace settings. Model usage counts toward your Codex usage limits, so several parallel tasks use more of them. A failing property test can mean the property is wrong rather than the code: a person checks each one before any fix is merged. Follow each open-source project's contribution rules, and do not open pull requests on projects you do not maintain without checking how they want reports. Results depend on your setup and were not independently reproduced by Top 200 Repos.
GitHub Repositories
AI Agent Repository
Source code of the agent that does the work.
Official Website
The official site of the main tool or project in this use case.
Visit Website (opens in a new tab)developers.openai.com
Related Videos
About openai/codex
Meet the New Codex CLI (opens in a new tab)
Published by the project’s official channel.
Watch on YouTube (opens in a new tab)Independent creators. Listing a video implies no endorsement, sponsorship or partnership.
Sources
- Codex Cloud | ChatGPT Learn (opens in a new tab)
Project documentation · developers.openai.com · Undated · Source checked 25 Nov 2026, 12:11 UTC
What this source supports
- Start tasks from a published environment while keeping each task's working state separate.
- Inspect changed files and check results, request follow-up changes, and commit or open a pull request when you're ready.
- Using Codex with your ChatGPT plan | OpenAI Help Center (opens in a new tab)
Project documentation · help.openai.com · Undated · Source checked 26 Nov 2026, 17:27 UTC
What this source supports
- Codex Cloud runs coding tasks on OpenAI-managed computers using reusable cloud environments.
- Codex Cloud is available to eligible Plus, all Pro tiers, Business, Enterprise, Healthcare, and Education accounts, subject to rollout and workspace settings.
- Model usage counts toward your normal Codex usage limits and applicable credits or billing.
