[Feature]: Single-request metadata trace for Codex client tools on the Cursor adapter
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 34/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- backend-api-design, observability
Research direction
Start with the v2.100.3 paths named in the issue: parseRequest, createCursorRequest, prepareCursorRunRequest, planMcpArgsHandling, mapCursorProtobufServerMessage, and parseConnectEndStreamError. Run the offline synthetic fixtures to trace where declaration, wire, return, and relay classifications are available. Done means an opt-in trace for one request and correlated continuations reports those stages using metadata only, then turns off automatically.
Written by the indexing model from the issue text.
Description
Area
Tools / MCP and Cursor adapter observability
What are you trying to accomplish?
Diagnose one Codex Desktop Responses turn that ends without a client-tool event. For the same request, distinguish (a) the tool or its deferred entry point was not forwarded, (b) Cursor returned assistant text rather than a structured tool call, (c) a structured Cursor call was observed but could not be relayed as a client tool event, and (d) an upstream error. This is an observation request, not a request to execute untrusted text, retry, or weaken validation.
What prevents this today?
On released v2.100.3, the request history shows route and terminal status, and provider debug has a request tool count and frame types. Those do not establish whether one particular declaration survived all the way to the Cursor wire and which output it produced on the same request. Cache diagnostics do not expose tool names. A successful HTTP response or an assistant string containing [Tool Result] is not proof of execution.
Offline synthetic reproduction (v2.100.3)
Using the v2.100.3 tag, pass a synthetic Responses request with model cursor/gemini-4-argon, input Synthetic handoff fixture, and a namespace declaration mcp__codex_app containing a function send_message_to_thread with a synthetic string prompt argument. No servers or model calls are needed. Call parseRequest → createCursorRequest → prepareCursorRunRequest and decode the bytes using AgentClientMessageSchema to inspect runRequest.mcpTools. For the return path, feed synthetic Cursor frames to planMcpArgsHandling / mapCursorProtobufServerMessage (or a synthetic Connect terminal to parseConnectEndStreamError). None of these fixtures executes the tool.
| Synthetic variation | Observed declaration / wire / upstream / downstream |
|---|---|
Declared namespaced tool; structured mcpArgs, providerIdentifier=opencodex-responses, matching wire name, synthetic prompt |
declared / present / structured tool / tool event |
Same declaration with tool_choice: "none"; synthetic frame attempts the omitted tool anyway |
declared / absent / structured tool / adapter rejects an unadvertised tool |
Same declaration; textDelta containing CallDynamicTool({"toolName":"send_message_to_thread"}) followed by [Tool Result] |
declared / present / text / text, no tool event |
Same declaration; synthetic Connect end-stream {"error":{"code":"unavailable","message":"synthetic"}} |
declared / present / upstream error / error, no tool event |
Declare only the freeform functions.exec entry point |
exec entry point visible; nested send-tool availability still unknown until host discovery |
These are offline adapter fixtures, not evidence that any live turn had a particular upstream failure. The missing feature is a way to see the equivalent stage classifications for one actual request without capturing the request body.
Expected behaviour
An opt-in, local trace for one explicitly armed request or one turn (including only that turn's correlated continuations), then automatically off. For example, a row could report: declared=direct | exec_only | absent, cursor_wire=direct | exec_only | absent | unobserved, cursor_return=tool | text | upstream_error | unobserved, and relay=tool | text | adapter_error | none, with fixed reason codes where known. If multiple frame types occur, preserve the distinctions rather than inferring from the final HTTP status. If only exec is visible, mark the nested tool as unknown without host evidence.
Please keep it metadata-only: no prompts, arguments, tool outputs, raw schema or frames, headers, credentials, or account/session identifiers in exported diagnostics. No global capture, permanent logs, tool-policy changes, or automatic replays needed.
Related, but different
- #8132 / #8492 address guidance for reaching deferred tools; they do not expose this request-scoped evidence.
- #2317 and #8538 involve behavior after a tool already executed; #1217 is about transport-stage timing and failure attribution, not tool declaration and relay evidence.
Checks
- I searched existing issues and documentation.
- This describes a concrete OpenCodex workflow and synthetic reproduction.
- No secrets, personal data, private chat, or customer material are included.
- Dominant language
- TypeScript
- Stars
- 16.9k
- Forks
- 1.3k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 814
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from lidge-jun/opencodex
-
bug gui platform
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
lidge-jun/opencodex#9172 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
[Feature]: Include provider, model and account label in the `upstream failure` service.log linePossibly taken @EnesKartal claimed this 4 days ago. Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
lidge-jun/opencodex#9057 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
[Provider] antigravity-acp catalog omits gemini-4-hydrogen and gemini-4-neon that agy acp offersPossibly taken @sedoll claimed this 6 days ago. Opencatalog provider provider-compatibility
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
lidge-jun/opencodex#9037 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
bug cli
Difficulty 4/5 3-5 days Newbie friendliness 52/100
lidge-jun/opencodex#9171 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
account-pool enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
Maintainers usually reply within 1 day
All issues in lidge-jun/opencodex
Similar issues
-
manually bump balena-preload to ^19.0.6Possibly taken @shaunmulligan claimed this today. Open
Difficulty 1/5 1-3 hours Newbie friendliness 66/100
balena-io/balena-cli#3200 ·
Maintainers usually reply within 1 day
-
`MaterializedChatMessage._text` is quadratic in the number of text chunks (`+=` followed by `endsWith`), driving the extension host to heap OOMPossibly taken @olegius88 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
microsoft/vscode-prompt-tsx#205 ·
-
triage
Difficulty 1/5 Under an hour Newbie friendliness 64/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
melgarafael/DeskcommCRM#5340 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
ehmpathy/rhachet-roles-ehmpathy#1529 ·
Maintainers usually reply within 1 day