Takes a few words, is observable etc.
Or just .. don't have agents sharing a working copy. We stopped "checking out files" decades ago, why would agents - which work faster than humans - want that same problem.
I desire a more robust system which injects the events into the harness directly, but haven't found a way that works across systems.
https://github.com/tcdent/dotfiles/blob/main/bin/agent-messa...
I'm guessing the same hooks could be used to ... Okay I guess there isn't a User Typed But Didn't Send Yet hook... Hmm...
I heard earlier there's a T3 harness which somehow wrangles other harnesses as one big meta harness, but I haven't checked it out yet.
Thus, this is ultimately:
1. a harness problem (or harness orchestrator)
2. a protocol problem
With 1. Claude Code does this very well - yet most OSS harness are not great or do naive subagent tasking making hard even for a parent to talk to the child. But we can then rely on harness orchestrators - Herdr does this very well, so does the Codex app - which counts here due to how it spins up entire threads that another can manage. Any thread can talk to each other on these orchestrators - herdr is fun.With 2. we require native adapters in clients. MCP has the necessary things coming down the chain to enable real integrated push events to agents. Push events means bi-directional in-and-out of the agent.
Look to build your tooling in MCP once it lands! Just sharing my opinion, having built something similar last year. https://github.com/eqtylab/real-a2a
The nice thing about claude code is that the monitor can directly be spin up to run in the background and listen to new messages via retalk receive --follow, so every time there's a new message it will push it direclty into the session so the agent reacts in real time; this is also possible in Pi (but not yet in Codex/Antigravity).
overall i agree only working directly with a cli is annoying, that's why i built it in 2 layers:
1. cli: retalk (which is general purpose and doesn't really care if you are an agent/human/bot/cron). 2. harness: the agent skills with dedicated markdowns for how to use each skills by the agent. it is essentially a wrapper around retalk but built to make it easier for agents to use it.
One thing I've been worried about is a new message triggering a few stale instances that still have their monitors running, which would result in cache misses and a hefty usage bill. I think OP's approach can help solve that, so it's great to see.
I also worked to get webhooks into the same system so I can automatically trigger things when a CI build fails or some deployment error. The main goal is to rely less on prompting and skills to monitor their dev builds and environments and make real hard rules, force prompting.
I develop a similar tool open source tool called wire (wireup.net) https://github.com/SlanchaAi/wire