Skip to content

Archiving chat fails. MCP returns “rollout path … must be in sessions directory” #5290

@meAloex

Description

@meAloex

What version of the VS Code extension are you using?

Codex 0.52.0

What subscription do you have?

Pro subscription

Which IDE are you using?

Visual Studio Code — Insiders 1.106.0-insider

What platform is your computer?

Microsoft Windows NT 10.0.26120.0 x64

What issue are you seeing?

Clicking Archive task shows a red toast “Failed to delete task.” The item stays in Recent → Local tasks. In the logs, MCP rejects the operation with an invalid-request error saying the rollout file path "must be in sessions directory”.

Image

What steps can reproduce the bug?

  1. Open the Codex panel → Recent
  2. In Local tasks, open the item menu (…) and click Archive task
  3. Observe a red toast Failed to delete task, the conversation is not archived/removed

What is the expected behavior?

The conversation is moved to Archived (or removed from Recent) with no error

Additional information

Logs:
[error] MCP error ... {"code": -32600,
"message": "rollout path %USERPROFILE%\\.codex\\sessions\\2025\\10\\16\\rollout-2025-10-16T13-04-22-...jsonl must be in sessions directory"}
[error] MCP error ... {"code": -32600,
"message": "rollout path %USERPROFILE%\\.codex\\sessions\\2025\\10\\15\\rollout-2025-10-15T17-54-33-...jsonl must be in sessions directory"}

Real (but changed for security)
2025-10-17 17:21:06.479 [error] Received MCP error: 05d8f9e8-54b2-43e7-ae9e-3809a32525ad {"code":-32600,"message":"rollout path C:\\Users\\Aloex\\.codex\\sessions\\2025\\10\\15\\rollout-2025-10-......-54-33-.......-.......jsonl must be in sessions directory"}

Hypothesis (Windows path validation)
The server likely validates that the rollout file is inside the sessions dir using a naive startsWith/POSIX check or mismatched normalization.

On Windows, C:\… + backslashes/drive letter/case can make a valid path fail the “inside sessions” check after realpath/resolve

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingextensionIssues related to the VS Code extensionwindows-os

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions