Skip to main content
o4 works in your files directly, so you should look over what it changed before you keep it. This page covers the diff view, the /commit slash command, code reviews and pull requests, and the session debrief.

Review changes with /diff

/diff opens the Session Diff view, which shows how the files in your working directory changed during the latest turn:
You can also press Ctrl+D (from the prompt or from Navigation Mode) or Alt+D. You can rebind Alt+D with the toggle_diff_pane action; see Keyboard shortcuts. After the first turn of a session that changes files, o4 shows a hint with a summary, for example Changes this turn: 2 files changed (+42/−7). Press Ctrl+D to review. It shows the hint once per session. When a turn changes files and your prompt asked for a review, o4 also offers a View Diff action chip under the reply. In the diff view: Each file starts with a heading that shows its path and the lines added and removed. A new or deleted file is marked as such. The bottom border shows the keys, the total lines added and removed, and the current layout, for example +42/-7 lines [split]. When nothing changed, the view says No file changes in this session. What the diff compares against:
  • o4 takes a snapshot of your files each time it sends a prompt to the model. /diff compares the files now with the snapshot from your latest prompt, so it shows what changed during that turn, whoever changed it: the agent, you, or another program.
  • Closing the view marks those changes as reviewed. If you open it again before your next prompt, it only shows changes made after you closed it. Closing a turn diff from the Time Machine does the same.
  • It isn’t a git diff. It works outside git repositories, and it doesn’t show changes from earlier turns. To see everything that changed, use git diff, or ask the model to summarize its changes.
The view covers text files with common source extensions (such as .rs, .ts, .py, .go, .md, .json, .yaml and .toml) up to 500 KB each, and up to 500 files. It skips folders such as .git, node_modules, target, dist, build and .venv. For anything else, use git.
To see what an earlier turn changed, open the Time Machine with /rewind, select the turn, and press d. See Undo and rewind.

Commit with /commit

/commit commits all your changes with a message that o4 builds from git status. It doesn’t call the model:
o4 shows the message and asks Commit with this message?. The message starts with chore: and the last line of git diff --stat HEAD, then lists the changed files from git status --porcelain with a status letter: M modified, A added, D deleted, R renamed, ? untracked, and ~ for anything else. If git diff --stat HEAD prints nothing, for example when only untracked files changed, the summary is update N files instead.
Press Y or Enter to commit, or N or Esc to cancel (Commit cancelled.). If you confirm, o4 runs git add -A and then git commit -m with that message, and shows git’s output under Git Commit. If either step fails, it shows the error from git, for example git commit failed: .... You can’t edit the message in the dialog.
/commit stages everything: every modified, deleted and untracked file in the repository that isn’t ignored by .gitignore, including changes that have nothing to do with the task. That includes the .o4/ folder o4 creates in your project, unless your .gitignore lists it. Check git status first, or commit by hand if you want to choose what goes in. The message always starts with chore: and doesn’t describe what the change does.
/commit reports Not a git repository. outside a repository, git not found in PATH. when git isn’t installed, and No changes to commit. when the working tree is clean. It doesn’t push and doesn’t open a pull request. For a better message, or to commit only part of your changes, ask the model instead:
o4 includes a built-in commit skill for this, which tells the model to check the diff, stage files by name, match your repository’s commit style, and add a Co-Authored-By: o4 <noreply@open4rena.com> trailer. It also tells the model not to push unless you ask. The model can load it when you ask for a commit. It runs git through its shell tool, so the command follows your permission mode.

Open a pull request

o4 has no slash command for pull requests. /commit-push-pr only runs /commit; see Slash commands. Ask the model instead:
The built-in pull-request skill guides the model: it reviews every commit and the full diff since the branch left the base branch, stops if requested changes are still uncommitted, writes a title under 70 characters and a body with a summary and a test plan, pushes the branch if needed, and creates the pull request with the GitHub CLI (gh pr create). It returns the pull request URL. You need gh installed and logged in.

Get a code review

o4 has no built-in /review command. If you or a plugin add a skill named review, /review runs it; see Skills. Otherwise, ask for a review in a prompt and say what to review:
The model reads your git state with its read-only git_info tool, which runs git status, git diff and git log, and reads the surrounding code with its other tools. For a security review, ask for one in a prompt: o4 includes a built-in security-review skill that focuses on authorization, injection, secrets, dependencies and trust boundaries, and the model can load it. The /security-review slash command doesn’t run it; in 0.2.74 it only prints a note. See Skills for how skills work and how to add your own review checklist.
Saying “don’t change any files” is usually enough. To enforce it, use the plan permission mode (switch modes with Alt+A), which denies every tool call that would need approval, including edits and shell commands. The model can still read files and use git_info. See Permissions.
For a review in CI, run the same prompt in print mode with --permission-mode plan.

Summarize the session with /debrief

/debrief builds a report of the session so far and opens it in the Session Debrief pane. It runs right away, even while the model is working:
The report is Markdown with six sections: A section with nothing in it shows None. Verified only means that o4 set up a check for the task; the debrief doesn’t record whether the check passed. Subagent calls without a contract aren’t listed. See the agent tool in the tools reference for contracts.
For the open threads and decisions, o4 sends the conversation (up to about 1 MB of it) to the current model and asks it to list only unresolved threads and explicit decisions, as JSON. So each /debrief makes one model request. If the request fails or the reply isn’t valid JSON, both sections show None.
In 0.2.74 the Session Debrief pane has a single row, Current session, and shows the report in its preview area. The preview only has room for the first three lines (the title and the ## Files changed heading), and Enter doesn’t open the rest. To read the whole report, open the copy o4 saves when the session ends.

Saved debriefs

When you quit, or switch to another session with /resume or the session picker, o4 builds the debrief again and saves it to .o4/debriefs/<session-id>.md in the directory you started o4 in. At that point it waits at most 3 seconds for the model’s open threads and decisions; if the model takes longer, those sections are saved as None. o4 keeps the 20 most recent debriefs for each directory and deletes older ones. The open threads from that debrief are also added to Workspace Radar as Open thread: ... items. The next time you start o4 in the same directory, the chat opens with the counts from the last saved debrief:

Other git commands

Other git commands don’t have slash commands: /branch, /issue, /pr-comments and /autofix-pr only print a note in 0.2.74. Run git yourself with a ! prefix, for example !git log --oneline -5, or ask the model to run it. See Writing prompts. To work on a branch without touching your checkout, the model can create a git worktree with its enter_worktree tool; see Tools.
  • Undo and rewind: undo o4’s edits, or rewind the files to an earlier turn.
  • Permissions: control which commands the model can run without asking.
  • Skills: the built-in skills and how to write your own.