Image attachments visible to model are not available as local files for agent workflows

Resolved 💬 1 comment Opened Jun 2, 2026 by CharGrnmn Closed Jun 4, 2026

What version of Codex CLI is running?

codex-cli 0.136.0

Platform

macOS / Darwin 24.6.0 x86_64

What issue are you seeing?

When a user attaches an image directly in chat, the model can visually inspect the image, but the attachment is not exposed to the agent as a local file path or durable file in the workspace.

This creates a broken workflow for file-oriented agent tasks. For example, a user may attach an image and ask Codex to copy it into the repo, rename it, add it to evidence/assets, or upload it through a browser form. The assistant can describe the image, but cannot copy/upload it because there is no filesystem path or attachment-save tool available. The only workaround is to ask the user to manually save the same image into the workspace and then provide/check the filename.

This is especially confusing because the image is clearly available to the model for visual understanding, so users reasonably expect the agent to be able to persist or upload the same attachment.

Related: #19312 covers a Finder paste regression where original paths are hidden. This issue is the broader agent-workflow failure when chat image attachments are visible to the model but not materialized as local files for tools.

Steps to reproduce

  1. Start a Codex session in a local workspace.
  2. Attach or paste an image directly into the chat, without separately placing the file in the workspace.
  3. Ask Codex to copy that image into the repo, rename it, or upload it through a Playwright/browser file picker.
  4. Codex can inspect the image visually, but cannot find any local file to copy/upload.

Expected behavior

Codex should expose chat image attachments to the agent runtime in one of these ways:

  • provide a local path to a durable attachment file,
  • materialize attachments into an agent-readable attachment directory, or
  • provide a tool/API to save a chat attachment into the current workspace.

The agent should then be able to pass that file to normal filesystem and browser-upload tools.

Actual behavior

The image is visible in the conversation and can be inspected by the model, but no local file/path is available to the agent. The agent must ask the user to manually save the file into the workspace and then continue.

Why this matters

This affects common coding and administrative workflows: adding image assets to a repo, saving screenshots as evidence, attaching scanned documents to web portals, and uploading user-provided images through browser automation. The current behavior makes the assistant appear capable of seeing the file while being unable to perform file operations on it.

Workaround

Ask the user to manually save the image into the workspace, then use the saved path. This works but is slower and confusing.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗