codex icon indicating copy to clipboard operation
codex copied to clipboard

"codex delete <session>"

Open divinity76 opened this issue 10 months ago • 33 comments

What feature would you like to see?

Would be nice if codex had a "delete session" command for sessions you are sure you never want to resume.

Additional information

No response

divinity76 avatar Jan 06 '26 14:01 divinity76

@jif-oai may I pick up this issue? I'd like to contribute on this awesome project Thank you

fury0928 avatar Jan 08 '26 11:01 fury0928

@leonace924, thanks for offering, but we're not accepting feature contributions from the community at this time.

etraut-openai avatar Jan 08 '26 15:01 etraut-openai

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.

TomasHubelbauer avatar Feb 01 '26 21:02 TomasHubelbauer

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.

Cool, can I work on this then?

fury0928 avatar Feb 02 '26 02:02 fury0928

I'm a stickler for clean code, and we need this feature.

congjinruo avatar Feb 08 '26 17:02 congjinruo

Similarly, it would be useful to have the option to remove all sessions except the last {num} sessions or all sessions prior to {date}.

nirfse avatar Feb 18 '26 22:02 nirfse

This feature is essential.

k4pl3r avatar Feb 25 '26 15:02 k4pl3r

Another vote for this. Any way to organise sessions would be helpful, but deleting sessions is simply essential.

pelegm avatar Feb 27 '26 10:02 pelegm

another one, basic op

joshuasp95 avatar Feb 27 '26 15:02 joshuasp95

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.

cleacos avatar Mar 05 '26 11:03 cleacos

In fact, it would be even better if we could manage our conversation records like Gemini does. This would make the conversation list during our development cleaner and more convenient to search. Please consider adding this feature officially.

lory-cliver-hh avatar Mar 20 '26 07:03 lory-cliver-hh

This feature is still needed. I want to delete sessions I've created with /fork. Sometimes there are many sessions being accidentally created.

off6atomic avatar Mar 30 '26 11:03 off6atomic

I would use this a lot. There are sessions I already know I will never resume, and archive does not feel like the same thing as delete. For now I ended up using a local workaround: https://github.com/hanityx/threadlens

hanityx avatar Mar 30 '26 12:03 hanityx

I need this feature too.

Cufoon avatar Apr 01 '26 07:04 Cufoon

i need this function

TimTuYu avatar Apr 06 '26 03:04 TimTuYu

I also need this. I wonder why this function, which is so basic, has not been made available.

LetterTree avatar Apr 08 '26 06:04 LetterTree

Upvote for it. Any follow-up on this issue?

HUGHNew avatar Apr 14 '26 12:04 HUGHNew

In fact, there is no management method as good as Gemini's.

lory-cliver-hh avatar Apr 14 '26 15:04 lory-cliver-hh

i really need this

floatDreamWithSong avatar May 02 '26 10:05 floatDreamWithSong

Upvote for it. Many times I just fork so something and do not need the session anymore

PanJason avatar May 02 '26 12:05 PanJason