Skip to content

Windows desktop troubleshooting blocked: attachments listed as available but local files cannot be read #45468

Open

Description

@JT-TPE

Summary

During troubleshooting of Codex in the Windows ChatGPT desktop app, attached diagnostic files are listed as available with scratch paths, but the assistant cannot consume them. Image attachments repeatedly produce No such file or directory (os error 2). This creates a support loop: the assistant asks for diagnostics, the user supplies attachments, and the assistant asks the user to paste or split the same information again.

This report is submitted by the assistant at the user's explicit request. Private paths, account information, project names, and diagnostic contents have been omitted.

Environment

  • Windows desktop app, Codex surface
  • Agent environment shown in settings: Windows native
  • Integrated terminal: PowerShell
  • Exact desktop/bundled Codex version and Windows build: not verified; the diagnostic attachment containing version output could not be read

Reproduction sequence observed in this conversation

  1. The desktop UI shows Windows setup incomplete / setup stopped, alongside failure to create a local project.
  2. The assistant requests PowerShell diagnostic output.
  3. The user supplies output as TXT and Markdown attachments, and also uploads screenshots.
  4. Attachment metadata announces that copies are available at local scratch paths.
  5. Image loading repeatedly fails with the following error (path anonymized):
Codex could not read the local image at `/workspace/scratch/<session>/upload/<attachment>.png`: No such file or directory (os error 2)
  1. Some earlier screenshots remained visually available in the conversation despite the local-image error, but the assistant had no callable local filesystem/terminal reader for the TXT/Markdown contents. Attachment instructions also directed it to read the scratch copies instead of using the Library tool.
  2. The assistant repeatedly requested repasting/smaller excerpts, shifting the ingestion failure onto the user without resolving the original setup problem.

Expected behavior

  • Announced attachment paths should exist in the active execution environment and have a usable reader, or attachment contents should be exposed through a working supported alternative.
  • An attachment ingestion failure should be distinguishable from the user's local Windows sandbox/setup failure.
  • The assistant should obtain actionable setup diagnostics without requiring users to repeatedly reformat and resubmit the same output.

Actual impact and uncertainty

The user cannot complete troubleshooting or create the intended local project. Native setup and attachment ingestion are two observed failures; their causal relationship is unknown. Administrator and non-administrator setup paths were attempted/reported unsuccessful, but the effective fallback configuration and current backend error were not verified. This report does not claim that a specific Windows permission or sandbox implementation is the root cause.

Please route the attachment availability/tool-capability mismatch to the relevant desktop/Work team if it belongs outside this repository.

Activity

  1. added
    bug
    app
    windows-os
    tool-calls
    on Sep 14, 2026
  2. Spon4ik commented on Oct 4, 2026

    @Spon4ik

    Additional reproduction from ChatGPT Work mode (web, 2026-10-04): a user-uploaded PNG was announced as available under /workspace/scratch/<session>/upload/image(...).png, but Codex image loading failed with No such file or directory (os error 2). The original attachment was present in the conversation/Library inventory, while the announced scratch path was not readable from the active workspace. This blocks inspection of the user's supplied evidence and stalls the task. Please include Work mode / browser sessions in triage; this report currently describes Windows desktop + PowerShell. The attachment's contents and session-specific path are intentionally omitted.

  3. Spon4ik commented on Oct 4, 2026

    @Spon4ik

    Read-only source trace against public openai/codex main at de3721a7be07054c8c2a41102b5a501f34155361 narrows the reported error, but does not establish the Work-mode staging root cause:

    • The app-server protocol's LocalImage input carries a path, and into_core forwards that path unchanged: turn.rs. The protocol type documents it as a local image path provided by the user: user_input.rs.
    • When serializing that input, Codex calls std::fs::read(&path) and on failure emits Codex could not read the local image at {path}: {error}: models.rs and error formatter. This matches the reported error prefix. If Work mode uses this public path, the observed failing operation is the Codex process's local file read; ENOENT alone does not tell us whether staging failed, the file disappeared, or the path belongs to another filesystem namespace.
    • The distinct view_image handler asks the selected environment filesystem for metadata and then reads through that filesystem, with different unable to locate/read image messages: view_image.rs.
    • The checked-out source defines attachment storage in terms of bytes and inline or file_id references, not local scratch-path materialization: attachment-store, image preparation. A targeted search of this checkout found no workspace/scratch or scratch/upload implementation.

    I could not establish the exact last-good staging boundary: the reproduction redacts its session-specific path/attachment identifier, and this session has no access to that Work execution's filesystem or process namespace. No files were changed and no root cause or fix is claimed. The next required evidence is a same-event trace from the Work attachment resolver/materializer through the path handed to the Codex process, including file existence and filesystem/container identity at handoff and at this read.

  4. Spon4ik commented on Oct 5, 2026

    @Spon4ik

    Updated source trace against public openai/codex main at 823ea830c0fd418b09ff02d36cad9a1fff66465b:

    • The v2 app-server request type has UserInput::LocalImage { path: PathBuf }: turn.rs.
    • For turn/start, the app-server processor maps params.input through V2UserInput::into_core; it separately resolves params.cwd and builds the runtime environment. The LocalImage conversion copies path unchanged into core: turn_processor.rs, turn.rs conversion. The public path does not join this image path to the separately resolved cwd or map it through the active environment filesystem.
    • Core then calls std::fs::read(&path) and formats a local-image error on failure: models.rs read, error formatter. Thus, if Work mode uses this public request route, the opened path is interpreted in the Codex process's filesystem namespace.
    • view_image is different: it resolves against the selected tool environment and calls that environment filesystem's get_metadata and read_file, with distinct errors: view_image.rs.
    • The public attachment-store interface receives bytes and returns inline bytes or a file_id; image preparation uses it for prepared image bytes. I found no workspace/scratch or scratch/upload staging implementation or bridge from Work attachment objects to the LocalImage.path field in the inspected public source/search. See attachment-store and image preparation.

    The missing component is the Work client attachment materializer/path adapter: the layer that locates or writes the uploaded object under the announced scratch path, checks that copy, and populates the app-server LocalImage.path. The issue confirms the attachment object is present in the conversation/Library inventory, but provides no successful existence check for the local scratch copy. The first confirmed local-path read in this public route is the failing std::fs::read; the last successful local existence point cannot be identified from available evidence. No staging/Codex filesystem identity, mount mapping, or path transformation telemetry is present, so a namespace/path mismatch remains a hypothesis, not a confirmed root cause.

    Needed evidence is a correlated trace across that materializer and app-server handoff: redacted attachment/session ID; staging write completion plus stat/open result; exact sanitized path sent in turn/start; staging and Codex process/container/mount namespace identity; then Codex-side stat/open errno for that same ID/path. Include timestamps and size or content hash, never attachment contents or private full paths.

  5. RongNianXin commented on Oct 6, 2026

    @RongNianXin

    Follow-up from another Windows Codex Desktop case. The attachment was visibly present in the UI, and the same Markdown file opened successfully in VS Code. However, the path exposed to the agent differed from the actual local path by one character: the real directory was chatgpt-workflows-handoff-20261006-1, while the runtime reference was chatgpt-workflows-handoff20261006-1 (the hyphen after handoff was missing). The first path existed and was readable; the second returned No such file or directory. After correcting only that missing hyphen, the agent could read the file and run its embedded verification command successfully. This suggests an attachment path serialization or normalization problem between the desktop UI and the agent/tool runtime, rather than an upload failure. Could the team log and compare the raw attachment path, the displayed path, and the path passed to the agent before tool dispatch?

  6. sstewart207 commented on Oct 21, 2026

    @sstewart207

    Additional reproduction: ChatGPT Web attachment button vs. drag-and-drop

    I'm reporting an additional reproduction discovered during an AI-assisted investigation with ChatGPT on October 20, 2026.

    Environment

    • Platform: ChatGPT Web
    • OS: Windows 11
    • Browser: Microsoft Edge 157
    • Interface: ChatGPT Work / Codex execution environment

    Observed behavior

    When uploading a PNG image through the ChatGPT attachment interface, the conversation receives an attachment reference and a local workspace path:

    /workspace/scratch/<session>/upload/image(20261021-065435).png
    

    However, Codex reports:

    Codex could not read the local image at
    `/workspace/scratch/<session>/upload/image(20261021-065435).png`:
    No such file or directory (os error 2)
    

    The file appears to be registered as an attachment, but the agent cannot access it at the provided filesystem path.

    Important additional observation

    The user reports different behavior depending on the upload method:

    • Attachment interface: Image becomes inaccessible to the agent.
    • Drag-and-drop: Image is accessible to the agent.

    This suggests a potentially useful difference between the attachment processing paths, although the root cause has not been confirmed.

    AI-assisted investigation

    ChatGPT independently searched existing public reports, identified this issue as a close match, and compared the observed error with the documented Codex image-loading failure.

    The investigation suggests examining the boundary between ChatGPT's attachment handling and the execution environment's local filesystem.

    In particular:

    1. Does each upload method produce the same attachment metadata?
    2. Is the file actually materialized in the execution environment before its path is passed to Codex?
    3. Do drag-and-drop and attachment-button uploads use different staging or path-resolution logic?
    4. Can the system verify that the referenced file exists before passing it to the agent?

    Expected behavior

    Both supported upload methods should make the image available to the model and its tools.

    Actual behavior

    The attachment-button workflow can produce a valid-looking file reference pointing to a nonexistent or inaccessible local file.

    This reproduction may help narrow the existing investigation. No specific root cause or fix is claimed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appbugtool-callswindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions