[FEATURE] Prompt-configurable reaction on asynchronous events coming from websocket
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
I've implemented an MCP server that enables orchestration of several agents working in headless mode in parallel (you can take a look here: https://github.com/siy/vibe-ensemble-mcp/). The system consists of a coordinator (user-facing Claude Code) and workers (executed by the MCP server). Obviously, some events in the system occasionally require coordinator attention. And they can come asynchronously, at the moment when the coordinator is waiting for a user prompt. I've managed to mimic IDE and successfully establish a bidirectional websocket connection. Nevertheless, no matter what I'm sending to the Claude Code, it actually gets processed in a meaningful way. Mostly because existing tools and notification types do not support such scenarios, nor is there a documented way to configure Claude Code's reaction to such events.
Proposed Solution
What I'd like to see is the ability to prompt Claude Code with something likeOn message coming to "notifications/event" endpoint check events using list_events tool and address all events accordingly
The endpoint itself may not accept parameters. Two things that are actually necessary are asynchronous processing and the ability to prompt reaction.
Alternative Solutions
_No response_
Priority
Critical - Blocking my work
Feature Category
Websocket bidirectional communication
Use Case Example
Described at the beginning.
Additional Context
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗