Custom desktop pets show scaling artifacts from forced sprite resampling

Open 💬 4 comments Opened May 2, 2026 by kalanihelekunihi

Custom Codex desktop pets can show jagged/aliased edges even when the installed spritesheet is clean and correctly sized.

I tracked this to the desktop avatar renderer, not the source image. Custom pet spritesheets use the same fixed atlas contract as bundled pets: 8 x 9 cells, 192x208 per cell, 1536x1872 total. The renderer then draws each cell into a smaller 7.04rem CSS element with background-size: 800% 900% and forces image-rendering: pixelated.

That means a clean 192x208 sprite is resampled to roughly 113x122 CSS pixels at a default 16px root font size. On high-DPI displays that can also map to fractional physical pixels. The forced pixelated resampling is fine for bundled pixel-art pets, but it introduces artifacts for smooth/high-resolution custom pets.

The fix should make avatar image-rendering configurable:

  • Keep bundled pets rendering as pixelated.
  • Default custom pets to auto.
  • Optionally add custom-pet metadata later so pet authors can choose auto or pixelated explicitly.

I have a patch proposal that changes the avatar root CSS to use a custom property:

image-rendering: var(--codex-avatar-image-rendering, auto);

Then the avatar component can set that custom property to pixelated for bundled assets and auto for custom spritesheets.

The public openai/codex checkout does not appear to include the desktop webview avatar renderer source, so I could not submit a source-level code PR against the public tree. The packaged desktop app evidence maps to webview/assets/codex-avatar-D82knaKt.css, webview/assets/codex-avatar-BpKnWN_W.js, and webview/assets/avatar-overlay-page-Dj9Zinq_.js in the app bundle.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗