You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would be great, because we have codex exec for non-interactive mode, but when running the Codex CLI programmatically with interactive steps (e.g.: E2E tests), the non-interactive session is not useful and the session list gets spammed.
This would be great, because we have codex exec for non-interactive mode, but when running the Codex CLI programmatically with interactive steps (e.g.: E2E tests), the non-interactive session is not useful and the session list gets spammed.
I'm a stickler for clean code, and we need this feature.
Reacted by Peleg Michaeli, Escape0707, TimTuYu, Ignat Remizov, enprop, George Parker, yeoleobun, Charlie Chen, Alessandro Romancino, BATHILY Ousmane and 1 more
Also, I'd go with this command: /session_clear. There are named sessions, and sometimes you just want to clear the session (except the first prompt) instead of recreating it each time.
For instance, you can create a recurring/permanent session with an initial prompt (with some general instructions + ping to some skills), then work in the session, finish the task, and clear the session. For simple, quick recurring tasks, it is super useful; it will help keep sessions cleaner. It's ideal for tasks you don't want to "record" or track.
Same I need this feature, codex when asked about this advised not a good idea to just delete the session files manually because they may still be referenced in the database, so need a tool that will help properly delete old sessions.
It provides a terminal UI to list, search, preview, and delete local Codex sessions from ~/.codex. Deletion is recoverable by default with backups, and permanent deletion is also available with an extra confirmation step.
Hope this is useful for anyone who wants local controls for Codex history cleanup.
I just discovered this doesn't exist. There is no way to delete a session using codex TUI itself? I have to monkey around in ~/.codex or use third party tools? Astonishing.
Activity
fury0928 commentedon Jan 8, 2026
@jif-oai may I pick up this issue?
I'd like to contribute on this awesome project
Thank you
etraut-openai commentedon Jan 8, 2026
@leonace924, thanks for offering, but we're not accepting feature contributions from the community at this time.
TomasHubelbauer commentedon Feb 1, 2026
This would be great, because we have
codex execfor non-interactive mode, but when running the Codex CLI programmatically with interactive steps (e.g.: E2E tests), the non-interactive session is not useful and the session list gets spammed.fury0928 commentedon Feb 2, 2026
Cool, can I work on this then?
congjinruo commentedon Feb 8, 2026
I'm a stickler for clean code, and we need this feature.
nirfse commentedon Feb 18, 2026
Similarly, it would be useful to have the option to remove all sessions except the last
{num}sessions or all sessions prior to{date}.k4pl3r commentedon Feb 25, 2026
This feature is essential.
pelegm commentedon Feb 27, 2026
Another vote for this. Any way to organise sessions would be helpful, but deleting sessions is simply essential.
joshuasp95 commentedon Feb 27, 2026
another one, basic op
cleacos commentedon Mar 5, 2026
Also, I'd go with this command:
/session_clear. There are named sessions, and sometimes you just want to clear the session (except the first prompt) instead of recreating it each time.For instance, you can create a recurring/permanent session with an initial prompt (with some general instructions + ping to some skills), then work in the session, finish the task, and clear the session. For simple, quick recurring tasks, it is super useful; it will help keep sessions cleaner. It's ideal for tasks you don't want to "record" or track.
12 remaining items
radfaraf commentedon May 5, 2026
Same I need this feature, codex when asked about this advised not a good idea to just delete the session files manually because they may still be referenced in the database, so need a tool that will help properly delete old sessions.
LeeeeTX commentedon May 10, 2026
We built a small open-source macOS tool for managing local Codex App/CLI conversation history:
https://github.com/LeeeeTX/codex-history-cleaner
It provides a terminal UI to list, search, preview, and delete local Codex sessions from
~/.codex. Deletion is recoverable by default with backups, and permanent deletion is also available with an extra confirmation step.Hope this is useful for anyone who wants local controls for Codex history cleanup.
1939869736luosi commentedon May 11, 2026
I built a complete session management toolkit that goes beyond simple deletion:
codex-sessions-manager
Features:
Addresses the concern raised by @radfaraf — it properly handles all database references, not just file deletion.
Install:
npm install -g codex-sessions-manager(or use as MCP server)cooltzy commentedon May 22, 2026
Upvote for it.
lulusiyuyu commentedon May 24, 2026
Strongly support this.
ylme commentedon May 28, 2026
Particularly desire this feature.
ousmanito commentedon Jun 1, 2026
This feature is much needed. I have sessions that I will never open again.
patches: add session-delete and disable-autocompact
almeidazs commentedon Jun 8, 2026
Liked it
allentc commentedon Jun 11, 2026
I just discovered this doesn't exist. There is no way to delete a session using codex TUI itself? I have to monkey around in ~/.codex or use third party tools? Astonishing.
etraut-openai commentedon Jun 12, 2026
This feature will be included in the next release.
leaxoy commentedon Jul 13, 2026
@etraut-openai Any updates?