codex - 💡(How to fix) Fix Codex CLI /ide in VS Code integrated terminal includes open tabs but misses current selection

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
RAW_BUFFERClick to expand / collapse

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

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The current selected text, or at least its file/range, should be included in the next model-visible IDE context.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Codex CLI /ide in VS Code integrated terminal includes open tabs but misses current selection