Cmd. /delete
Permanently delete the current Codex session transcript and spawned descendant sessions.
Key takeaways
/deletepermanently deletes the current session transcript and exits the Codex CLI.- It is different from
/archive: archive keeps the transcript recoverable, while delete removes it. - Deletion also removes spawned descendant sessions.
- Use it only after checking retention, audit, incident, and handoff requirements.
Original Command Declaration
/deleteOfficial Summary
/delete is an official slash command for permanently deleting the current Codex session
transcript and exiting the TUI. Use it for sensitive or disposable sessions where archiving is not
enough.
Usage
/deleteGood Examples
- Delete a temporary test session that included sensitive prompt material.
- Remove an abandoned experiment and its spawned descendant sessions.
- Before deleting an audit-relevant session, capture required evidence in a ticket, PR, or export.
Similar Commands
| Command | Difference | Choose It When |
|---|---|---|
/delete | Permanently removes the transcript | The record should not be retained |
/archive | Keeps the transcript recoverable | You only want to clean the active list |
/quit | Exits without changing retention | You want to leave the session intact |
Use Cases
- Cleaning up disposable sensitive test sessions.
- Removing failed spawned-session experiments.
- Enforcing team transcript retention policy for sessions marked delete-eligible.
v0.140.0 Changes
/deletewas added to the official slash command table.- The related
codex delete <SESSION>CLI path and app-serverthread/deletepath were added. - Deletion removes the current session and spawned descendant sessions.
Cautions
- Deletion is permanent; check retention, audit, and incident-response needs first.
/deleteis unavailable while a task is running or inside a side conversation.- If you only want to clean the resume list, use
/archive.
Release Basis
- Judgment: confirmed addition
- First evidence version:
Codex CLI 0.140.0 - Date (UTC): 2026-06-16
- Release link: https://developers.openai.com/codex/changelog
Sources
- Codex slash commands: https://developers.openai.com/codex/cli/slash-commands
- Codex changelog: https://developers.openai.com/codex/changelog