Cursor hooks additional_context not injected in agent context in postToolUse

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Cursor agent is unable to access additional_context when in the output of postToolUse

In this conversation you can even see the confirmation from the leaked thinking from composer 2

Steps to Reproduce

Create a postToolUse hook that returns any additional_context > the agent is unable to access that data

here’s an example

{
  "additional_context": "<codex_thread_context>\nthreadId: 019d37c4-df88-7111-9e7e-c0aab0526249\n</codex_thread_context>",
  "updated_mcp_tool_output": {
    "content": [
      {
        "type": "text",
        "text": "codex-thread-context-tag-test"
      }
    ],
    "isError": false,
    "structuredContent": {
      "threadId": "019d37c4-df88-7111-9e7e-c0aab0526249",
      "thread_id": "019d37c4-df88-7111-9e7e-c0aab0526249"
    }
  }
}

Operating System

Windows 10/11

Version Information

Version: 2.6.22 (system setup)
VSCode Version: 1.105.1
Commit: c6285feaba0ad62603f7c22e72f0a170dc8415a0
Date: 2026-03-27T15:59:31.561Z
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

7c09b0d1-174f-4b25-bbf9-c540cb37b7b6

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report. This is a confirmed bug. additional_context in postToolUse hooks is accepted and logged correctly, but it isn’t actually delivered to the model context. For non-MCP tools, the hook response is discarded fire-and-forget. For MCP, only updated_mcp_tool_output is used.

The same report is already here: Native postToolUse hooks accept and log additional_context successfully, but the injected context is not surfaced to the model

The team is aware. For now, the only hook where additional_context works end-to-end is sessionStart. If the context you need to inject is fairly static or can be determined at session start, you can use that as a workaround.

Closing this as a duplicate. We’ll post updates in the original thread.

1 Like

A post was merged into an existing topic: Native postToolUse hooks accept and log additional_context successfully, but the injected context is not surfaced to the model