Codex VS Code extension no longer allows attaching non-image files

Resolved 💬 7 comments Opened Jan 27, 2026 by devoren Closed Jan 27, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

codex extension v0.4.67

What subscription do you have?

Plus

Which model were you using?

gpt-5.2

What platform is your computer?

Darwin 24.6.0 arm64 arm

What terminal emulator and version are you using (if applicable)?

_No response_

What issue are you seeing?

In the Codex integration inside VS Code, it is no longer possible to attach files (e.g. source code files, text files, or other context files) to a prompt or follow-up request.
Previously, files could be attached directly for context, but now the UI only allows attaching images.

This makes it impossible to provide non-image context (code files, configs, logs, etc.) through the attachment flow.

<img width="465" height="116" alt="Image" src="https://github.com/user-attachments/assets/ea9e7ed5-5d93-438a-98c7-155b70d4a82a" />

What steps can reproduce the bug?

  1. Open VS Code with the Codex extension enabled.
  2. Start a new Codex prompt or click “Ask for follow-up changes”.
  3. Click the attachment button (plus icon / attach files).
  4. Observe that only image attachments are supported.
  5. There is no option to select or attach non-image files (e.g. .ts, .go, .json, .md).

What is the expected behavior?

<img width="355" height="302" alt="Image" src="https://github.com/user-attachments/assets/c15b2bfe-e6cd-408b-87b1-9dc6a05430a2" />

The attachment dialog should allow selecting and attaching general files (text/code/config files), not only images, as it did previously.

If this is an intentional change, it would be helpful to clarify:
• whether file attachments were removed by design, and
• what the recommended way is to provide file-based context (code, configs, logs) going forward.

Additional information

_No response_

View original on GitHub ↗

7 Comments

etraut-openai contributor · 5 months ago

Did this work previously for you? I'm not aware that we ever supported attachment of files other than a select set of image types (jpeg, png, gif).

This feature request has been open for many months requesting support for non-image files.

devoren · 5 months ago

@etraut-openai Thanks for clarifying. To be more precise: I was referring to selecting files from the current VS Code workspace as context, not uploading arbitrary files from the filesystem.

Previously, it was possible (or at least felt possible from the UX) to explicitly select specific workspace files (e.g. .md, .pdf, .txt) to provide focused context to Codex. Images could be attached from outside the workspace, but non-image files were effectively taken from the workspace scope.

Now, Codex seems to automatically search the workspace for relevant files, which works, but removes the ability to explicitly constrain context to a small, intentional set of files.

The main issue is not raw file upload, but loss of control over context selection.
Being able to say “use only these 1–2 files as context” was very helpful and predictable, especially for large workspaces.

Example (older VS Code workspace with the previous Codex version):
<img width="342" height="135" alt="Image" src="https://github.com/user-attachments/assets/b5fcf0d6-7205-48cd-80ef-ed66a3c23bbe" />

etraut-openai contributor · 5 months ago

Thanks for the clarification. Yes, I see what you mean. I'm not sure if that change was intended or not. I'll check and get back to you.

As a workaround, you can still @-mention files within the project (just type @ within the input box followed by one or more characters in the file name).

devoren · 5 months ago

@etraut-openai Got it, thanks a lot for the clarification and the workaround 👍
I wasn’t aware of the @ file mention behavior before - that makes sense now and effectively covers the previous workflow.

Appreciate you checking on whether the change was intended.

etraut-openai contributor · 5 months ago

I confirmed that this was an intended change — part of an overall design simplification. This was redundant functionality because it was already supported via an @ mention.

devoren · 5 months ago

Thanks for confirming — that makes sense. Appreciate the follow-up

Eds76 · 5 months ago

As a possible workaround, users can bind the built-in commands for explicitly adding context to the current thread via keyboard shortcuts.

According to the documentation, the extension already exposes the following commands:

Command                         Default key binding   Description
chatgpt.addToThread             –                     Add selected text range as context for the current thread
chatgpt.addFileToThread         –                     Add the entire file as context for the current thread

Users can assign a custom shortcut to chatgpt.addFileToThread to quickly add the currently opened file to the thread context, partially compensating for the lack of drag-and-drop support.

How to assign a keyboard shortcut in VS Code:

Open Keyboard Shortcuts
– Ctrl+K Ctrl+S (Windows / Linux)
– Cmd+K Cmd+S (macOS)

Search for chatgpt.addFileToThread

Click the pencil icon and assign a preferred key combination

Open a file and use the shortcut to attach the entire file to the current chat thread

This makes adding file context explicit and predictable, especially for larger files or workflows where automatic context detection is insufficient.