Recurring repository checks should stay close to the Codex context that owns the work, otherwise scheduled follow-up becomes a string of disconnected reminders. A Codex automation runs those checks from the app and sends runs with findings to Triage or back into the attached thread.
Automations can start fresh standalone runs for one or more projects, or they can wake up an existing thread when the conversation context matters. In Git repositories, background work can use a dedicated worktree so scheduled edits do not land in the active checkout.
The local machine running Codex App must be powered on when a project automation runs, and the selected project still has to exist on disk. Automations run unattended with the default sandbox settings from Codex App, so keep prompts narrow, prefer worktrees for repository tasks that may write files, and use rules when a command needs controlled access outside the sandbox.
Related: How to start a Codex task in a worktree
Related: How to create a Codex skill
Related: How to add a command approval rule in Codex
Related: How to run Codex exec with a prompt
Steps to create a Codex automation:
- Open the Codex App automation create flow.
$ open codex://automations
On macOS, the open command uses the registered app link. On other platforms, open Codex App and select Automations from the sidebar.
- Choose whether the automation should stay attached to the current thread or start standalone project runs.
Use a thread automation for heartbeat follow-up that should preserve the current conversation. Use a standalone automation when each run should start fresh, cover more than one project, or report findings as separate Triage items.
- Test the recurring task prompt in a regular Codex thread.
Check this repository for failing tests and uncommitted generated files. Report only new failures, changed files, or a clean result.
Testing first catches prompts that are too broad, too noisy, or missing the project context needed for each scheduled run.
- Ask Codex to create the automation with the tested prompt.
Create a standalone automation for this project that runs every weekday at 09:00. Use the tested prompt, run in a background worktree, and send findings to Triage.
- Review the proposed prompt and schedule before saving.
For custom schedules, enter cron syntax only when preset intervals do not match the cadence. Keep the prompt durable enough to explain what to inspect, what counts as a finding, and when to ask for input.
- Select the project and background execution mode.
Running in the local checkout can modify files that are open in another Codex thread or editor. Use a worktree for repository checks that may write changes.
- Confirm sandbox, model, and reasoning settings.
Automations run unattended. Full access allows background file changes, commands, and network use without a prompt, so use the least permissive sandbox that can complete the task.
Related: How to set Codex sandbox mode
Related: How to add a command approval rule in Codex - Save the automation.
- Open the Automations pane and confirm the saved automation.
The row should show the intended cadence, project or thread scope, and prompt summary. Runs with findings appear in Triage, while empty runs can be archived automatically.
- Review the first scheduled run.
Adjust the prompt or cadence if the first output is noisy, changes the wrong project, or reports status that does not match the tested thread result.
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.