app/automations.md +22 −21
1# Automations1# Automations
2 2
3Schedule recurring Codex tasks
4
5Automate recurring tasks in the background. Codex adds findings to the inbox, or automatically archives the task if there's nothing to report. You can combine automations with [skills](https://developers.openai.com/codex/skills) for more complex tasks.3Automate recurring tasks in the background. Codex adds findings to the inbox, or automatically archives the task if there's nothing to report. You can combine automations with [skills](https://developers.openai.com/codex/skills) for more complex tasks.
6 4
75Automations run locally in the Codex app. The app needs to be running, and theAutomations run in the background in the Codex app. The app needs to be
86selected project needs to be available on disk.running, and the selected project needs to be available on disk.
9 7
108In Git repositories, each automation run starts in a newIn Git repositories, you can choose whether an automation runs in your local
119[worktree](https://developers.openai.com/codex/app/worktrees) so it doesn’t interfere with your mainproject or on a new [worktree](https://developers.openai.com/codex/app/worktrees). Both options run in the
1210checkout. In non-version-controlled projects, automations run directly in thebackground. Worktrees keep automation changes separate from unfinished local
11work, while running in your local project can modify files you are still
12working on. In non-version-controlled projects, automations run directly in the
13project directory.13project directory.
14 14
1515 You can also leave the model and reasoning effort on their default settings, or
16choose them explicitly if you want more control over how the automation runs.
16 17
1718 
18 19
19## Managing tasks20## Managing tasks
20 21
22 23
23The "Triage" section acts as your inbox. Automation runs with findings show up there, and you can filter your inbox to show all automation runs or only unread ones.24The "Triage" section acts as your inbox. Automation runs with findings show up there, and you can filter your inbox to show all automation runs or only unread ones.
24 25
2526When an automation runs in a Git repository, Codex uses a dedicated background [worktree](https://developers.openai.com/codex/app/features#worktree-support). In non-version-controlled projects, automations run directly in the project directory. Consider using Git to enable running on background worktrees. You can have the same automation run on multiple projects.For Git repositories, each automation can run either in your local project or
27on a dedicated background [worktree](https://developers.openai.com/codex/app/features#worktree-support). Use
28worktrees when you want to isolate automation changes from unfinished local
29work. Use local mode when you want the automation to work directly in your main
30checkout, keeping in mind that it can modify files you are actively editing.
31In non-version-controlled projects, automations run directly in the project
32directory. You can have the same automation run on multiple projects.
26 33
27Automations use your default sandbox settings. In read-only mode, tool calls fail if they require modifying files, network access, or working with apps on your computer. With full access enabled, background automations carry elevated risk. You can adjust sandbox settings in [Settings](https://developers.openai.com/codex/app/settings) and selectively allowlist commands with [rules](https://developers.openai.com/codex/rules).34Automations use your default sandbox settings. In read-only mode, tool calls fail if they require modifying files, network access, or working with apps on your computer. With full access enabled, background automations carry elevated risk. You can adjust sandbox settings in [Settings](https://developers.openai.com/codex/app/settings) and selectively allowlist commands with [rules](https://developers.openai.com/codex/rules).
28 35
34first. This helps you confirm:41first. This helps you confirm:
35 42
36- The prompt is clear and scoped correctly.43- The prompt is clear and scoped correctly.
3744- The selected model and tools behave as expected.- The selected or default model, reasoning effort, and tools behave as expected.
38- The resulting diff is reviewable.45- The resulting diff is reviewable.
39 46
40When you start scheduling runs, review the first few outputs closely and adjust47When you start scheduling runs, review the first few outputs closely and adjust
42 49
43## Worktree cleanup for automations50## Worktree cleanup for automations
44 51
4552For Git repositories, automations run in worktrees. Frequent schedules canIf you choose worktrees for Git repositories, frequent schedules can create
4653create many worktrees over time. Archive automation runs you no longer need,many worktrees over time. Archive automation runs you no longer need, and avoid
4754and avoid pinning runs unless you intend to keep their worktrees.pinning runs unless you intend to keep their worktrees.
48 55
49## Permissions and security model56## Permissions and security model
50 57
66 73
67If you are in a managed environment, admins can restrict these behaviors using74If you are in a managed environment, admins can restrict these behaviors using
68admin-enforced requirements. For example, they can disallow `approval_policy = "never"` or constrain allowed sandbox modes. See75admin-enforced requirements. For example, they can disallow `approval_policy = "never"` or constrain allowed sandbox modes. See
6976[Admin-enforced requirements (`requirements.toml`)](https://developers.openai.com/codex/security#admin-enforced-requirements-requirementstoml).[Admin-enforced requirements (`requirements.toml`)](https://developers.openai.com/codex/enterprise/managed-configuration#admin-enforced-requirements-requirementstoml).
70 77
71Automations use `approval_policy = "never"` when your organization policy78Automations use `approval_policy = "never"` when your organization policy
72allows it. If `approval_policy = "never"` is disallowed by admin requirements,79allows it. If `approval_policy = "never"` is disallowed by admin requirements,
174```markdown181```markdown
175Check my commits from the last 24h and submit a $recent-code-bugfix.182Check my commits from the last 24h and submit a $recent-code-bugfix.
176```183```
177
178[Previous
179
180Review](https://developers.openai.com/codex/app/review)[Next
181
182Worktrees](https://developers.openai.com/codex/app/worktrees)