You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Chat: show omp's blob-store pictures on macOS and Windows (needs a descriptor-relative open) #2004
#1998 shows omp's pictures in Chat. omp keeps a picture's bytes in its blob store (<data>/blobs/<sha256>) and writes blob:sha256:<digest> in the transcript. To serve such a picture without ever reading bytes from outside the store that was authorized with the transcript, the bridge opens the blob through a descriptor of the store: on Linux it opens the store as a directory without following a link, checks that descriptor is the directory authorized with the transcript (fstat dev:ino) and the one the path names (/proc/self/fd), then opens the blob through it (/proc/self/fd/<fd>/<digest>, O_NOFOLLOW).
Node has no descriptor-relative open (openat) on macOS or Windows. Checked on macOS: /dev/fd/<dir fd>/<name> is ENOENT. A blob opened by name there follows whatever a directory above it is swapped to for that moment; the merge pass's gate reproduced that on the by-name branch. So since #1998, blob-backed omp pictures are not shown on macOS or Windows (fail closed). Inline omp pictures and every Codex picture are shown on all platforms.
What would lift it
A race-free open of a name relative to a held directory descriptor on macOS (openat, or fcntl(F_GETPATH) to bind the opened file to the held directory) and on Windows (a handle-relative open, e.g. NtCreateFile with a root directory handle), for example through the Rust PTY host (crates/pty-sidecar), which already runs as a native helper. The blob read is openBlob in server/codex-images.ts; blobPlatformForTests runs its non-Linux branch in tests.
Where
Chat on a macOS or Windows PC running omp (local or remote).
I reproduced the Windows half on native Windows 11 (DESKTOP-K8DAINV), main 4d5edf3, Bun 1.4.2. A 70-byte PNG stored as <store>/<sha256> with a matching digest is refused: ompBlobPicture(blobs, "image/png", "blob:sha256:<digest>") and ompBlobImageType both return null, because openBlob returns null on every platform except Linux. The same bytes sent inline are typed image/png. So Chat still does not show blob-backed omp pictures on Windows. Fixing it needs the handle-relative open this issue describes.
Still reproduces on current main (checked for the device sweep). Blob-backed omp pictures are not served on macOS. The fail-closed branch is still in place: openBlob returns null unless the platform is linux (server/codex-images.ts).
Machine: eamac, macOS 27.0.1, Bun 1.4.3. Code: a fresh clone of origin/main 4d5edf38.
Steps: make a store <tmp>/blobs/ holding a 1x1 PNG named by its sha256. Then call ompBlobPicture(blobs, "image/png", "blob:sha256:<digest>"), and open /dev/fd/<dir fd>/<digest> from the store's directory descriptor.
macOS result: ompBlobPicture -> null, and /dev/fd/<dirfd>/<name> -> ENOENT.
Same probe on Linux (P620, Bun 1.4.3): image/png, and the /dev/fd open succeeds.
Left open: it still needs the descriptor-relative open (openat or F_GETPATH on macOS) that the issue describes. Windows was not checked in this lane.
Activity
chore(chat): say where omp blob pictures show, and prove the event-lo…
chore(chat): say where omp blob pictures show, and prove the event-lo…
feat(chat): show omp's pictures from its blob store, and the pictures…
devswha commentedon Oct 27, 2026
I reproduced the Windows half on native Windows 11 (DESKTOP-K8DAINV), main 4d5edf3, Bun 1.4.2. A 70-byte PNG stored as
<store>/<sha256>with a matching digest is refused:ompBlobPicture(blobs, "image/png", "blob:sha256:<digest>")andompBlobImageTypeboth return null, becauseopenBlobreturns null on every platform except Linux. The same bytes sent inline are typedimage/png. So Chat still does not show blob-backed omp pictures on Windows. Fixing it needs the handle-relative open this issue describes.devswha commentedon Oct 28, 2026
Still reproduces on current main (checked for the device sweep). Blob-backed omp pictures are not served on macOS. The fail-closed branch is still in place:
openBlobreturns null unless the platform is linux (server/codex-images.ts).4d5edf38.<tmp>/blobs/holding a 1x1 PNG named by its sha256. Then callompBlobPicture(blobs, "image/png", "blob:sha256:<digest>"), and open/dev/fd/<dir fd>/<digest>from the store's directory descriptor.ompBlobPicture->null, and/dev/fd/<dirfd>/<name>->ENOENT.image/png, and the/dev/fdopen succeeds.Left open: it still needs the descriptor-relative open (
openatorF_GETPATHon macOS) that the issue describes. Windows was not checked in this lane.fix(chat): show omp's blob-store pictures on macOS and Windows (#2004) (