Repository navigation
Conversation
The Runner now keeps its own live session of each community it runs agents in, and its own listener that delivers those events to the agents. The Manager keeps its connections for listings and cleanup, and syncs again on reconnect itself. RunnerManager no longer hands the Runner live sessions: it gives only the community relay to open and the running agents. The Runner binds first on every change, so the Manager's update sees its new session, as before. No behavior changes. Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Logan Johnson <loganj@squareup.com>
The Manager's relay subscription can be older than the Runner's: a community selected before its first agent, or one whose agents were all deleted for a time. Its update then ran before the Runner's session changed, and nothing reconciled after it. Queued work waited for the next tick. The Runner now asks for an update each time its session starts, is replaced or ends, and no longer refreshes core memory a second time. Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Logan Johnson <loganj@squareup.com>
Contributor
Author
|
🤖 Closing: this change is now part of #1748, which collects one column of the Manager/Runner split in one PR. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🤖 This is step 5 of the Manager/Runner split for agents. It is an inert refactor.
What changes
Agents hear their community's events through that community's live session. Until now the Runner borrowed the Manager's sessions, which the Manager also uses for agent listings and cleanup.
This PR gives the Runner its own connections (
connections.ts):AgentsService.RunnerManagerno longer gives the Runner live sessions. It gives only the community relay to open and the list of running agents.Ordering
Each watcher subscribes to the same community relay. Whenever the Runner's session starts, is replaced or ends, it asks the Manager to show and reconcile what runs again. So the reconcile sees the Runner's new session whichever subscription fires first. (An independent review found the case where the Manager's subscription is older: a community selected before its first agent. The second commit fixes it.) Core memory is refreshed once per new session, as before.
Presence still uses the Manager's connections in this PR, so offline notices for removed agents keep their current timing. Presence moves with the hidden page.
Why
In a hidden agents page, the Runner must open its own connections. This is the last live object that
RunnerManagerpassed. What remains can cross the agents link (#1748) as data.Tests
connections.test.ts: the Runner's connection hears a live session, and reports each start and end.🤖 Generated with Claude Code