Feature request: Batch purge for archived threads (thread/purge)

Resolved 💬 3 comments Opened Feb 6, 2026 by cola-runner Closed Feb 6, 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 App + CLI

What feature would you like to see?

Please add a v2 API to permanently delete archived threads in batch, e.g. thread/purge.

  • Params: threadIds: string[]
  • Per-item result: purged | notFound | notArchived | inUse | failed

This is a clear complement to archive: archive is reversible, purge is final cleanup.

Additional information

I understand external PRs are invitation-only, so I’m opening this issue first.

I implemented a working prototype in my fork for reference:

If this aligns with your roadmap, I’m happy to submit an invited PR.

View original on GitHub ↗

3 Comments

etraut-openai contributor · 6 months ago

I don't think it makes sense to have a batch purge for all archived threads. That's too blunt of an instrument, especially for an API.

cola-runner · 6 months ago

Thanks for the reply.

This came from a small, real issue I ran into while using the Codex app — some older, less relevant conversations (which didn’t appear in the CLI before) started to accumulate and mix in with current ones.

To better understand the situation, I put together a small tool to visualize and clean up archived threads: https://github.com/cola-runner/codex-history-manager

Sharing this here in case it’s helpful to others in a similar situation.

cola-runner · 18 days ago

<img width="818" height="132" alt="Image" src="https://github.com/user-attachments/assets/f4a7cf1c-9568-443f-91c0-347222c95705" />
Called it six months early: Codex now has a thread deletion API and archived-chat bulk delete.
Maybe I’m ready to join OpenAI too 😄