Skip to content

Adhere to XDG Base Desktop Specification on Linux platforms #142

Closed

Description

@offsetcyan

The user's home directory is not the place to dump program data, and for future cross-platform compatibility handling this would be inappropriate. Currently Codex stores user data in ~/.codex, however Linux has a popular specification for where to place files of various types (link). In Codex's case, $XDG_CONFIG_HOME/codex/ would be suitable. (more info)

Activity

  1. tibo-openai commented on Apr 16, 2025

    @tibo-openai
    Collaborator

    Agreed that this should be configurable, please send a PR, will gladly merge it! Some files written aren't exactly program data, such as the session logs that you might want to inspect as the user or load back at a later time, thoughts on that?

  2. added
    enhancement
    on Apr 16, 2025
  3. offsetcyan commented on Apr 17, 2025

    @offsetcyan
    Author

    If it's volatile or ephemeral or can ultimately be forgotten, it should go in $XDG_CACHE_HOME. If it's data that's persisted for whatever reason and up to the program or user to clear up, it should go in $XDG_STATE_HOME. So one of those, depending on how important you think session logs should be - the PR from @crazywolf132 uses $XDG_STATE_HOME and I also support that

  4. tibo-openai commented on Oct 19, 2025

    @tibo-openai
    Collaborator

    We've discussed this within the team and decided that for now we will not support this and keep storing data under ~/.codex for the simplicity of the implementation, documentation, when requiring to engage with you all on bug reports and consistency across platforms. We might revisit in the future, but will close this for now.

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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions