Codex
How Flow passes its hooks to Codex, the one-time trust step, and what each dot means.
Trust Flow's hooks once
Codex runs a hook only after you have reviewed it. The first time you start codex in Flow, run /hooks inside Codex and trust the Flow hooks. Codex remembers your answer by the hook’s definition, so it asks again only if Flow moves to a different location or an update changes its hooks.
What Flow passes
Codex reads hooks from -c overrides on the command line as well as from its config files. Flow starts codex with a -c hooks.<Event>=… override for the SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, PermissionRequest, Stop, Interrupt and SessionEnd events. Each hook runs flw hook codex, which reads the event on stdin and reports it to Flow.
Codex approves many requests on its own, so its hooks can’t tell Flow when it’s waiting for you. Codex’s terminal notifications can, so Flow also passes these settings, which make Codex send a notification for each approval, plan or question it puts to you:
tui.notifications = ["approval-requested", "plan-mode-prompt", "async-question"]
tui.notification_method = "osc9"
tui.notification_condition = "always"Flow reads these notifications itself and doesn’t post them again, so you see one notification per request.
Flow doesn’t read or write ~/.codex. Hooks in your own config still run.
Your own -c overrides
Flow puts its overrides before yours, and Codex reads the last one, so on a conflict your override wins. An event you set hooks.<Event> for yourself is left to you, and so is any tui setting you pass. A -c hooks= override of your own turns Flow’s hooks off for that launch.
What each dot means
| Dot | Codex |
|---|---|
| Blue, pulsing | A prompt was sent, or a tool is running |
| Yellow | Codex is asking you to approve a command or an edit, review a plan, or answer a question |
| Green | The turn ended, or you interrupted it, while you were looking elsewhere |
A request Codex approves on its own doesn’t change the dot.
The notification for a yellow dot shows what Codex is asking, such as “Approval requested: git push origin main”. The notification for a green dot shows Codex’s last message.