Skip to content

[Feedback]: Persist pasted chat images to disk so the agent can read them as files #134

Description

@tri2820

What problem are you trying to solve?

When an image is pasted into the chat composer, it reaches the model as vision input but is never written to disk. The agent's own tools (read_file, shell, etc.) therefore have no path to it, so within the same session the agent cannot reference, embed, move, or post-process the image. If the user says "add this image to this file/note", the agent has nothing to read, and after the fact the paste is unrecoverable.

I confirmed the paste is not persisted anywhere: ~/Library/Application Support/Command Code/ (app-state.json, Local Storage, Session Storage, blob_storage, thread-index.db*) and the OS temp dir contain no trace of it — the only stored image is the 128x128 account avatar. No clipboard temp file is created for it either.

What would improve it?

Write pasted/attached images to a predictable on-disk location at paste time (e.g. a per-session scratch/temp directory), and surface that path to the session so the agent's tools can read it — either as an attachment API/tool or by injecting the path into the user message. Keeping the files for the life of the session would let an image be referenced later in the same conversation.

What do you do today?

Take a macOS screenshot (saved to ~/Pictures/Screenshots/) and tell the agent to read that file path instead of pasting into the composer.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions