Skip to content

Add "Delete" option to Task context menu #7727

Closed

Description

@jimmylee850328

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.
Image

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".

Activity

  1. added
    enhancement
    on Dec 8, 2025
  2. added
    extension
    on Dec 8, 2025
  3. LevYas commented on Jan 29, 2026

    @LevYas

    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 #1442

  4. djrarky commented on Jan 29, 2026

    @djrarky

    Surely this is a breach of GDPR?

  5. quantuminformation commented on Jan 29, 2026

    @quantuminformation

    what was the thought process with no delete?

  6. Jerryx0709 commented on Feb 6, 2026

    @Jerryx0709

    Still nothing?

  7. femibadmus-tolaram commented on Feb 11, 2026

    @femibadmus-tolaram

    bro, just let me delete this chat before i go

  8. etraut-openai commented on Feb 11, 2026

    @etraut-openai
    Contributor

    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.

  9. Jerryx0709 commented on Feb 11, 2026

    @Jerryx0709

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

  10. etraut-openai commented on Feb 11, 2026

    @etraut-openai
    Contributor

    Did you restart the extension after deleting the file?

  11. Jerryx0709 commented on Feb 11, 2026

    @Jerryx0709

    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?

  12. liraz747 commented on Feb 16, 2026

    @liraz747

    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

  13. mkormendy commented on Feb 18, 2026

    @mkormendy

    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

  14. djrarky commented on Feb 23, 2026

    @djrarky

    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?

  15. liraz747 commented on Feb 23, 2026

    @liraz747

    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

  16. mikiTesf commented on Mar 8, 2026

    @mikiTesf

    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.

  17. aleburato commented on Mar 15, 2026

    @aleburato

    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...

  18. haritn commented on Mar 27, 2026

    @haritn

    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
    4. In the session file, replace the old cwd with the new workspace path everywhere it appears.
    5. 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
    6. Show me the verification output:
      • the updated threads row
      • the updated cwd lines from the session file
    7. 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.
  19. hongfayette commented on Apr 10, 2026

    @hongfayette

    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...

  20. femibadmus-tolaram commented on May 27, 2026

    @femibadmus-tolaram

    bro, just let me delete this chat before i go

    I am here again please let me just delete my conversation

    Image
  21. femibadmus-tolaram commented on May 27, 2026

    @femibadmus-tolaram

    okay guys its available on codex its self

    Image
  22. AbubakarMahmood commented on Jul 31, 2026

    @AbubakarMahmood

    Windows reproduction: mixed local Codex tasks and account-backed ChatGPT chats

    I can still reproduce a related gap in Codex desktop 26.721.11231.0 on Windows.

    The Recents list mixes two different backing types without showing the distinction:

    • local Codex tasks backed by ~/.codex rollouts/state; and
    • ChatGPT conversations created in the Web UI and mirrored into the desktop app.

    For an account-backed ChatGPT conversation:

    1. Open its context menu in Codex desktop. The available cleanup action is Archive, not Delete.
    2. Archive it in Codex desktop.
    3. The conversation disappears from both desktop Recents and the active ChatGPT Web history, so this is an account-level archive rather than a local-only hide.
    4. Codex desktop has no Archived Chats list/manager where that conversation can be reviewed or deleted.
    5. To delete it, open ChatGPT Web and go to Settings → Data Controls → Archived Chats → Manage → Delete. ChatGPT Web also offered a direct Delete action before archival.

    This makes the advice to delete ~/.codex/sessions incomplete for the current desktop app: that can address a local Codex rollout, but it does not delete an account-backed ChatGPT conversation, and manual file/SQLite surgery risks leaving local indexes inconsistent.

    Expected behavior:

    • visibly label whether a Recent item is a local Codex task or an account-backed ChatGPT conversation;
    • provide Delete… with confirmation and route it to the correct backing store;
    • expose archived account chats in desktop, or deep-link directly to ChatGPT's Archived Chats manager; and
    • avoid requiring users to edit rollout files or SQLite by hand.

    This is not a request for a duplicate issue; it is a Windows reproduction and a mixed-backing case for this existing issue.

  23. etraut-openai commented on Aug 16, 2026

    @etraut-openai
    Contributor

    Session deletion is now supported in the IDE Extension.

  24. jtripppiie commented on Aug 30, 2026

    @jtripppiie

    @etraut-openai Does codex delete permanently delete the session from both local storage and my OpenAI account/server-side data, or does it only remove the local session file? If it is local-only, how can users permanently delete the corresponding account-side Codex data?

  25. wssf812 commented on Sep 6, 2026

    @wssf812

    @etraut-openai Are you sure it supports deletion? Why didn't I find the delete button for my latest VSCode plugin(9.6---26.901.22334), or was it only for archiving

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementextension

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions