Skip to content

Customizable retention period for sessions #6015

@BobbyWang0120

Description

@BobbyWang0120

What feature would you like to see?

I would like Codex CLI to periodically clean up old conversation history files based on a user-defined retention window. Currently, Codex retains every conversation indefinitely, so the history folder grows larger over time even though many of those conversations are no longer useful.

The proposed feature would allow users to specify a retention period (for example, 30 or 60 days), and Codex would automatically remove conversations older than that window. This would help keep the history directory at a manageable size and prevent storage from being consumed by outdated or irrelevant sessions. It would also be helpful if the retention duration were configurable so users could choose the period that best fits their needs.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions