Skip to content

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

Closed

Description

@CharGrnmn

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.

Activity

  1. added
    enhancementNew feature or request
    CLIIssues related to the Codex CLI
    agentIssues related to the core agent loop
    on Jun 2, 2026
  2. github-actions commented on Jun 2, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

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

    CLIIssues related to the Codex CLIagentIssues related to the core agent loopenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions