Skip to content

Resume does not restore the same project context as a fresh session in WSL (project-local MCP/skills diverge, $ skill picker becomes empty) #17560

Closed

Description

@Wool-yang

What version of Codex CLI is running?

0.120.0

What subscription do you have?

Paid ChatGPT plan (exact tier omitted for privacy)

Which model were you using?

gpt-5.4 xhigh

What platform is your computer?

WSL on Windows; workspace located on a mounted /mnt//... path

What terminal emulator and version are you using (if applicable)?

WSL terminal (exact emulator/version omitted for privacy)

What issue are you seeing?

In a WSL workspace on a mounted Windows drive, resuming an old Codex session does not restore the same effective project context as starting a fresh session in the same directory.

The most visible symptoms are:

  • project-local MCP behavior diverges from a fresh session
  • the $ skill picker in the TUI becomes empty after resuming an older session
  • a fresh session in the same workspace still shows system skills normally
  • explicit skill invocation can still work even when the $ picker is empty

This appears to be resume-specific state restoration behavior rather than a missing config or missing skill file on disk.

What steps can reproduce the bug?

  1. Use Codex CLI from WSL in a repository stored on a mounted Windows drive, for example under /mnt/<drive>/Program/<repo>.

  2. Add a project-local .codex/config.toml with at least one project-local MCP server.

  3. Optionally add a project-local skill under .codex/skills/<name>/SKILL.md.

  4. Start a fresh Codex TUI session in that workspace.

  5. Verify that fresh-session behavior is correct:

    • $ shows the usual system skills
    • project-local MCP is available
  6. Exit Codex.

  7. Resume an older session for the same workspace.

  8. Press $ again and compare with the fresh session.

Observed result in the resumed session:

  • the $ skill picker can be empty
  • project-local context is not equivalent to a fresh session in the same workspace

What is the expected behavior?

A resumed session should restore the same effective workspace-derived behavior as a fresh session started in that same directory.

That includes:

  • the same project-local MCP availability
  • the same system/project skill visibility in $
  • the same effective config derived from the workspace
  • no observable UX difference between fresh session and resumed session for the same project

Additional information

Additional findings from local investigation:

  • The workspace itself is valid: a fresh session in the same directory behaves correctly.
  • The issue is specific to resume behavior.
  • Explicit skill invocation can still work even when the $ picker is empty, which suggests a UI/session-state mismatch rather than "skills do not exist".
  • The problem reproduces in a WSL workspace on /mnt/....
  • Investigation strongly suggests fresh-session initialization and resumed-session initialization are not restoring the same project-derived runtime state.

Possible root-cause direction:

  • resume may be reusing an already-running thread/session state and not fully rebuilding workspace-derived config, skill state, and project-local MCP state the same way fresh startup does.

Privacy note:

  • exact repo name, drive letter, terminal brand/version, and subscription tier are intentionally omitted here.

Activity

  1. added
    bug
    on Apr 12, 2026
  2. added
    CLI
    windows-os
    session
    skills
    mcp
    TUI
    on Apr 12, 2026
  3. github-actions commented on Apr 12, 2026

    @github-actions
    Contributor
  4. removed
    mcp
    CLI
    session
    on Apr 12, 2026
  5. Wool-yang commented on Apr 12, 2026

    @Wool-yang
    Author

    Clarification on the path-related part of this bug:I am using Codex from inside WSL, not from a native Windows terminal.The path pattern involved here is:- expected / original workspace path in WSL: /mnt/<drive>/Program/<repo>- path spelling that can appear after resume: /mnt/<drive>/program/<repo>So the case change is happening in the WSL /mnt/... path space.If it helps to map this to the host filesystem, this corresponds conceptually to a Windows-side location like <Drive>:\Program\<repo>.The important point is that the bug is observed while using the Codex CLI/TUI from WSL, and the path-case change in the WSL path appears to interact with project-local config / MCP / skill restoration after resume.Privacy note: I am intentionally not including the exact repository name or exact local path.

  6. Necmttn commented on Jun 21, 2026

    @Necmttn

    Resume should rebuild project context with the same keying rules as a fresh session.

    Store both raw cwd and normalized project key, then on resume re-evaluate MCP/skills using the current filesystem view and show a diff if the project root changed. For WSL, include both /mnt/... and Windows-style path normalization evidence in diagnostics.

    Empty skill pickers should be explainable as context drift.


    Generated with ax.

  7. etraut-openai commented on Nov 15, 2026

    @etraut-openai
    Contributor

    Closing in favor of #15007, which tracks resumed sessions using different project configuration from fresh sessions. The WSL mounted-drive and empty skill-picker evidence here should remain available for that investigation.

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

    TUIbugskillswindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions