Cursor CLI post-tool hooks now fire for subagents

Before v2026.10.17, only preToolUse fired for subagents in Cursor CLI. That release adds the other half. postToolUse and postToolUseFailure hooks that match the Task tool now run when a subagent finishes or fails.

What changed

Any additional_context a post-tool hook returns now reaches the main agent. Claude Code PostToolUse matchers for Task also work, since Cursor reads those hooks.

The hooks reference lists Task among the matcher values for postToolUse. Matchers are regexes. An empty string or "*" matches everything.

{
  "version": 1,
  "hooks": {
    "postToolUse": [
      { "command": "./hooks/audit-tool.sh", "matcher": "Task" }
    ]
  }
}

The hook input includes tool_name, tool_input, tool_output, tool_use_id, cwd and duration. For postToolUseFailure, it includes error_message and failure_type instead of tool_output. failure_type is "error", "timeout" or "permission_denied".

Subagent transcripts

The same release changes where subagent transcripts live. They are saved inside the parent conversation's folder, under agent-transcripts/<parent>/subagents/.

A hook that runs inside a subagent now receives that file as transcript_path and as CURSOR_TRANSCRIPT_PATH. Per the docs, transcript_path is null when transcripts are disabled.

Related change in v2026.10.22

A custom subagent pinned to a model that your team's admin settings block, that requires Max Mode, or that is unavailable now runs on the parent agent's model instead of erroring. The subagent's result notes which model it ran on.

Sources: Cursor CLI changelog, Cursor hooks reference.