[FEATURE]: Finish hook, when LLM is ready to get new instructions
Feature hasn't been suggested before.
- [x] I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
I can't find an issue like this, so I'm creating one:
Often when you ask LLM, and it's doing its job, you do something else.
It would be nice if you could have a hook when LLM is done with the task. So you can add a command that notifies you about it. You can use sound or desktop notification about the fact that you can continue and can review the code and ask about the next thing.
I propose to add an option into the config. Where you can add a command that will execute when the LLM finishes and is waiting for new instruction.
Maybe the idle hook.
This issue might be a duplicate of existing issues. Please check:
- #213: [feature request] notifications - Requests notifications when agent is waiting for further input/finishing task
- #2372: Feature Request: play sound when agent is done running - Requests sound notification when agent completes
- #3815: What is the deterministic way to monitor a session is completed - Asks about detecting when session is idle/waiting for input (SDK-related)
- #5409: [FEATURE]: SessionStart hook for session lifecycle events - Proposes session lifecycle hooks (related plugin system approach)
- #5148: [FEATURE]: Comprehensive Plugin Pipeline - Middleware-Style Data Flow Control - Proposes comprehensive plugin pipeline system that could support your use case
Feel free to ignore if none of these address your specific case.
I'm not sure how necessary a new feature is for this. This is already pretty easy to do with plugins, and opencode is pretty good at writing plugins for itself. I wanted it to play one sound when the primary agent finished working, another sound when an agent asks for permission (for tools with the "ask" permission) but not to play sounds for subagents finishing their work, and the free Big Pickle model one shotted creating a plugin invoking afplay to do it for me without any issues.
Thanks for the tip. I need to try out plugins then. Never use them before.
Thanks for the tip. I need to try out plugins then. Never use them before.