Is there an option to use hooks with opencode?
I want the agent to call a script after a task ends to automatically commit and push everything and open a PR.
Currently, it works by giving the instructions to the agent, but it consumes more and a lot of tokens. Also the output is not always consistent. Sometimes it doesn't set the assignee or labels, sometimes it randomly does nothing at all and I have to follow prompt to run the GitHub stuff.
And it's not efficient to let AI handle a simple task that can be run programmatically.
What is the best way to solve this with opencode?
Is there an option to use hooks with opencode?
I want the agent to call a script after a task ends to automatically commit and push everything and open a PR.
Currently, it works by giving the instructions to the agent, but it consumes more and a lot of tokens. Also the output is not always consistent. Sometimes it doesn't set the assignee or labels, sometimes it randomly does nothing at all and I have to follow prompt to run the GitHub stuff.
And it's not efficient to let AI handle a simple task that can be run programmatically.
What is the best way to solve this with opencode?