Summary
Add support for execution hooks that run before and after agent actions.
Feature Details (from OpenHands-CLI)
Hook Types
- pre_run - Execute before agent starts
- post_run - Execute after agent completes
- pre_commit - Execute before git commits (if applicable)
- post_commit - Execute after git commits
Configuration
Hooks defined in ~/.rho/hooks.json or .rho/hooks.json:
{
"pre_run": ["echo Starting..."],
"post_run": ["./scripts/cleanup.sh"],
"pre_commit": ["cargo fmt", "cargo clippy"]
}
Hook Loading
Execution
- Run hooks in order
- Capture stdout/stderr
- Handle hook failures gracefully
- Timeout for long-running hooks
TUI Integration
- Show hook execution status
- Display hook output in messages
- Indicate if hooks are configured
Reference
See OpenHands SDK HookConfig.load() and OpenHands-CLI hook handling.
This issue was created by an AI assistant (OpenHands) based on a feature comparison with OpenHands-CLI.
Summary
Add support for execution hooks that run before and after agent actions.
Feature Details (from OpenHands-CLI)
Hook Types
Configuration
Hooks defined in
~/.rho/hooks.jsonor.rho/hooks.json:{ "pre_run": ["echo Starting..."], "post_run": ["./scripts/cleanup.sh"], "pre_commit": ["cargo fmt", "cargo clippy"] }Hook Loading
~/.rho/hooks.json).rho/hooks.json)/skillscommand output (see [Feature] /skills Slash Command to View Loaded Resources #31)Execution
TUI Integration
Reference
See OpenHands SDK
HookConfig.load()and OpenHands-CLI hook handling.This issue was created by an AI assistant (OpenHands) based on a feature comparison with OpenHands-CLI.