Codex Desktop: image thumbnails fail with "File stream access denied" — estuary download URL is fetched without Authorization
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- electron, javascript
- Domain
- api, authentication, desktop
Research direction
Start at shouldInferCodexApiAuth in the packaged main bundle and the image resolver in the prompt-editor chunk; compare the estuary download request with the existing auth inference paths. Reproduce the Windows image-thumbnail failure and verify that estuary requests include credentials and the thumbnails render successfully.
Written by the indexing model from the issue text.
Description
Summary
Image attachments in Codex Desktop (Windows) render as red "Failed" tiles. The renderer log shows:
warning [electron-message-handler] Image asset download failed
assetPointer=sediment://file_...
errorMessage="{\"detail\":\"File stream access denied.\"}"
pointerScheme=sediment resolverKind=codex
Root cause: the desktop fetches the estuary download URL without any credentials, and /backend-api/estuary/content requires auth. Verified by replaying the exact requests:
| Request | Result |
|---|---|
GET /backend-api/files/download/{file_id} (with Bearer token) |
200 → returns signed download_url |
GET https://chatgpt.com/backend-api/estuary/content?id=...&sig=... anonymous |
403 {"detail":"File stream access denied."} |
| Same estuary URL with Bearer + ChatGPT-Account-Id | 200, valid image bytes |
The signed sig query param is not sufficient on its own — the endpoint still demands the Bearer token.
Why the app sends no credentials
In the packaged main bundle (build 26.715.72359):
performDesktopFetchattaches auth only when the request carries theX-OpenAI-Attach-Authmarker header, or whenshouldInferCodexApiAuth(url)returns true.shouldInferCodexApiAuthwhitelists only/wham,/api/wham,/backend-api/wham— estuary paths are missing.- The image resolver (
prompt-editorchunk) fetches thedownload_urlwithrequestHeaders = null, so only the infer path could ever attach auth — and it doesn't cover estuary.
The upload path does special-case estuary URLs (unwrapping combined upload URLs); the download path was missed, presumably during the estuary storage migration.
Suggested fix (verified locally)
Add estuary to the infer list:
|| n === `/backend-api/estuary` || n.startsWith(`/backend-api/estuary/`)
in shouldInferCodexApiAuth. I applied this one-line change to a local copy of the packaged app.asar and all previously failing thumbnails (4 sediment://file_... assets across multiple conversations) now download and render correctly.
Environment
- Codex Desktop app version 26.715.72359 (MSIX package 26.715.10079.0)
- Windows 11, ChatGPT Pro account
- Repro: send any image in the composer, then reopen the conversation (or focus it after the local copy is gone) — the thumbnail request goes through the estuary resolver and fails.
Possibly related
- #29880 (macOS, thumbnails as gray placeholders) — likely the same estuary auth gap
- #32677 / #33034 (plugin icons/thumbnails broken) — same asset-download code path
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
A-linter
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxc-project/oxc#26863 ·