Hi , I missed the community feedback meeting, so I...
# questions
w
Hi , I missed the community feedback meeting, so I wanted to follow up with a couple of questions here. I noticed that the project currently supports shell script (.sh) command hooks. Is there a roadmap for agent-level hooks in the future? Specifically, I'd like to know whether sub-agents in a multi-agent setup will be able to hook into each other's tool calls. My goal is to build a security agent that monitors other agents through hooks — I'm not sure if this is already supported or on the roadmap, and I may have missed it in the documentation. For a pre-configured MCP server, I couldn't find a way to restrict or filter the available toolset. Is that something that's currently supported or planned?
e
Hi there, to your point it looks like our hooks support may be focused on executing shell scripts: https://docs.openhands.dev/sdk/guides/hooks I'm curious if you can share more details about agent-level hooks? How does this differ and are there any good examples from other tools we can look at? Thanks for any info 🙏
w
@elegant-branch-54423 Hi Joe, The hooks fire the same way but instead of writing a script that explicitly handles the management, you hand the decision to an LLM with a plain instruction. Imagine you want to restrict grep from searching outside the project directory. With a command hook, you write a script that parses the payload, extracts the command, and checks it against a hardcoded list of blocked patterns like /etc/, ../, ~/. It works, but agent can behave a path variation your list didn't expect. With a prompt hook, you just describe the policy: "block any grep command that searches outside the current project directory." The LLM reads the actual command and applies judgment based on intent. I can abstract as hook generatıon via llm prompt. I need to mention that i havent tested out the agentic hooks yet.But I saw a documentation about it. prompt-based-hooks
e
Thanks for the feedback! I understand it now. I wonder if prompt-based can offer the same guarantees as shell-based/command-based hooks. Are there other use cases you have found for prompt-based? Also, this might be a great topic to bring to #C06R25BT5B2 or even create an issue in the SDK repo for some of our engineers to weigh in on! https://github.com/OpenHands/software-agent-sdk/
w
Hey Joe @elegant-branch-54423 , You're welcome! Took your suggestion and went digging through the SDK repo. Turns out there's already an issue covering part of what I had in mind — #2755, opened last week, flags the gap around prompt-based hooks (
HookType.PROMPT
is declared in the enum but has no implementation)However, agent-based hooks weren't mentioned there, so I just opened #2864 to cover that side. https://github.com/OpenHands/software-agent-sdk/issues/2755 https://github.com/OpenHands/software-agent-sdk/issues/2864
e
Thank you! Going to flag @modern-fireman-99755 on #2864 so he can also take a look and weigh in
👀 1
m
I answered in the issue...
thanks on a stick 1