Skip to content

[codex] Fix watcher repair while Codex is running#266

Draft
Adidas8023 wants to merge 1 commit into
b-nnett:mainfrom
Adidas8023:codex/auto-repair-running-codex
Draft

[codex] Fix watcher repair while Codex is running#266
Adidas8023 wants to merge 1 commit into
b-nnett:mainfrom
Adidas8023:codex/auto-repair-running-codex

Conversation

@Adidas8023

Copy link
Copy Markdown

Summary

  • allow watcher-triggered repair to patch Codex.app on disk even when Codex is currently running
  • keep interactive repair behavior unchanged: it still asks before repatching a running macOS app
  • add regression tests for watcher vs interactive running-app repair behavior

Root cause

After a Codex app update, the official app bundle replaces the patched app.asar and removes the Codex++ loader. The watcher then sees Codex already running without Codex++; the current repair path can postpone before writing the loader back, so the app stays unpatched even after restart attempts.

Watcher repair is better handled by repairing the app on disk first, then asking the user to restart so the already-running process can load the patched app on next launch.

Validation

  • node --import tsx --test packages/installer/test/repair-running-codex.test.ts
  • npm test
  • npm run build

Related: #251, #253

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.

1 participant