I had this issue when the agent is doing something and the user send another task to correct the first intent how do you handle it.
Now I'm using debounce but that affects 95% of messages that do not require to be rectified
I've been tinkering with building some orchestrator code and what i've found is that if you have a block of logic running at each boundary, you can just keep all the messages in a queue
then you can have a fast/cheap classifier like Haiku (or something even cheaper) iterate (but not gatekeep) the queue and distinguish whether each message is a correction or additional work, and corrections get pulled out to a separate queue.
then at each boundary, the corrections can be used to edit the current prompt or adjust the current work however you want to manage that, and the primary queue stays a queue.
I think Pi and Openclaw call it steering but I don't have much experience with it. Claude Code has this wonderful feature called "queued message while Claude works", them being delivered at tool boundary.
then you can have a fast/cheap classifier like Haiku (or something even cheaper) iterate (but not gatekeep) the queue and distinguish whether each message is a correction or additional work, and corrections get pulled out to a separate queue.
then at each boundary, the corrections can be used to edit the current prompt or adjust the current work however you want to manage that, and the primary queue stays a queue.