Concurrent Sessions Leak Workspace Root Across Projects

Open 💬 4 comments Opened May 23, 2026 by cblanquera

What version of the Codex App are you using (From “About Codex” dialog)?

26.519.22136 (3003)

What subscription do you have?

Pro 5x

What platform is your computer?

Darwin 24.6.0 arm64 arm

What issue are you seeing?

Codex Desktop appears to leak workspace and project context between concurrent chat sessions.

When a long-running chat is active in Project A, a new or separate chat opened in Project B can incorrectly inherit Project A's workspace state. The leaked state may include:

  • project root
  • current working directory
  • repository context
  • file tree / indexing context
  • AGENTS.md
  • SKILLS.md
  • tool execution scope
  • terminal execution context

This appears to be a session-isolation bug, not a history/sidebar issue.

The core problem is that project/workspace state does not always remain scoped to the active chat/session.

What I'm Experiencing

While a long-running task/chat is active in Project A, creating or using a separate chat session in Project B may incorrectly:

  • resolve relative paths from Project A
  • reference files from Project A
  • load the wrong AGENTS.md or SKILLS.md
  • assume commands should run in Project A
  • behave as though Project A is still the active workspace

<img width="761" height="706" alt="Image" src="https://github.com/user-attachments/assets/20e03d49-2450-41b7-b559-b4058eb4dd3c" />

What steps can reproduce the bug?

The issue appears intermittent, but it becomes easier to trigger with:

  • multiple active chats
  • long-running agent tasks
  • rapid switching between projects
  • concurrent background execution

Steps

  1. Open Project A in Codex Desktop.
  2. Start a long-running task/chat in Project A.
  3. Before that task finishes, open Project B.
  4. Start a new chat/task in Project B.
  5. Observe that the new session may:
  • reference files from Project A
  • assume cwd from Project A
  • load the wrong project instructions/context
  • behave as if Project A is still the active workspace

What is the expected behavior?

Each chat session should maintain fully isolated project state, including:

  • project root
  • cwd
  • repository context
  • file indexing context
  • AGENTS.md / SKILLS.md
  • tool execution context
  • terminal execution scope

A chat opened in Project B should never inherit context from Project A.

Additional information

Why this is distinct

This is not just:

  • a stale cwd after clicking between chats
  • a renamed/moved workspace path mismatch
  • missing chat history
  • sidebar/chat visibility problems
  • generic indexing issues

The distinct repro here is concurrent active sessions across different projects.

The failure mode is that a new session in Project B can behave as though Project A is still the active workspace, even though the user intentionally started the new session under a different project.

Scenario

  • multiple unrelated repositories/projects open concurrently
  • multiple long-running agent/chat sessions active at the same time

Suspected cause

This looks like some form of workspace/session state being stored or reused too broadly, for example:

  • global active workspace state
  • shared cwd cache
  • non-isolated agent execution context
  • shared repository metadata across sessions
  • workspace binding stored outside per-session scope

The observed behavior suggests workspace root context is being managed globally, or partially globally, rather than being strictly scoped per chat/session.

Severity: High.

This can cause:

  • edits in the wrong repository
  • command execution in the wrong repository
  • wrong file modifications
  • cross-project context contamination
  • accidental commits to unrelated repositories
  • incorrect AGENTS.md / SKILLS.md loading
  • loss of trust in multi-project agent workflows

For users running multiple concurrent coding agents across repositories, this is a data-integrity and safety issue.

Related issues

This appears related to, but distinct from:

  • #20725: Agent runtime CWD/worktree is not rebound when navigating between project chats

The difference here is that this report is specifically about concurrent active sessions across different projects leaking workspace/session state between chats, including project root, cwd, repo context, and possibly AGENTS.md / SKILLS.md.

Last Notes

This issue is distinct from:

  • missing chat history
  • disappearing sidebar chats
  • indexing/search issues

The underlying concern here is concurrent session/workspace isolation.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗