Add VSCode Shortcut to Send Current File & Line to Codex CLI
Resolved 💬 5 comments Opened Nov 25, 2025 by ryanBuzzni Closed Dec 1, 2025
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What feature would you like to see?
Hello! I’m a user who genuinely believes that starting from the GPT-5.1 model, ChatGPT is absolutely number one among all competing models when it comes to code analysis, error debugging, and even code generation. I’m really enjoying using it!
I wanted to share one feature request that I think would greatly improve the CLI experience.
When using Claude Code inside VS Code, pressing Option + Command + K automatically sends the current file and cursor line into the CLI input. If Codex CLI had a similar feature, that would be incredibly helpful.
Thank you to all the ChatGPT developers for your hard work — I’m always cheering for you!
Additional information
_No response_
5 Comments
Seems like "Auto context" switch redesign
I Also would like to see this feather. Especially when i to some lines and right click the button.I can sent the select ed code back to the chat.
If you want to send the current line to the extension's chat panel, that feature already exists. The extension exposes a command called "Codex: Add to Codex Thread". You can assign it any keybinding that you want. For example, I prefer to assign it cmd+L, but you could assign it Option+Cmd+K if you'd prefer.
<img width="623" height="58" alt="Image" src="https://github.com/user-attachments/assets/4c083da0-6f7d-494a-adee-776451fd566a" />
The "Codex: Add to Codex Thread" seems to have disappeared from the context menu when right-clicking a folder.
still not working