Skip to content

codex resume hides sessions when current path differs only by case on WSL #7995

Closed

Description

@CarlosCommits

What version of Codex is running?

codex-cli 0.72.0

What subscription do you have?

Plus

Which model were you using?

N/A

What platform is your computer?

Linux 6.6.87.2-microsoft-standard-WSL2 x86_64 x86_64

What issue are you seeing?

Summary

On WSL2, codex resume only shows sessions if the current working directory string matches the session workspace path exactly, including letter case.

The filesystem is effectively case-insensitive, so paths like:

  • /mnt/c/Users/Carlos/Desktop/Projects/
  • /mnt/c/Users/Carlos/desktop/projects/

refer to the same directory. Codex sessions created in one path are not visible to codex resume when I am in the other. The underlying ~/.codex/sessions files are shared and identical, but the resume picker shows No sessions yet in the second terminal.

This looks like the workspace filter for codex resume is doing a case sensitive string compare on the stored workspace path.

Environment

  • Codex CLI version: codex-cli 0.65.0
  • Auth: ChatGPT Plus account
  • OS: Windows 11 with WSL2
  • WSL distro: Ubuntu 24.04
  • Filesystem where repo lives: Windows NTFS mounted as /mnt/c
  • CODEX_HOME: $HOME/.codex
  • which codex: /home/carlos/.nvm/versions/node/v24.11.1/bin/codex

What steps can reproduce the bug?

In WSL2, cd into a project directory and start a Codex session:

cd "/mnt/c/Users/Carlos/Desktop/Projects/"

codex

Have a short conversation, then exit Codex

Open another WSL terminal that uses the same distro and environment (same CODEX_HOME, same which codex), but cd into the same directory using a slightly different case in the path. For example:

cd "/mnt/c/Users/Carlos/desktop/projects"

On NTFS these refer to the same directory. The two terminals see the same files if I run ls.

In this second terminal run:

codex resume

Observe that the resume picker lists No sessions yet, even though:

The session files from step 1 are present under ~/.codex/sessions/...

codex resume in the first terminal does list and resume the session

Both terminals report identical CODEX_HOME, HOME, which codex, and identical ~/.codex/sessions contents

What is the expected behavior?

codex resume should list and allow resuming any sessions associated with the actual workspace directory, even if the path used in the shell differs only by case from the path string that was stored originally.

On platforms where the underlying filesystem is case insensitive (for example Windows paths or WSL mounts of NTFS), Codex should normalize paths or compare them in a case insensitive way so that small casing differences do not hide sessions.

Additional information

No response

Activity

  1. added
    CLIIssues related to the Codex CLI
    windows-osIssues related to Codex on Windows systems
    on Dec 13, 2025
  2. added a commit that references this issue on Dec 14, 2025
    35c27e7
  3. added a commit that references this issue on Dec 17, 2025
    42b8f28
  4. etraut-openai commented on Dec 17, 2025

    @etraut-openai
    Contributor

    Thanks for the bug report. This will be fixed in the next release.

  5. added a commit that references this issue on Feb 27, 2026
    65be9f2
  6. aalasadtx commented on Sep 10, 2026

    @aalasadtx

    Reopening context: this same failure reproduces on codex-cli 0.154.0 (WSL2, Ubuntu 24.04, Windows 11), through a different path than #8000 fixed.

    #8000 added normalize_for_path_comparison in codex-rs/core/src/path_utils.rs, scoped to the rollout-file-based resume picker's comparison step. On 0.154.0, codex resume's default picker instead reads a SQLite-backed threads table (~/.codex/state_5.sqlite), and its cwd column is stored pre-lowercased at write time for paths on a case-insensitive mount — not just compared case-insensitively at read time. Querying that table directly:

    SELECT cwd FROM threads WHERE id='<id>';
    -- /mnt/d/work/.../lowercased/full/path
    

    while the live directory (and the value actually recorded in that same session's own rollout .jsonl, session_meta.payload.cwd) is mixed-case. Systemic on this machine — every recent session on this case-insensitive drive has a lowercased cwd in threads, while sessions predating a certain point kept correct casing.

    Looks like the normalization from #8000 needs to also apply wherever cwd gets written into threads, not just the legacy rollout-file lookup. Happy to share more diagnostics if useful.

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

    CLIIssues related to the Codex CLIbugSomething isn't workingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions