Skip to content

IDE Context fails in Codex extension 26.715.x with RPC serialization error #34920

Description

@ConelDEV

Environment

  • OS: Windows
  • Codex IDE extension: 26.715.31925
  • Also observed in: 26.707.91948 and 26.715.61943
  • IDEs tested: Visual Studio Code and Devin
  • GPT-5.6 is available in newer extension builds, but IDE Context is broken

Problem

IDE Context does not work in recent Codex extension versions. The extension logs:

[Composer] failed to fetch ide-context error={}

The extension detects the active file, open tabs, and selected text, but this context is not included in the prompt. The Composer then silently disables or persists the IDE Context state as disabled.

The same behavior was reproduced in both VS Code and Devin, so this does not appear to be specific to one IDE installation.

Steps to reproduce

  1. Install Codex IDE extension 26.715.31925.
  2. Open a workspace in VS Code or Devin.
  3. Enable IDE Context / automatic IDE context.
  4. Open a file, select some text, and keep multiple tabs open.
  5. Send a prompt through Composer.
  6. Check the extension log or inspect the prompt payload.

Actual behavior

  • The IDE bridge can return the active file, open tabs, and selected text.
  • Sending the IDE context through the client-coordination RPC fails.
  • The prompt is sent without IDE context.
  • The log only shows [Composer] failed to fetch ide-context error={}.
  • The IDE Context state may be automatically disabled afterward.

The underlying error observed while instrumenting the provider was:

OA.getIdeContext()
TypeError: Cannot serialize value: [object Object]

Expected behavior

The active file, open tabs, and selected text should be serialized and included automatically in the submitted prompt.

Root cause investigation

The IDE context provider returns VS Code / editor class instances, including selection-position objects, instead of plain JSON data. The client-coordination RPC serializer cannot serialize these class instances.

The failing implementation was:

getIdeContext(e) {
  return Promise.resolve(this.#e());
}

Normalizing the value to plain JSON fixes the RPC boundary:

getIdeContext(e) {
  return Promise.resolve(JSON.parse(JSON.stringify(this.#e())));
}

Verified workaround

After applying the JSON normalization above and reloading the IDE:

  • IDE Context remains enabled.
  • The active file is included in new prompts.
  • Open tabs are included in new prompts.
  • Selected text is included in new prompts.
  • The failed to fetch ide-context error no longer occurs.

The older extension version 26.5609.30741 also avoids this failure, but it does not provide GPT-5.6 support.

Suggested fix

Convert the IDE context result to a plain serializable object before sending it through the RPC layer. A structured normalization or explicit DTO mapping would be preferable if the payload shape is known.

Please consider adding a regression test that passes VS Code Selection / Position objects through getIdeContext() and verifies that the resulting RPC payload is JSON-serializable.

This appears to be an extension-side regression rather than an OpenAI service outage, account issue, or model problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingextensionIssues related to the VS Code extensiontool-callsIssues related to tool callingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions