The todo list
For a job with several steps, the model writes a todo list and updates it as it goes. Each item ispending, in_progress, or completed, and at most one
item is in progress at a time.
When there are open items, the status row above the prompt shows the count,
for example 3 todos Alt+L, while the model is idle.
Open the todo list
PressAlt+L to open the Todo List pane. Press Alt+L again or Esc to
close it. The key is the toggle_todo_list action in
[keybindings].
/todo on its own is meant to open the pane too, but in o4 0.4.23 it doesn’t
open it. Use Alt+L.
The pane’s footer also shows
/ filter, but in o4 0.4.23 pressing / opens
the command list instead of filtering the todos.
Add a todo
Add an item without opening the pane:How the model uses the list
The model edits the list with thetodo_write tool, which runs without asking
for approval. Each call sends the whole list. o4 includes the current list in
the model’s context on every turn, so the model always sees your changes.
When every item is completed, the list clears itself.
Each tab has its own todo list, and a new tab starts with an empty one. The
list isn’t saved: it’s gone when you quit, and a resumed session starts with
an empty list. It can hold up to 100 items of up to 500 characters each.
Background tasks
A background task keeps running while the conversation continues. Background tasks include:- shell commands the model starts in the background, such as a dev server,
- long shell commands and subagents that o4 moved to the background,
- subagents the model started in the background (see subagents),
- recurring prompts you start with
/loop, - campaign workers (see campaigns).
Shell commands in the background
Thebash tool has a run_in_background option for long-lived commands such
as npm run dev or tail -f. The command returns a task ID right away, and
the model checks on it later.
A foreground shell command that runs too long also moves to the background
instead of being killed, so its output isn’t lost. This happens when the
command reaches its timeout, or after 2 minutes by default. sleep commands
are never moved.
To change the 2-minute limit, set auto_background_ms in
~/.o4/settings.json or .o4/settings.json. The same limit applies to
foreground subagents.
2 commands running. It doesn’t show the commands
themselves, and they don’t appear in the
agent list below the prompt, which lists
running agents only. To see or stop a command, open /agents.
See and control background work
Run/agents, press Right with nothing typed in the prompt, or press e
in the agent list, to open Ringside. It takes the place of the chat and
lists the sessions that are running right now: this window’s, those open in
its other tabs, those open in other o4 windows in any folder, and those on
machines you picked under Remote machines in /config (remote_hosts
in ~/.o4/settings.json, host names from your ~/.ssh/config). You can
open it while the model is working.
o4 reads another machine’s sessions over SSH, read-only, while Ringside is
open. The machine needs o4 0.3.37 or later and key login over SSH. When it
can’t be read, its line says why, for example
host key not trusted · connect once with ssh to accept it. A project’s
.o4/settings.json can’t set remote_hosts; see
the configuration reference.
A plain o4 also opens on Ringside instead of the welcome screen when
another o4 window is open or work is already running, so the first thing
you see is what needs you. Press Esc or Left to go to the chat. Turn
this off with Agents on launch in /config (agents_on_launch in
~/.o4/settings.json); see Settings.
Only running sessions are listed. A session whose window was closed or
killed is not shown, however recent; those are counted under the rows as
N older sessions in /resume, which is where the archive lives.
At the top, boxes for what is set up:
Under the boxes, a status line says how the sessions are doing:
All 6 Needs you 1 Working 3 Quiet 1 Ready 2, with the one the
list is showing highlighted. Press Tab to move along it, so the list shows
only the sessions that need you, only working ones, only quiet ones, or only
ready ones. The counts always cover every session, so a filter can’t hide
that something needs you. Quiet appears only when a session is quiet.
On a short terminal the boxes fold away and the status line stays.
Below, the sessions in groups — Needs you, Quiet, Working, Ready — each under
a small label with a blank line before it:
Each row shows what you asked, the project (the folder’s last name), what
the session is doing, and its status with how long:
needs you 11m,
quiet 22m, ready 4m ago. A session on another machine is mixed in by
status and tagged with the machine, for example evals @studio.local. On a
terminal under 100 columns, the “doing now” column is left out so the title
has room. Press g to group the rows by project, by model, or by machine.
When a session has no question, tool or subagent running, its row shows
its latest recap instead: how it left
off. Recaps from sessions on other machines show too, once both machines
run o4 0.3.65 or later.
Press Enter to see the selected session’s details — beside the list on a
wide terminal, below it on a narrow one — and Enter again to open it. For
a session waiting on you, its question, or the command it wants to run,
comes first in the details. The details also show what you asked, what the
session is doing, its folder and branch, its model, and its whole latest
recap with how long ago it was written. A subagent or
background task the session owns is listed under its session, and selecting
one shows its latest activity, run time, tokens, tool calls, and prompt.
The footer shows
enter, n, tab, /, and esc; the other keys are listed at
the foot of the details.
Alt+B opens the Task Board, a compact table of background tasks and
subagents with their kind, status, token use, last tool call, and run time. Press
Enter to open a row’s output in the chat area (from 0.3.94; before, it
showed in a small box under the message box), s to steer it, or k to kill
it; k acts at once, without asking. Because k kills on the Task Board, use
Up and Down to move between rows there. The footer also lists
p review diff, but in o4 0.4.23 p types into the prompt instead. /diff
shows the same diff of the session’s changes.
When a background task you can see in /agents finishes or fails, o4 adds a
short line to the chat of the tab that started it, such as
✓ Background task b7 (Build docs) finished · /agents to see its output.
Helper agents that run in the chat as usual don’t add one; their result is
already there.
How the model manages tasks
The model has these tools for background tasks:task_wait waits up to 300 seconds by default and up to 1800 seconds at most.
If it times out, the task keeps running.
Each task has a short id that starts with a letter for its kind, such as
b7 for a shell command or a1 for an agent. The tools take that id, its
number on its own, or a mention such as @task:a1. To point the model at a
running task, type @ and pick it on the Tasks tab, which inserts
@task:a1; see Writing prompts.
The same tools work in print mode (o4 -p), where a
long shell command also moves to the background after auto_background_ms.
These approval rules apply in the default approval mode. See
permissions for the other modes.
Recurring prompts with /loop
/loop sends a prompt or a slash command again and again on a schedule. It
runs as a background task in the current session.
every, or say it at the
end:
s, m, h, or d, such as 90s, 30m, 2h, or 1d.
Without an interval, the loop runs every 10 minutes. Loops run on a cron-style
schedule, so o4 rounds seconds up to whole minutes, and anything over 59
minutes to the nearest whole hour (90m runs every 2 hours, 80m every
hour). It tells you when it rounds.
The first run starts right away. o4 then shows a Loop Scheduled pane with
the task number, cadence, cron expression, and prompt. If the prompt opens a
pane of its own, such as /cost, that pane replaces it.
Each run goes to the tab where you started the loop, even when another tab is
on screen. While that tab is busy, the prompt waits in its queue. After you
close that tab, its runs are skipped.
A loop is a background task, but in o4 0.4.23 it doesn’t appear in /agents.
To stop a loop, press Alt+B to open the Task Board, select the loop’s
row (Loop: <prompt>), and press k. A loop also stops when you quit o4.
Related pages
- Subagents: hand work to agents with their own context.
- Campaigns: run several workers on one objective.
- Goals: keep the model working toward one objective.
- Keyboard shortcuts: every default key.