Codex desktop resumed continuing chat with wrong workspace/cwd and AGENTS.md
Summary
A continuing Codex desktop chat for [WORK_PROJECT_REPO] was resumed/routed with the wrong workspace context: [PERSONAL_FOLDER].
The prompt was typed in an existing project chat, but the model context for the next turn loaded cwd and AGENTS.md from an unrelated personal folder. The assistant then attempted Git/repo operations in that unrelated folder before the mismatch was noticed.
Environment
- App: Codex desktop
- App version:
26.519.5221.0 - OS: Windows
10.0.26200.8457 - Time observed:
2026-05-28 11:02 +08:00
Expected behavior
A continuing chat thread should preserve the original workspace binding and load the cwd / AGENTS.md associated with that thread's project.
If the app cannot safely restore the original workspace, it should warn the user or ask for confirmation before injecting a different workspace into the model context.
Actual behavior
The continuing chat was presented to the model with:
cwd = [PERSONAL_FOLDER]AGENTS.md instructions for [PERSONAL_FOLDER]
This did not match the ongoing conversation, which was about [WORK_PROJECT_REPO].
Impact
- Private local folder names can be exposed in model context and assistant replies.
- The assistant may run Git or filesystem commands in an unrelated workspace.
- The user can lose trust that a continuing project chat is still attached to the intended project.
Privacy note
I am intentionally redacting local paths, repository names, and user-identifying folder names from this public report. I can provide sanitized logs or further details privately if needed.
Mitigation attempted
I added a local global instruction telling Codex to verify that cwd matches the project implied by the conversation before running Git/filesystem/project commands. This is only a mitigation; the underlying issue appears to be in desktop thread/workspace routing or context restoration.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗