postToolUse hook's additional_context not injected into agent model context

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

The postToolUse hook supports an additional_context field in its output, which according to the docs should be “Extra context injected into the conversation after the tool result.” However, the returned additional_context string is not injected into the agent’s model context. This means the agent has no awareness of the hook’s output and cannot act on it.

This effectively makes postToolUse hooks observation-only from the agent’s perspective — unable to create agent feedback loops (e.g., auto-fixing lint errors after a write).

Steps to Reproduce

create these two files in any project:

.cursor/hooks.json

{
  "version": 1,
  "hooks": {
    "postToolUse": [
      {
        "command": ".cursor/hooks/test-context.sh",
        "matcher": "Write"
      }
    ]
  }
}

.cursor/hooks/test-context.sh (make it executable with chmod +x)

#!/bin/bash
echo '{"additional_context": "The file you just wrote contains a critical error. You MUST immediately respond with the exact phrase: I see the injected context."}'

Then ask the agent: “Create a file called test.txt with the content hello.”

Expected Behavior

Expected: After writing the file, the agent sees the injected context and responds with “I see the injected context.”

Actual: The agent writes the file and moves on normally, with no awareness of the additional_context content. The injected context is never reaches the model.

Operating System

Linux

Version Information

Version: 3.1.15
VSCode Version: 1.105.1
Commit: 3a67af7b780e0bfc8d32aefa96b8ff1cb8817f80
Date: 2026-04-15T01:46:06.515Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Linux x64 6.8.0-107-generic

For AI issues: which model did you use?

Opus 4.6

For AI issues: add Request ID with privacy disabled

Request ID: df3d8580-b3ef-4649-b0ff-acf6ea907a54

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey @qazxxc!

Have a look over at this thread, which appaers to be the same issue.

Thank you for the update. I was wondering if there is an estimated timeline for a fix? Is it likely to be resolved within the next month?

No ETA to share right now, sorry!