Archiving chat fails. MCP returns “rollout path … must be in sessions directory”
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”.
<img width="962" height="1501" alt="Image" src="https://github.com/user-attachments/assets/d555ec7c-3a29-4404-9d57-39e7383cf781" />
What steps can reproduce the bug?
- Open the Codex panel → Recent
- In Local tasks, open the item menu (…) and click Archive task
- 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
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗