Skip to content

Isolate curated plugin sync Git environment - #29785

Merged
etraut-openai merged 1 commit into
mainfrom
etraut/isolate-plugin-sync-git-environment
Jun 24, 2026
Merged

Isolate curated plugin sync Git environment#29785
etraut-openai merged 1 commit into
mainfrom
etraut/isolate-plugin-sync-git-environment

Conversation

@etraut-openai

@etraut-openai etraut-openai commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Why

Several users have reported data loss from this bug, including tracked files being deleted or replaced and branches appearing to be reset to the curated plugins repository. This can happen during startup, before the model chooses to edit anything.

Ambient repository variables such as GIT_DIR and GIT_WORK_TREE can override the repository selected by git -C, redirecting startup sync's git reset --hard and git clean -fdx into the user's active workspace.

What

Route every startup-sync Git invocation through a shared command builder that removes repository-local environment variables before execution. Add regression coverage to keep those variables isolated.

Fixes #27416

@etraut-openai
etraut-openai marked this pull request as ready for review June 24, 2026 03:11
@etraut-openai etraut-openai changed the title [codex] Isolate curated plugin sync Git environment Isolate curated plugin sync Git environment Jun 24, 2026
@etraut-openai
etraut-openai merged commit 134646e into main Jun 24, 2026
31 checks passed
@etraut-openai
etraut-openai deleted the etraut/isolate-plugin-sync-git-environment branch June 24, 2026 23:04
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Codex CLI plugin sync writes bundled plugin marketplace into active workspace

2 participants