Codex CLI /ide in VS Code integrated terminal includes open tabs but misses current selection

Open 💬 2 comments Opened May 31, 2026 by sun-binwen

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

  1. Open a file in VS Code.
  2. Select a unique line of text in the editor.
  3. Run Codex CLI in the VS Code integrated terminal.
  4. In Codex CLI, type /ide.
  5. Ask the assistant whether it can see the selected text.
  6. 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-x64 was also observed after extension update
  • TERM_PROGRAM=vscode present
  • VSCODE_IPC_HOOK_CLI present
  • /tmp/codex-ipc/ipc-1002.sock present
  • codex doctor reported 0 failures

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗