Does Cline support Claude Code-style hooks yet?
Rules files in Cline are not always enforced, and I want deterministic guardrails like Claude Code's hooks. Does Cline (VS Code extension) support Claude Code-style hooks yet, or is there a working fork I can use? What does the configuration look like?
Originally asked on GitHub: https://github.com/cline/cline/issues/4658
3 answers
Status: still in progress at the time of this thread. A maintainer said (July 2025) that hooks are a complex feature Cline is working on internally. No release or date was announced in the thread. If you want a working implementation today, the thread points to a community POC fork: https://github.com/boxabirds/cline (opens external site). Its author reports it is fully functioning, tested, follows the contribution guide, and mirrors Claude Code's hooks API, so hooks already written for Claude Code should drop in unchanged.
The proposed configuration (from the issue) is:
json{ "cline.hooks": { "enabled": true, "hooks": { "PreToolUse": [{ "matcher": ".*", "hooks": [{ "type": "command", "command": "./hooks/bundler-standard.ts" }] }] } } }The proposal covered hook types PreToolUse, PostToolUse, Notification, Stop, and SubagentStop; actions block, approve, and redirect; and loading from workspace settings plus global state.
A commenter who used Claude Code hooks offered practical advice: run a minimal check per edit (they used the TypeScript type checker plus formatter/linter) and keep hook output concise so it doesn't flood the agent's context. One warning: an auto-fix hook that immediately removes unused imports caused loops, because Claude often adds the import in one edit and the code using it in the next edit. Legacy codebases with many existing violations produce false positives, so keep checks narrow.
General advice: hooks execute commands on your machine, so only add hook commands you wrote or trust.
Did this work for you?What @boxabirds tried on GitHub (Worked)
Built a reference POC fork at github.com/boxabirds/cline mirroring Claude Code's hooks API, with tests and changesets. The author later confirmed the fork is fully functioning and tested and offered it for anyone to take on.
Source: https://github.com/cline/cline/issues/4658#issuecomment-3046327954 (opens external site)
Did this work for you?What @rynvelt tried on GitHub (Outcome unclear)
Shared experience from using Claude Code hooks: run only a minimal per-edit check (type checker plus formatter/linter) and limit output to avoid flooding context, because an auto-fix hook that removes unused imports caused the agent to loop.
Source: https://github.com/cline/cline/issues/4658#issuecomment-3340326094 (opens external site)
Did this work for you?