promptgarten ๐ŸŒฑ

Command reference ยท Codex CLI

/diff

Shows the current changes (diff) of the session.

/diff is a slash command of the Codex terminal CLI and shows the git diff of the current session - according to the source code, explicitly including files git doesn't yet track (untracked files). The output can be scrolled directly in the terminal and shows staged and unstaged changes as well as newly created files, so you can see exactly what Codex has actually changed before a commit or test run, without having to manually run git diff in a separate terminal. Important: there's no standalone /diff command in the ChatGPT app interface - the comparable functionality runs there through review mode. /diff is thus a pure terminal CLI command. According to the source code, it also works while a task is still running and within a side chat, so changes can be checked at any point in between without interrupting the running task. For a substantive assessment of the changes shown, /review adds an evaluation to the plain diff text.

๐ŸŽฌ AS A SHORT VIDEO

Shows the current changes (diff) of the session.

๐Ÿ”„ THE SAME TASK (โ€œVIEW DIFFโ€) ON OTHER PLATFORMS

Compare all 28 tasks โ†’

โœ… WHEN TO USE IT?

Briefly check what Codex has changed so far

/diff โ€” after a few work steps, check which files are affected

See the concrete line changes before approval, including new files

/diff โ€” view changes including newly created, not-yet-tracked files before accepting them

โ›” WHEN NOT TO?

You need a substantive assessment, not just the plain diff text

/diff shows the changes but doesn't evaluate them substantively.

Better: Use /review to additionally have the changes assessed

You're working in the ChatGPT app interface instead of the terminal

/diff doesn't exist there as its own command, only as part of the terminal CLI.

Better: Work in terminal CLI mode or use the app interface's review mode

SOURCES

MORE COMMANDS ยท Codex CLI

/resume/new/fork/mcp/skills/goalcodex execcodex reviewcodex resumecodex apply/init/compact

All commands ยท Codex CLI โ†’

Share:๐•in๐Ÿ’ฌ