Repository navigation
fix(events): stand by instead of exiting when the event runtime socket is owned #561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
752879a
fix(events): stand by instead of exiting when the event runtime socke…
ScriptedAlchemy 991eca6
Merge remote-tracking branch 'origin/main' into fix/event-runtime-sta…
ScriptedAlchemy 43a85a1
fix(events): hold the claim across teardown; report standby failures;…
ScriptedAlchemy 78c76ba
fix(events): never let a throwing onStandbyError reporter end the sta…
ScriptedAlchemy 212aa15
Merge remote-tracking branch 'origin/main' into fix/event-runtime-sta…
ScriptedAlchemy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "agent-bundle": patch | ||
| --- | ||
|
|
||
| Keep a generated MCP server running when another process from the same install already owns the event runtime socket: the server stands by and takes the socket over when the owner exits, instead of exiting with `Event runtime endpoint already has a live server`. `createEventRuntimeServer` gains `whenOwned: 'fail' | 'standby'` (default `'fail'`), and the returned server exposes `role()` and `onRoleChange()`; the standby start and the takeover are announced on stderr only (#561) |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When two sessions run concurrently, this policy leaves session B's MCP requests on B's dispatcher and lineage registry, but every hook wrapper still connects to the single install-wide socket owned by session A. Consequently B's hook events render against A's module/provider state, B's pre-tool observations cannot correlate with tool calls handled by B's registry, and event-triggered notifications use A's MCP connection. This breaks the documented guarantee that hooks share state with tools in exactly the concurrent-session scenario being enabled; the new integration test only invokes a stateless
pingtool and never sends a hook belonging to the standby session. The endpoint needs per-session routing or equivalent affinity rather than one active handler per install.AGENTS.md reference: AGENTS.md:L78-L81
Useful? React with 👍 / 👎.