Add "Delete" option to Task context menu

Open 💬 20 comments Opened Dec 8, 2025 by jimmylee850328
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What feature would you like to see?

Is your feature request related to a problem? Please describe.

Yes. currently, I cannot permanently delete tasks in the VSCode IDE with CODEX plugin.

When I right-click on a specific task, the context menu only shows clipboard actions:

  • Cut
  • Copy
  • Paste

Additionally, the main UI only provides an "Archive" option. There is no way to delete a task entirely. This leads to a cluttered workspace with unwanted tasks that can only be hidden (archived) but not removed.
<img width="99" height="60" alt="Image" src="https://github.com/user-attachments/assets/88581020-4658-42af-bca1-143abdd7c21d" />

Describe the solution you'd like

I would like a "Delete" option to be added to the right-click context menu for Tasks.

Expected Behavior:

  1. User right-clicks on a Task.
  2. The menu displays: Cut, Copy, Paste, and Delete.
  3. Clicking Delete triggers a confirmation prompt (e.g., "Are you sure you want to delete this task?").
  4. Upon confirmation, the task is permanently removed.

Describe alternatives you've considered

  • Archiving: I currently have to archive tasks I want to delete, but this is not a true deletion and just moves them to a different list.
  • Cut: Using "Cut" (Ctrl+X) implies moving the item, not deleting it.

Additional information

Current Right-click Menu:

[ Cut ] [ Copy ] [ Paste ] (Missing Delete)

Current UI:

Only allows "Archive".

View original on GitHub ↗

20 Comments

milisp · 7 months ago

You can use https://github.com/milisp/codexia to delete them.

LevYas · 5 months ago

Very strange that this is not a basic feature by default, I'd rather have delete than archive.
Linking the discussion, quite a lot of people requested this https://github.com/openai/codex/discussions/1442

djrarky · 5 months ago

Surely this is a breach of GDPR?

quantuminformation · 5 months ago

what was the thought process with no delete?

Jerryx0709 · 5 months ago

Still nothing?

femibadmus-tolaram · 5 months ago

bro, just let me delete this chat before i go

etraut-openai contributor · 5 months ago

If you're concerned about clutter in the UI, you can use the existing "Archive" command.

Surely this is a breach of GDPR?

All session data is stored locally in the ~/.codex/sessions directory. You can delete them manually if you want. Totally under your control.

Jerryx0709 · 5 months ago

Still though, the things are still there and I can still see my message history even after deleting the file (For some reason)

etraut-openai contributor · 5 months ago

Did you restart the extension after deleting the file?

Jerryx0709 · 5 months ago

Yeah, I noticed it only after I restarted for the update. Still, makes no sense that we can’t just delete it from the Ui but we can just do it by deleting the file. Why not making our lives easier?

liraz747 · 5 months ago
If you're concerned about clutter in the UI, you can use the existing "Archive" command. > Surely this is a breach of GDPR? All session data is stored locally in the ~/.codex/sessions directory. You can delete them manually if you want. Totally under your control.

I'm very confused- if you can manually delete it, why not also make it a built-in option in the app to make it easier for users? It's a very simple action that's expected to be in the UI and not something you're supposed to be doing manually, and I'm pretty sure it's just a few lines of code to add that option in the UI to the context menu since it's really just deleting a file
I'm sure everyone using Codex would appreciate if you could add this simple feature

mkormendy · 5 months ago
I'm very confused- if you can manually delete it, why not also make it a built-in option in the app to make it easier for users? It's a very simple action that's expected to be in the UI and not something you're supposed to be doing manually, and I'm pretty sure it's just a few lines of code to add that option in the UI to the context menu since it's really just deleting a file I'm sure everyone using Codex would appreciate if you could add this simple feature

Why not develop an action in your project that allows you to delete them? I just ran this prompt in my project and it produced quite a nice little script that I add to my project's specific actions.

``Generate a user interface in the style of Codex CLI as a bash script that I can use to select the different threads in a project's session folder in Codex and delete it. Be sure to retrieve the name of the thread like it appears in Codex or the user prompt so I can identify it easily``

djrarky · 4 months ago
If you're concerned about clutter in the UI, you can use the existing "Archive" command. > Surely this is a breach of GDPR? All session data is stored locally in the ~/.codex/sessions directory. You can delete them manually if you want. Totally under your control.

@etraut-openai - perfect, how do I delete that on codex web however?

liraz747 · 4 months ago
> I'm very confused- if you can manually delete it, why not also make it a built-in option in the app to make it easier for users? It's a very simple action that's expected to be in the UI and not something you're supposed to be doing manually, and I'm pretty sure it's just a few lines of code to add that option in the UI to the context menu since it's really just deleting a file I'm sure everyone using Codex would appreciate if you could add this simple feature Why not develop an action in your project that allows you to delete them? I just ran this prompt in my project and it produced quite a nice little script that I add to my project's specific actions. Generate a user interface in the style of Codex CLI as a bash script that I can use to select the different threads in a project's session folder in Codex and delete it. Be sure to retrieve the name of the thread like it appears in Codex or the user prompt so I can identify it easily

Thanks for the idea :) but I'm just really confused about why it isn't built in

mikiTesf · 4 months ago

I hope this also means we get a new slash command for the CLI that does the same. Something like /delete that prompts for confirmation before erasing.

aleburato · 4 months ago

Guys this is needed. It's slowing down codex after a while. I just had to delete manually 1GB of archived crap from the sqlite DB. Codex helped me, but still...

haritn · 3 months ago

Codex itself can fix a thread that is attached to the wrong workspace/project, or delete it. Feed below instructions to Codex, which was also generated by Codex !!! Worked for me charmingly!.

Prompt for Codex:

You are going to rehome or remove a Codex desktop thread using local Codex storage. Be careful and back up everything before editing.

Goal:

  • If I give you a target thread ID and a new workspace path, move that thread to the new workspace.
  • If I ask to delete it instead, first identify all local files/state that reference it and explain the deletion plan before making changes.

What to inspect:

  • ~/.codex/session_index.jsonl
  • ~/.codex/sessions/.../rollout-<...>.jsonl
  • ~/.codex/state_5.sqlite

For move/rehome:

  1. Find the thread ID in ~/.codex/session_index.jsonl.
  2. Locate the matching session file under ~/.codex/sessions/.
  3. Back up:
  • the session file
  • ~/.codex/state_5.sqlite
  1. In the session file, replace the old cwd with the new workspace path everywhere it appears.
  2. In ~/.codex/state_5.sqlite, update the row in the threads table for that thread:
  • set cwd to the new workspace
  • set git_sha = NULL
  • set git_branch = NULL
  • set git_origin_url = NULL
  1. Show me the verification output:
  • the updated threads row
  • the updated cwd lines from the session file
  1. Tell me to restart Codex desktop.

SQL template:

update threads
set cwd='/path/to/new/workspace',
    git_sha=NULL,
    git_branch=NULL,
    git_origin_url=NULL
where id='<THREAD_ID>';
For delete:

Find all references to the target thread ID in:
~/.codex/session_index.jsonl
~/.codex/sessions/...
~/.codex/state_5.sqlite
Back up every file you will modify.
Tell me exactly what you plan to delete or edit.
Only then remove the thread’s session file and any index/state references you can confirm belong to that thread.
Show me what changed and what may still require an app restart.
Safety rules:

Never edit without creating backups first.
Never assume only one file matters.
Verify after every change.
If anything looks ambiguous, stop and explain.
hongfayette · 3 months ago
> If you're concerned about clutter in the UI, you can use the existing "Archive" command. > > Surely this is a breach of GDPR? > > > All session data is stored locally in the ~/.codex/sessions directory. You can delete them manually if you want. Totally under your control. @etraut-openai - perfect, how do I delete that on codex web however?

I also wonder how...

femibadmus-tolaram · 1 month ago
bro, just let me delete this chat before i go

I am here again please let me just delete my conversation

<img width="771" height="377" alt="Image" src="https://github.com/user-attachments/assets/9fc72439-f5e0-42b3-ad86-a57c65df3360" />

femibadmus-tolaram · 1 month ago

okay guys its available on codex its self

<img width="1920" height="1080" alt="Image" src="https://github.com/user-attachments/assets/cb9d830c-2b1d-4569-a891-125addf4e50d" />