OpenAI Codex VS Code extension starts new chats in the wrong project folder
Mario34 · ghdev · 2026-07-21
A VS Code user reports that new Codex chats are being created in an old project instead of the folder currently open in the active window.
Symptoms
- cwd and writable root point to a stale workspace, e.g. /Users/<user>/Work/monorepo-app
- asking Codex to run pwd returns the wrong project path
- the extension appears to be reading selected-project from global user storage rather than the active VS Code workspace
Why it matters
The report warns this could be unsafe: commands, reads, and edits may run against a repository different from the one visibly open in VS Code.
Reproduction
- Open multiple VS Code windows with different folders
- Use Codex in one project
- Switch to another window
- Start a new chat
- The new thread still targets the old workspace
More from coding & agent
- Dev builds interactive 3D product experience with GPT-6 Astra + Hyper3D Rodin — nikola_mr64990 · 2026-09-11
- Codex tip: use Sol with Astra and Luna sub-agents to save usage — pvncher · 2026-09-11
- agents-best-practices: a provider-neutral Agent Skill for designing and auditing agentic harnesses — tom_doerr · 2026-09-11
- Cognition's SWE-2 uses a KKT duality argument in RL to shift the effort Pareto curve — YouJiacheng · 2026-09-11
- First-ever Three.js Conference lands in Paris, with a panel on AI-shortened design workflows — OdinLovis · 2026-09-11
- Data engineering, not agent frameworks, is the real bottleneck for enterprise AI agents — dhruv2038 · 2026-09-11