Vibeleaderboard
← All Intel
Intel / article

Cline V3 36 Hooks

Source
cline.bot
Publisher
Cline
Author
Cline evaluation and engineering blog
Date
Why it matters

Hooks let you block or reshape agent actions with your own scripts, for example refusing .js files in a TypeScript project. Context injected by a hook affects the next API request, not the current one.

Key takeaways · AI-distilled
  • Cline v3.36 hooks are executable scripts named after the type, placed in a global or a project's .clinerules/hooks directory, that receive operation as JSON on stdin.
  • A hook returns JSON whose cancel blocks or allows the operation and whose contextModification text is injected into the conversation, shaping the next API request rather than the current one.
  • The six hook types are PreToolUse, PostToolUse, UserPromptSubmit, TaskStart, TaskResume and TaskCancel; PreToolUse runs after the model has already chosen its action, so it validates that step rather than steering it.
  • At release, hooks ran only on macOS and Linux, not Windows, and had to be enabled under Features in Cline settings.
Terms in this piece · Glossary
  • Context and context window — Context is the information available for a generation; the context window is the capacity available to hold it.
  • agent hook — A script the harness runs automatically at a fixed point in an agent's loop — before a tool call, after an edit, on session start.
  • Folder — A named container that holds files and other folders; also called a directory.
  • Field — One named piece of a record, such as name or approved_on; a record is one entity's set of values, one per field.

Get the Brief

A cited digest of what matters for people building with AI, every morning. Unsubscribe anytime. See today’s edition

Tools in this story
More from Cline evaluation and engineering blog
Recommended reads