Skip to content

About

Version-locked Windows/WSL Codex pets path patch with an optional Ember built-in replacement.

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Codex WSL Pets Patch

A version-checked WSL custom-pet launcher for the original Windows Store ChatGPT/Codex app, plus Ember artwork and legacy side-by-side patches.

This is an unofficial workaround, not supported by OpenAI. It never modifies the Microsoft Store-managed package. Unknown versions and changed binary checksums are rejected.

Current app: 26.908.4834.0

This build has a native WSL home resolver, but the pet service enables it only when the Windows app process has a non-empty WSL_DISTRO_NAME. A normal Store launch may not have that flag. The new launcher supplies it only to the child app process and starts the original manifest-declared app\ChatGPT.exe.

The inspected service applies this flag when it:

  • lists custom pets;
  • loads the selected custom pet; and
  • creates a custom pet.

No application copy, separate browser profile, global environment change, or config.toml edit is involved. The original sign-in and settings remain in use.

Important limits:

  • Fully quit the app first, including its tray process. A second launch cannot change an existing process's environment.
  • A Store tile, pinned executable, or direct app-screen launch bypasses this shortcut workaround. It is not a system-wide launch hook.
  • Pet resolution uses the default WSL distribution. The flag's value does not choose a different distribution; the installer detects the actual default.
  • This does not repair MCP transports or Chrome control, or relay standalone WSL CLI activity to the desktop pet.

OpenAI's Pets documentation covers the supported pet UI. This project addresses the additional Windows/WSL launch behavior above.

Install the standard-app launcher

Requirements: the validated x64 Windows Store package, Windows PowerShell 5.1 or newer, and a working default WSL distribution with Bash. Node.js is only needed for tests and legacy patching.

From Windows PowerShell, in the repository:

.\scripts\install-standard.ps1 -Action Install -ReplaceShortcut -InstallCustomEmber

From WSL:

cd ~/code/codex-wsl-pets-patch
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "$(wslpath -w "$PWD/scripts/install-standard.ps1")" -Action Install -ReplaceShortcut -InstallCustomEmber

Launcher files go under %LOCALAPPDATA%\CodexWslPetsPatch\standard. The installer creates or replaces one shortcut: %APPDATA%\Microsoft\Windows\Start Menu\Programs\ChatGPT.lnk. Existing shortcuts require -ReplaceShortcut and are backed up first. Other shortcuts and pinned tiles are left alone.

-InstallCustomEmber copies the revised custom pet to both the Windows Codex home and the default WSL Codex home. Omit it to keep current pet files. If an existing Ember differs, add -OverwriteCustomEmber only if replacing it is intended; changed files are backed up alongside the originals. Older sheets and unrelated files are retained.

Fully quit ChatGPT/Codex, start the managed ChatGPT shortcut, then select Ember in Settings → Pets. Refresh the custom list if needed.

Verify, update, or restore

.\scripts\install-standard.ps1 -Action Verify
.\scripts\launch-standard.ps1 -Verify
.\scripts\install-standard.ps1 -Action Restore

Verification is read-only. It checks package hashes, launcher files, shortcut ownership, and any Ember assets installed by this installer. The launcher's -Verify prints the original executable and current WSL pet directory without opening the app.

Restore restores the previous shortcut byte-for-byte, or removes only the new shortcut if none existed. It refuses to overwrite a shortcut changed since installation. Launcher files, backups, and custom pets are deliberately retained. A previous workaround shortcut is restored as it was.

After a Store update, fetch a repository version that explicitly supports the new package and rerun Install and Verify. Every launch discovers the installed package, avoiding stale executable paths, but still rejects unvalidated versions. Restore works even if the app is updated or removed.

Supported builds

Windows Store package (x64) Supported route Ember
26.908.4834.0 Standard-app launcher; no separate profile or archive rewrite Flare-free custom pet
26.818.8289.0 Legacy side-by-side installer; native WSL resolver Original built-in replacement; revised custom pet optional
26.818.5229.0 Legacy side-by-side installer; exact path rewrite Original built-in replacement; revised custom pet optional

There is no implemented or validated built-in replacement for the current build. The old installer reports which new installer to use instead.

Legacy built-in replacement

For the two older supported packages only:

.\scripts\install.ps1 -Action Install
.\scripts\install.ps1 -Action Verify
.\scripts\install.ps1 -Action Restore -StopPatchedApp

This copies the app, replaces the built-in codex pet with Ember, and creates a separate desktop shortcut/profile. It does not hand off to the Store executable. The original sprite and exact output hashes remain unchanged for reproducibility. -BuiltInReplacement None skips the replacement; -InstallCustomEmber also copies the revised custom pet to the Windows Codex home.

Ember animations

The revised sheet removes the tail flare while retaining glowing eyes and paws. It has all 73 version-2 frames, 15 blank cells, and transparent borders with at least three pixels of clearance. Its new filename avoids reusing the old image cache.

Codex supplies the interaction logic; the artwork contains no code. See Interactions for the state map and visual-testing limits.

Tests

npm test
npm run check
.\scripts\test.ps1
.\scripts\test.ps1 -Integration -Lifecycle

Node tests check version locks, rejection of changed binaries/signatures, and actual PNG frame occupancy/transparency. Windows tests cover argument quoting, child-only environment changes, package checks, shortcut creation, and pet backups.

On the current build, -Integration reads the installed archive and checks the exact list/load/create signatures and WSL resolver. -Lifecycle tests temporary shortcut install, repeat install, verify, external-edit protection, restore, and reinstall without launching the app or touching your real shortcut/pets. The legacy temporary archive-patching tests remain available for older builds.

These checks do not replace manual acceptance testing of the floating pet and each animation.

More information

Background: OpenAI issue #20730, issue #21471, and Tairitsua/codex-wsl-custom-pets-patch.

License

Code and documentation: MIT. Both Ember spritesheets: CC0 1.0. Anyone may use, modify, and redistribute them, including commercially. No OpenAI/Microsoft application binaries are distributed.

About

Version-locked Windows/WSL Codex pets path patch with an optional Ember built-in replacement.

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages