Skip to content

"Log rotate" CODEX_HOME/history.jsonl #4963

Closed as duplicate
Closed as duplicate

Description

@bolinfest

What version of Codex is running?

0.45.0

Which model were you using?

gpt-5-codex

What platform is your computer?

Darwin 24.6.0 arm64 arm

What steps can reproduce the bug?

Currently, CODEX_HOME/history.jsonl grows without bound. If you use Codex a lot, this can get really long. We have seen folks accidentally feed in giant prompts that resulted in this file being gigabytes in size!

What is the expected behavior?

https://github.com/openai/codex/blob/main/docs/config.md#history was meant to have some sort of "max size" option that we honor (similar to how Bash history works).

Note that we do some stuff with advisory locking to ensure only one instance of Codex can write at a time. We also do some [possibly overengineered] work to ensure that each session of Codex CLI sees a consistent history as the user uses up/down to cycle through messages.

What do you see instead?

I see it grow without bound...

Additional information

No response

Activity

  1. added a commit that references this issue on Oct 10, 2025
    6f3690d
  2. etraut-openai commented on Nov 15, 2025

    @etraut-openai
    Contributor

    Closing in favor of #6015, which has more upvotes

  3. bhack commented on Nov 15, 2025

    @bhack

    @etraut-openai not closed

  4. bolinfest commented on Dec 15, 2025

    @bolinfest
    CollaboratorAuthor

    This specific issue was solved via #6242.

  5. added a commit that references this issue on Feb 26, 2026
    93d183e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions