Codex CLI /ide in VS Code integrated terminal includes open tabs but misses current selection
What version of Codex CLI is running?
codex-cli 0.135.0
Which IDE are you using?
VS Code Remote SSH / VS Code integrated terminal
What platform is your computer?
Ubuntu 22.04 remote host, VS Code 1.122.1
What issue are you seeing?
When using Codex CLI inside the VS Code integrated terminal, /ide appears to partially work: the assistant receives the IDE context block with open tabs, but it does not receive the current editor selection.
The selected text was a unique Markdown table row in an open file. After selecting it in the editor and running /ide in Codex CLI, the assistant only saw:
- Context from IDE setup
- Open tabs list
It did not receive:
- selected text
- selection range
- cursor position
- active file content
This seems inconsistent with the documented behavior that /ide includes open files, current selection, and other IDE context.
Steps to reproduce
- Open a file in VS Code.
- Select a unique line of text in the editor.
- Run Codex CLI in the VS Code integrated terminal.
- In Codex CLI, type
/ide. - Ask the assistant whether it can see the selected text.
- Observe that only open tabs are visible, not the selection.
Expected behavior
The current selected text, or at least its file/range, should be included in the next model-visible IDE context.
Actual behavior
Only open tabs are included.
Additional information
Environment observed during repro:
- OpenAI VS Code extension installed:
openai.chatgpt-26.527.31454-linux-x64 - An older extension app-server process from
openai.chatgpt-26.519.32039-linux-x64was also observed after extension update TERM_PROGRAM=vscodepresentVSCODE_IPC_HOOK_CLIpresent/tmp/codex-ipc/ipc-1002.sockpresentcodex doctorreported 0 failures
2 Comments
The
/idemechanism requires that you're running the IDE and the TUI on the same machine. I can't tell from your description whether you're doing so. You mentioned that you're using VS Code remote SSH.thx
获取 Outlook for iOS<https://aka.ms/o0ukef>
________________________________
发件人: Eric Traut @.*>
发送时间: Monday, June 1, 2026 1:01:01 PM
收件人: openai/codex @.*>
抄送: Binwen Sun @.>; Author @.>
主题: Re: [openai/codex] Codex CLI /ide in VS Code integrated terminal includes open tabs but misses current selection (Issue #25402)
[https://avatars.githubusercontent.com/u/223546144?s=20&v=4]etraut-openai left a comment (openai/codex#25402)<https://github.com/openai/codex/issues/25402#issuecomment-4589209206>
The /ide mechanism requires that you're running the IDE and the TUI on the same machine. I can't tell from your description whether you're doing so. You mentioned that you're using VS Code remote SSH.
—
Reply to this email directly, view it on GitHub<https://github.com/openai/codex/issues/25402?email_source=notifications&email_token=BPWRAXRILROY6WGNXV6BT7L45TWW3A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINJYHEZDAOJSGA3KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-4589209206>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BPWRAXUZRHIVZELP4YF7ZLT45TWW3AVCNFSM6AAAAACZUKG4JGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DKOBZGIYDSMRQGY>.
You are receiving this because you authored the thread.Message ID: @.***>