Codex Desktop pet can start half-cropped when summoned with /pet
What version of the Codex App are you using?
Codex Desktop 26.429.30905, build 2345.
What platform is your computer?
macOS 26.3 build 25D125, Apple Silicon / arm64.
What issue are you seeing?
When I summon the desktop pet with /pet, some pets can start rendered as trimmed/cropped, as if only about half of the pet image is visible. The pet asset itself appears to be valid; the bad state looks like the avatar overlay or sprite frame is clipping the rendered cell at initial display time.
This is visible on my machine whenever I summon /pet with an affected pet.
What steps can reproduce the bug?
- Open Codex Desktop.
- Select an affected pet in Settings > Appearance > Pets, or use the currently selected affected pet.
- In a Codex thread, run
/petto wake/show the desktop pet. - Observe the initial desktop pet render.
Expected behavior
The full pet sprite should be visible when /pet summons the overlay. The initial frame should fit within the overlay window without clipping, regardless of which built-in or valid custom pet is selected.
Actual behavior
The pet can initially appear trimmed/cropped, with only part of the image visible.
Related issues searched
I searched existing openai/codex issues on 2026-05-02. Close but not exact matches:
- openai/codex#20752 reports pet/avatar overlay and notification tray clipping on macOS Screen Sharing. This may share the same overlay clipping root, but this report is specifically about the pet starting half-cropped when summoned with
/pet. - openai/codex#20808 reports custom pet scaling artifacts from forced sprite resampling. That is related to renderer sizing, but it is about aliasing/resampling rather than the sprite being clipped.
- openai/codex#20730 reports custom pet path loading in WSL, not this render issue.
Local evidence from the packaged app
The issue does not look like a malformed atlas dimension problem:
- The installed custom pet on this machine,
~/.codex/pets/hyrax/spritesheet.webp, is1536x1872. - The packaged built-in spritesheets are also
1536x1872: bsod-spritesheet-v4-BRrRVy1T.webpcodex-spritesheet-v4-Bl6P89d_.webpdewey-spritesheet-v4-gAYk_M9g.webpfireball-spritesheet-v4-BtU8R9Qp.webpnull-signal-spritesheet-v4-CCoTR-8t.webprocky-spritesheet-v4-3RlTi26B.webpseedy-spritesheet-v4-CdlE_fn9.webpstacky-spritesheet-v4-CaUJd4fY.webp
Those dimensions match the renderer contract of an 8 x 9 atlas with 192x208 cells.
The packaged renderer appears to crop each frame through CSS background positioning rather than by drawing an <img>:
webview/assets/codex-avatar-D82knaKt.csssets the avatar root toaspect-ratio: 192/208,width: 7.04rem,background-size: 800% 900%, andimage-rendering: pixelated.webview/assets/codex-avatar-BpKnWN_W.jsmaps animation frames by row/column and setsbackgroundPositionfromcolumnIndex / 7 * 100%androwIndex / 8 * 100%.webview/assets/avatar-overlay-page-Dj9Zinq_.jsrenders the avatar inside a full-screen transparent overlay container withoverflow-hidden.
Inference: if the overlay window bounds, CSS root size, or first background-position/layout pass is stale or computed before the sprite/layout is fully ready, a valid 192x208 frame can be clipped at summon time. This would explain why valid spritesheets can still start visually trimmed.
Additional information
No screenshot is attached from this automation run, but the issue is visible on the reporter's machine when /pet is summoned.
2 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I hit the same class of problem on a display-scaling setup where the floating pet overlay clipped the bottom/right of a custom pet. I made a temporary workaround sample here:
https://gist.github.com/jazzyalex/6128e1127c3df27194bb23055363af9d
It installs a sample custom pet named
Boba Smalland includes the Python code used to rebuild a custom pet atlas with extra transparent margin. The workaround keeps the expected Codex Desktop atlas size/layout (1536 x 1872,8 x 9,192 x 208cells) but scales each frame down inside its cell so the clipped floating overlay still shows the whole pet.This is not a product fix; it is just a stopgap for users who want a usable custom pet until the Desktop overlay and Settings preview use consistent frame sizing/clipping.
Install test:
Then restart Codex Desktop and select
Boba Smallin Settings if needed.