TaskCreated API

July 14, 2026 ยท View on GitHub

Available when inheriting from ClaudeHooks::TaskCreated:

Runs when a teammate task is created. Can block Claude from continuing via prevent_continue! or exit 2.

Input Helpers

๐Ÿ“š Shared input helpers

MethodDescription
task_idThe unique task ID
task_subjectShort title of the task
task_descriptionOptional longer description
teammate_nameThe teammate assigned to the task
team_nameThe team name

Hook State Helpers

๐Ÿ“š Shared hook state methods

MethodDescription
prevent_continue!(reason)Block Claude from continuing (continue: false + stopReason)

There is no top-level decision field for this event โ€” block via prevent_continue! or exit 2.

Output Helpers

๐Ÿ“š Shared output helpers

MethodDescription
output.continue?Whether Claude will continue
output.stop_reasonThe reason Claude was stopped

Hook Exit Codes

Exit CodeBehavior
exit 0Claude continues
exit 2Blocks Claude (continue: false)