Allow to delete threads in the Codex app
Resolved 💬 26 comments Opened Feb 27, 2026 by CharlesIC Closed Jun 7, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What variant of Codex are you using?
Codex macOS app
What feature would you like to see?
Requested feature
Allow to delete threads instead of just archiving them.
Context
At the moment I have to go to ~/.codex/archived_sessions/, locate the file related to the thread I want to delete and manually delete it. I'd appreciate having the option to do that from the UI instead.
Proposed solutions
- A delete button showing in the UI next to the archive button in the Threads section of the sidebar
- A delete option in the thread context menu below the "Archive thread" item
- A button to delete a thread next to the unarchive button on the "Settings/Archived threads" screen
Additional information
<img width="232" height="44" alt="Image" src="https://github.com/user-attachments/assets/88e24aba-10ea-4bb9-8ad6-d05368f3c364" />
<img width="188" height="248" alt="Image" src="https://github.com/user-attachments/assets/a646df23-12af-4199-8c55-2c0eebddacc9" />
<img width="721" height="167" alt="Image" src="https://github.com/user-attachments/assets/3aaaa926-b2b2-417c-824f-2ae4ae9cbd2c" />
26 Comments
Yes, please. It’s really annoying to have to see a lot of old threads that are now useless. The only way to hide them is by archiving them, but that’s just like moving the dust under the carpet — it’s not a real solution.
I also support this. I don't like just archiving and not deleting.
i wonder what is the reason for codex to keep collecting them and not letting to delete, what's the point.
Near duplicate: https://github.com/openai/codex/issues/7727
2 months passed, this simple feature still not be supported, why it happens?
Current workaround (macOS Codex app):
``
text
``~/.codex/archived_sessions/
If the thread is still active (not archived yet):
archived_sessions.Optional terminal command:
This deletes all archived threads, so use it only if that’s what you want.
Really? We cannot delete chats!? Couldn't find the option, and shocked to find this issue
Hoping this was just an oversight, and gets fixed promptly
Can confirm this works on Windows as well. Easiest to just treat "archived" as marked for deletion, then delete the files in
~\.codex\archived_sessionsin explorer,Or with powershell:
For anyone coming here later only to find disappointment, maybe this unrelated usage tip can help.
I needed to run Codex as administrator (which I think is recommended) and also with
--disable-gpu(electron app) argument since all electron apps don't render correctly at all on my older GTX 1080 GPU. And I usually just make a shortcut for electron apps I use to pass that argumentBut Codex, unfortunately is only distributed via Microsoft Store and winget, both of which get installed into just objectively terrible nonsensical paths:
C:\Program Files\WindowsApps\OpenAI.Codex_26.409.7971.0_x64__2p2nqsd0c76g0\app\Codex.exeAnd every update the path actually changes as new app directory is created with new date and hash and the old one is not removed, which is very convenient for people wanting to keep all previous versions on disk. It probably does get removed eventually by Microsoft, since it manages this bloat. There are also symlinks that are used to open the app and change even more often. They have even more ridiculous paths:
C:\Users\$env:USERNAME\AppData\Local\Microsoft\WinGet\Links\codex.exeSo I needed to make a shortcut that:
codex.exeAnd I got all of it to work with a basic shortcut only! The shortcut
targetcan accept a short powershell script to find the path of the latest codex install/update, add the argument, and run it as admin. This worked for me:<img width="222" height="480" alt="Image" src="https://github.com/user-attachments/assets/2d7ebc23-bbf1-491a-bee6-39d4f786664d" />
Important to note that:
I am realizing how niche of an issue I just described but could still be useful to know!
really disappointed to see that simple issue havent been solved yet even though a 2 months passed
I want to add a related data-retention/privacy angle to this request.
This is not only about cleaning up the sidebar. If Codex stores local session or
archived thread data under
CODEX_HOME, users should not have to manually browseinternal date-based/session folders to remove old conversations.
In practice, the current workaround is still manual filesystem cleanup: locate
the relevant session/archive data and delete it by hand. That is brittle because
users have to infer which internal files are safe to remove.
This matters because Codex threads can contain sensitive or semi-sensitive local
context, such as:
If those files remain on disk indefinitely, any process with access to the user's
profile can potentially read or copy them.
A complete fix should distinguish:
Archiving should not be treated as deletion.
The UI should make local data management explicit instead of requiring users to
manually delete files from internal Codex storage folders.
Several months have passed since this was reported, and the workaround is still
manual cleanup of internal session/archive files for something that should be a
basic thread-management action.
@Aesthermortis
had the same problem, so I built ThreadLens to make local AI sessions
searchable and cleanable without digging through Codex folders by hand.
It separates finding, backing up, archiving, and cleanup. https://github.com/hanityx/threadlens
but I agree this should really be native in Codex.
@hanityx Clearing the Codex project list UI itself seems simple: deleting the session contents removes the entries.
The bigger problem is finding where Codex stores those sessions inside VS Code and knowing what else is stored in that folder. I have not checked the whole Codex storage structure yet, so manually deleting files is not ideal.
The current experience becomes messy very quickly. Old Codex sessions get in the way, archiving is not my preferred workflow, and now they are also mixed with Copilot chats, which makes the list feel chaotic.
A built-in option to delete or clean up old Codex sessions from the project list would make this much easier.
Thanks for sharing ThreadLens. This actually illustrates the problem very well.
It is impressive work, but users should not need a separate tool just to discover, review, back up, and clean up local AI sessions created by Codex, Copilot, or other assistants.
For Codex specifically, the issue is not just that old sessions exist. The problem is that the storage location and cleanup workflow are not obvious from inside VS Code/ Codex App. Manually deleting files is risky unless the user understands what else is stored in those folders, and archiving is not the same as actually cleaning up unwanted sessions.
The fact that tools like ThreadLens are needed is a strong signal that Codex should expose better built-in session management: clear session discovery, safe deletion, cleanup preview, and a way to understand what will be removed before anything destructive happens.
That would make the project list much easier to keep clean without forcing users to dig through VS Code/ Codex App or provider-specific storage folders.
This should be flagged as a Security/Privacy issue: session may need to be fully deleted when they inadvertently contain sensitive content.
Any update on this? seems like a straight forward feature i dont see the reason this is postponed so much
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.
Adding another user request for this, from Codex desktop on Windows.
The current archive-only behavior is confusing for users who expect the same distinction they know from ChatGPT: archive should hide a thread, while delete should permanently remove it. In this case, the user specifically wanted to delete the current Codex chat to verify that deletion works, but only archiving was available.
Requested behavior:
This would help users manage privacy and clutter without needing to locate and manually remove session files.
I’d like to add a concrete Windows Codex Desktop case to this request.
My use case is narrower than “clear all history”: inside one project, I have several conversations in the sidebar, and I want to delete exactly one of them from the UI while keeping the rest of the project’s conversations intact.
Requested UX
In the project/sidebar conversation list:
Then show a confirmation dialog that clearly says this deletes the local conversation/session data for that one thread only, and does not delete or modify any workspace/project files.
Archive and delete should stay distinct actions:
For archived threads:
Local evidence
On Windows, one visible sidebar conversation appears to map cleanly to a single thread id.
For one conversation I inspected locally, the related state was spread across:
For that one thread, I found roughly:
This makes the desired behavior feel well-scoped: delete one thread id and its associated local session/index/log records, without touching other conversations in the same project.
Expected behavior
Deleting one thread from the UI should:
Why this matters
Right now, the only practical workaround is to inspect internal Codex storage and manually delete/edit files or SQLite rows. That is risky and not something users should need to do.
This is both a UX issue and a local data-retention/privacy issue. Codex conversations can contain paths, diffs, commands, logs, project names, and accidental sensitive context. Users need a supported way to delete exactly one local conversation from the UI.
Related follow-up with local verification evidence: #23991
Codex Desktop now has an archived-chat delete action, and in my local test it did remove the main rollout JSONL and some state DB rows. However, the same thread ID still remained in
session_index.jsonl,logs_2.sqlite, and desktop state after deletion.I also published the small verifier/cleanup tool used for the before/after check here: https://github.com/1939869736luosi/codex-sessions-manager
Not proposing it as a replacement for the built-in delete UI; it is mainly useful for verifying and cleaning local residues after deletion.
This is very suspicious, I'm starting to think what the reason for keeping the chats is. I have also noticed that there is a .git in the memory folder. that git is recreated every x amount of time.
This works on my device.
However, I would like to add that it fails to work on cloud tasks dating back to last year from before the apps were released.
It appears that a third-party application is required to facilitate functionality. Such a fundamental feature cannot be supplied internally; therefore, one must question the confidence in utilizing Codex.
Still not solved. I don't understand why codex can't add a feature that is entirely regular in the ChatGPT browser function. OpenAI says it deletes data within 30 days, but that seems irrelevant if you can't delete the chat.
At this point it's not even clear, if deleting the entire openai account solves this issue.
The app now supports deletion of archived sessions. Open Settings, then go to "Archived chats", and click on the trash can icon next to the session you wish to delete.
@etraut-openai Any plans to make deletion of cloud-based sessions possible?
Deleting archived content doesn't seem like a good solution; the content should be deleted without archiving it first. This seems very poorly written. It seems like they don't even care about the issue.
See also:
'Any plans to make deletion of cloud-based sessions possible?' Claude Code already offered this long time ago and deletes the sessions within 24h. Codex will remain flawed until it can offer the same service.