[FEATURE] Include task description/prompt in SubagentStart hook payload

Resolved 💬 2 comments Opened Jan 28, 2026 by sjlynch Closed Feb 28, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Problem

When building tools that visualize Claude Code's activity in real-time, the SubagentStart hook doesn't provide enough information to show what each subagent is working on.

Current Behavior

The SubagentStart hook payload only includes:

{
"hook_event_name": "SubagentStart",
"agent_id": "ac74071",
"agent_type": "Explore",
"session_id": "...",
"cwd": "...",
"transcript_path": "..."
}

Proposed Solution

Include the task description and/or prompt that was passed to the Task tool:

{
"hook_event_name": "SubagentStart",
"agent_id": "ac74071",
"agent_type": "Explore",
"session_id": "...",
"cwd": "...",
"transcript_path": "...",
"description": "Count CSS files",
"prompt": "Count how many .css files exist in the src/components directory..."
}

Alternative Solutions

_No response_

Priority

Medium - Would be very helpful

Feature Category

Developer tools/SDK

Use Case Example

I'm building a real-time 3D visualization tool that shows Claude Code's activity as it works. When Claude spawns parallel subagents, I want to display what each agent is doing (e.g., "Explore agent: Count
CSS files") rather than just the agent type.

Currently I can only show "Explore agent" because the task description isn't available in the hook payload, even though it's passed to the Task tool internally.

Additional Context

  • The Task tool already receives description and prompt parameters
  • These fields just need to be forwarded to the hook event payload
  • This would enable better observability tooling for Claude Code

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗