Codex VS Code extension no longer allows attaching non-image files
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?
- Open VS Code with the Codex extension enabled.
- Start a new Codex prompt or click “Ask for follow-up changes”.
- Click the attachment button (plus icon / attach files).
- Observe that only image attachments are supported.
- 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_
7 Comments
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.
@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" />
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).@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.
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.
Thanks for confirming — that makes sense. Appreciate the follow-up
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:
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.