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
- NVIDIA says Nemotron 3 Ultra hit 97.1% on agentic RTL chip-design tasks — NVIDIAAI · 2026-07-27
- Tokyo Agent Forge hackathon shipped production-ready AI agents in one day — DavidBennett__ · 2026-07-27
- Long-running agents will need immutable event logs, this thread argues — sebpaquet · 2026-07-27
- Agentic Data Science in Practice: Agents Write Code but Answer Wrong Questions — hugobowne · 2026-07-27
- A VS Code extension adds Markdown-style highlighting to Alchemy string templates — samgoodwin89 · 2026-07-27
- Claude’s Stripe MCP connector is being called unusable after repeated disconnects — evielync · 2026-07-27