Roo Code Hooks #9418
wheelo
started this conversation in
Feature Requests
Roo Code Hooks
#9418
Replies: 1 comment
-
|
Related: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to propose a Roo Code Hooks system similar to Cline Hooks. This feature would allow developers to use custom scripts to observe, control, and extend the agent loop. Hooks can run before or after specific stages in the agent lifecycle, enabling actions like:
Motivation
Hooks provide developers with a flexible mechanism to intercept, observe, and modify agent behavior. This is especially useful for:
By implementing hooks, Roo Code can become more extensible and customizable for both individual developers and teams.
How to Use
Hooks Directory:
mkdir -p .roo/hooks cd .roo/hooksExample: TaskStart Hook
Testing Hook
Execution Model: Hooks should accept JSON input via
stdinand return JSON viastdout. This allows Roo Code to:"cancel": true)"contextModification": "...")Hook Types (similar to Cline Hooks)
TaskStart— Initialize tasksPreToolUse— Validate or block operationsPostToolUse— Learn or modify context after executionTaskCancel— CleanupThis setup provides a flexible and modular hook system. For advanced scenarios, hooks can run external scripts or connect to APIs, allowing Roo Code to integrate with CI/CD pipelines, security audits, or analytics systems.
References
Beta Was this translation helpful? Give feedback.
All reactions