Cmd. /diff
Review current Git changes from inside Codex.
Key takeaways
/diffshows the Git diff, including files Git is not tracking yet, so you can inspect Codex edits before committing or testing.- Run it before
/reviewto know the exact behavioral surface, and after applying a subagent result before merging. /diffis not a test; run the relevant verification command after reviewing changes.- In dirty worktrees, separate your own changes from Codex changes before judging the result.
Original Command Declaration
/diffOfficial Summary
/diff shows the Git diff, including files Git is not tracking yet, so you can inspect Codex edits
before committing or testing.
Usage
/diffGood Examples
- Run
/diffbefore/reviewso you know the exact behavioral surface being reviewed. - Use
/diffafter applying a subagent result before merging it into the main thread.
Similar Commands
| Command | Difference | Choose It When |
|---|---|---|
/diff | Shows working tree changes | You need to inspect edits |
/review | Reviews risks in the working tree | You need a code-review pass |
/status | Shows session state | You need model, policy, or token state |
Use Cases
- Checking added, modified, and untracked files.
- Reviewing generated files before committing.
- Comparing Codex edits to the original plan.
Recent Changes
- The TUI diff flow is now more workspace-aware in multi-workspace sessions.
Cautions
/diffis not a test. Run the relevant verification command after reviewing changes.- In dirty worktrees, separate user changes from Codex changes before judging the result.
Release Basis
- Judgment: first observed mention
- First evidence version:
rust-v0.23.0 - Date (UTC): 2025-08-20
- Release link: https://github.com/openai/codex/releases/tag/rust-v0.23.0
Sources
- Codex slash commands: https://developers.openai.com/codex/cli/slash-commands
- Codex CLI features: https://developers.openai.com/codex/cli/features