Cursor ingnores `structuredContent` from MCP result

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Codex uses structuredContent to expose the threadId that is fundamental to continue a chat with codex.

Cursor ignores structuredContent and there’s no way to access the threadID other than manually grepping the codex sessions folder

Steps to Reproduce

Install Codex as MCP > make cursor use it > make cursor send a followup message

alt with hooks:

Create a afterMCPExecution hook > check the input does not included the threadId returned by the codex MCP

Expected Behavior

Cursor should either handle structuredContent or at least expose it in the hooks so that it can be injected as additional context in the conversation

Operating System

Windows 10/11

Version Information

Version: 2.6.21 (system setup)
VSCode Version: 1.105.1
Commit: fea2f546c979a0a4ad1deab23552a43568807590
Date: 2026-03-21T22:09:10.098Z
Build Type: Stable
Release Track: Early Access
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26200

For AI issues: add Request ID with privacy disabled

2f6c599f-67fc-4622-9bb4-df28ccaa79e5

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the detailed report.

A couple of things here:

structuredContent is actually sent to the model. It’s included in the serialized tool result that the model sees. So the model can technically access the threadId, it just may not know to use it for follow-up calls unless you tell it to.

Workaround: Try adding a Cursor Rule .cursor/rules that instructs the agent to always extract threadId from the Codex MCP result’s structuredContent and pass it in subsequent calls. Something like:

When using the Codex MCP server, always look for threadId in the structuredContent of the tool result. Include this threadId in all follow-up calls to maintain conversation continuity.

The hooks gap is real though. afterMCPExecution currently only serializes content and isError, dropping structuredContent. I’ve flagged this with the team.

Let me know if the rules workaround helps with the model passing the threadId.

@deanrie could you please double check with an MCP?

I went into the rabbit hole of setting up hooks exactly because i was unable to get cursor read the threadId from structuredContent, now i’m even building my own MCP because the one from codex is too defensive and the models are biased to run it in read-only mode, and with a custom MCP i can return the threadId directly in the text response as well

I see the screenshot, the model clearly says it didn’t get threadId from structuredContent. Looks like my earlier reply was too optimistic.

Technically, structuredContent goes through serialization, but based on your test, the model doesn’t actually see that data or can’t access it. I shared this with the team for a deeper look, but we don’t have a clear answer yet on why it happens.

For now, your workaround with a custom MCP that returns threadId directly in the text response is the most reliable path. I’ll let you know if there’s any update on this.