Skip to content

fix(provider): concurrent launch homes with symlink and merge - #91

Merged
cursor[bot] merged 2 commits into
devfrom
cursor/isolated-home-mcp-a72a
Aug 28, 2026
Merged

cursor[bot] merged 2 commits into
devfrom
cursor/isolated-home-mcp-a72a

Conversation

@xjoker

@xjoker xjoker commented Aug 28, 2026 •

Copy link
Copy Markdown
Owner

Each provider launch now uses its own Codex home so overlapping models cannot rewrite ChatGPT keys in the user config.toml.

Why: Sharing and stripping/restoring the user config.toml is a race when two (or more) sessions run at once. The later restore wins and can drop the other session’s MCP edits or put the wrong model keys back.

What changed:

  • Per-launch directory: $CODEX_SWITCH_HOME/providers/<alias>/runs/{pid}-{nanos}-{seq}/ as the child’s CODEX_HOME
  • prompts/, skills/, and AGENTS.md are symlinked to the user home (Windows copy fallback if symlink fails)
  • Isolated config.toml keeps MCP and other non-model keys; omits model / model_provider / model_reasoning_effort / model_catalog_json / model_providers / web_search
  • On exit, a short codex-config.lock three-way-merges those non-model keys back (disjoint MCP servers from overlapping sessions are all kept)
  • User ChatGPT model / model_reasoning_effort are never rewritten for the session
  • auth.json is not copied or swapped

Model and endpoint still come only from codex -c.

Version: 20260828.5.0. Rolling dev tag waits on three-platform CI.

Open in Web Open in Cursor 

cursoragent and others added 2 commits August 28, 2026 08:29
Do not rewrite the user config.toml while Codex runs: overlapping launches
would restore over each other. Each launch gets its own run directory,
links prompts/skills/AGENTS.md to the user home, and three-way-merges
non-model keys (MCP) back on exit.

Co-authored-by: lolitaupdate <[email protected]>
Supersede the untagged 20260828.4.0 shared-home restore that races when
two provider launches overlap.

Co-authored-by: lolitaupdate <[email protected]>
@xjoker
xjoker marked this pull request as ready for review August 28, 2026 08:33
@cursor
cursor Bot merged commit 96fab37 into dev Aug 28, 2026
4 checks passed
@xjoker
xjoker deleted the cursor/isolated-home-mcp-a72a branch September 9, 2026 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants