Start a workflow
/workflow <request> starts an ordinary turn. The agent loads the bundled
dynamic-workflows skill, picks a helper layout for the request, and calls
create_workflow with a script. Your request goes to the agent word for word.
You can also just describe a task that splits this way. The agent may choose
to write a workflow, and the same approval applies.
/workflow with no text opens the run list (see The run list).
It works while a turn is running.
Before anything runs, o4 analyses the script. If the script has errors, the
agent gets the diagnostics with line and column and nothing is executed; it
fixes the script and submits it again.
The step map
A valid script opens the step map for your approval, for example (shortened):(many) marks a fan-out
with one helper per item), what each step reads and returns, how results pass
between phases, every shell command the script may run, the sandbox tier, and
a rough cost estimate. The estimate is not a limit.
While it runs
An approved workflow runs in the foreground by default. A progress block in the chat shows:- the run’s state, elapsed time, tokens, cost and how many helpers are working at once;
- each phase as done (✓), running (◐) or waiting (○), with counts of done, running, queued and failed steps;
- the helpers that are working, waiting (for example after a rate limit) or repairing an answer;
- the script’s last log lines, and the reports and deliverables published so far.
A background run appears in the agent list and in Ringside with its helpers.
When it finishes, the chat gets one line, for example:
Resume an interrupted run
Every step is saved to a journal as it finishes. If o4 exits or is killed while a run is live, the run is markedstopped (interrupted). The next time
o4 starts in that project it offers to resume:
stopped, for any reason other than
superseded. A completed run has nothing to resume, and an errored run needs
a corrected script in a new run.
The run list
/workflow with no text opens the Workflows pane with this project’s runs,
newest first:
The agent can inspect runs too, with
list_workflow_runs, get_workflow_run
and resume_workflow_run (see the tools reference).
Print mode
o4 -p runs workflows to the end:
-
In the
auto(the print default) andbypasspermission modes, a workflow starts without a step map, because nobody is there to approve one. In every other mode a workflow is refused with “workflows need approval; run with —permission-mode auto or bypass” and print stops at once./workflow <request>is then refused before the model is asked, and acreate_workflowcall from a plain prompt ends print without the model continuing. - After the main turn ends, print waits for every run it started, with no timeout. Each finished run is given to the agent as a follow-up turn.
-
stdout carries only the agent’s final answer. stderr gets one line per run
event:
A resumed run says
resumedinstead ofstarted. A progress line also counts repairing and failed steps when there are any. Progress lines are throttled to one every 400 ms across all runs, while start, log and settle lines always print. A run settles ascompleted,erroredorstopped (<cause>), where the cause isuser,model,provider,interruptedorsuperseded, and its settle line gives the time and cost. A run that ends without a settled result printsworkflow '<name>' ended without a result. -
o4 -p "/workflow"prints this project’s runs (at most 20) without a model turn.
Settings
Workflow settings live underworkflow in your user settings
(~/.o4/settings.json). They are user-only: a project’s .o4/settings.json
cannot change them, so a cloned repository cannot turn workflows on or switch
off the script’s confinement. /config shows the current values on its Agents
tab.
Permissions
Approving the step map is your consent for the whole run. Helpers then act without asking for each tool call. What still applies:- Deny rules. Your permission rules still block matching tool calls. An
askrule is treated as allow, because nobody is there to answer, so use a deny rule to stop an action. - PreToolUse hooks still run for helper tool calls.
- The sandbox tier in force when the run (or its resume) starts applies to helper shell commands for that run. Changing the tier later does not change a running workflow.
- Commands. A script can only run the commands listed on the step map.
They run with a fixed argument list, never through a shell string, and are
checked against your deny rules like
bashcalls.
workflow.confine_child on, o4 also runs that process inside the OS sandbox:
sandbox-exec on macOS, or bubblewrap on Linux when it is installed.
Elsewhere it runs unconfined and o4 logs that.
Limits
A read or command that goes over its limit fails that step. Nothing is
silently cut short. Too many reports fails the run.
Deliverables are stored under
.o4/workflow-runs/<run id>/ in the project.
That folder is ignored by Git. The run journal lives in ~/.o4/sessions.db.