codex - 💡(How to fix) Fix Codex desktop resumed continuing chat with wrong workspace/cwd and AGENTS.md

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

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.

Error Message

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.

Root Cause

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.

Fix Action

Fix / Workaround

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.

RAW_BUFFERClick to expand / collapse

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.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

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.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING