Short answer: install Codex, open a terminal in your data repository, type codex and sign in with ChatGPT. Run /init so it writes an AGENTS.md about the project. Then give it a task that adds safety without changing results, such as: "Add tests that check order_id is unique and amount is never negative in the orders model. Done when the tests run and pass." Read the changes with /review before you keep them.
A first task should be easy to check and hard to get badly wrong. Adding tests fits: if Codex writes a bad test, it fails or finds nothing; it does not change a single number in a report.
What are the four steps?
- 1Installone line from OpenAI's Codex docs
- 2Open and sign incd to the repo, type codex, sign in with ChatGPT
- 3/initCodex writes AGENTS.md: how to build and test, the folders
- 4Ask, then /reviewone task with a clear "done when", then read the diff
Why do tests make a good first task?
| First task | Risk | Easy to check? |
|---|---|---|
| Add data tests to a model | Low: no logic changes | Yes: run them |
| Document the models in a README | Low | Yes: read it |
| Rename a column everywhere | Medium: many files | Needs a full test run |
| Rewrite a transformation | High: numbers can change | Needs reconciliation |
How do you check the result?
/reviewshows the changes and points out issues, without editing files.- Run the tests yourself and see them pass, then break one value on purpose and see a test fail.
- Commit only what you read.
Where can you check this?
- Codex CLI docs: install, sign in,
/init,/review - Codex sandboxing: what the sandbox allows by default
Where do you start?
Make the habits stick with Codex habits for SQL changes, and when the task should run on a schedule, see codex exec in a data pipeline.