I’m configuring a hook shell script for all currently supported hooks. Doesn’t matter what i do, i get hooks for the rest of the hook types, but not a single hook for this type, despite the agent producing a lot of thinking messages. Am I reading the docs wrong or is it a known limitation?
result -> beforeShellExecution appearing on every shell execution, never afterAgentThought despite long and complex sessions
### Operating System
MacOS
### Version Information
Version: 2.4.28
VSCode Version: 1.105.1
Commit: f3f5cec40024283013878b50c4f9be4002e0b580
Date: 2026-02-03T00:56:18.293Z
Build Type: Stable
Release Track: Default
Electron: 39.2.7
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Darwin arm64 25.2.0
### Does this stop you from using Cursor
No - Cursor works, but with this issue
Quick clarification: in the title you wrote afterAgentThought, but in your config you have afterAgentResponse. These are different hooks:
afterAgentResponse runs after each agent response
afterAgentThought runs after the agent’s “thoughts” (requires a thinking model)
Which one are you trying to use?
Also, please check the log file /tmp/cursor_hooks.log. Does it contain anything from afterAgentResponse? If it does, the hook is working, but the issue might be that you don’t see any effect (there’s a known issue where the agent_message and user_message fields don’t make it to the model).
If nothing is being written to the log from this hook at all, let me know and we’ll dig deeper.
Hi @deanrie thanks for the quick response. you’re correct, I edited my post, the issue is afterAgentThought and NOT afterAgentResponse.
Also, you solved it, I was using composer-1 and your hint requires a thinking model lead me into changing and seeing that other models do trigger afterAgentThought as you expected.
However, I would have expected to see this text in ANY of the hooks i receive in composer-1. Maybe in a separate hook if it isn’t considered thinking?
You’re right to point that out, it’s a bit misleading.
The “Thinking…” text in composer-1 just shows the model is processing the request, but it’s not the same as the structured thinking blocks that other reasoning models return. The afterAgentThought hook is specifically for those structured thoughts.
To catch normal agent responses (including composer-1), use afterAgentResponse, it fires after any agent response.
If you want to log everything in composer-1, try this combo: