Enhance session lock logic and server stale notifications#2696
Merged
Conversation
…a .held so you know if the lock is alive or stale.
…and. clients get a persistent message indicating stale server
robgruen
marked this pull request as ready for review
July 17, 2026 23:46
Collaborator
Author
|
@copilot resolve the merge conflicts in this pull request |
Contributor
TalZaccai
approved these changes
Jul 18, 2026
…displayStatusNotice helper The CI complexity ratchet failed because adding the statusNotice case inline to the notify() method pushed its cognitive complexity from ≤30 to 33. Extract the statusNotice handling logic into a dedicated displayStatusNotice() helper function, following the same pattern as displayToastNotification() and displayInlineNotification(), to bring notify() back under the cognitive complexity threshold.
Collaborator
Author
|
@copilot resolve the merge conflicts in this pull request |
…rver # Conflicts: # ts/packages/agentServer/server/README.AUTOGEN.md # ts/packages/chat-ui/README.AUTOGEN.md # ts/packages/dispatcher/types/README.AUTOGEN.md # ts/packages/shell/README.AUTOGEN.md # ts/packages/vscode-shell/README.AUTOGEN.md
Contributor
robgruen
enabled auto-merge
July 18, 2026 01:32
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 pull request adds support for detecting when the agent-server's code has been rebuilt on disk while the server is still running, and provides a mechanism for clients to restart the server in place. The server now notifies clients (and logs to the console) when it's serving out-of-date code, and exposes a new
restartRPC method for supported environments. This improves the developer experience during local development by making it easy to reload new code without manual intervention.Agent server restart and staleness detection:
Added a
restart()method to theAgentServerConnectioninterface and implemented it in both the client and server, allowing clients to request an in-place server restart that reloads freshly-built code. This is only available for standalone servers; embedded/in-process servers will reject the call. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]Implemented the server-side restart logic in
server.ts, which gracefully tears down the current process and launches a new one with the same arguments, ensuring the new process can bind to the port and acquire the lock without race conditions.Added a new
staleBuild.tsmodule that watches the server's owndist/directory for changes. If a rebuild is detected after the server starts, it sets a flag, prints a prominent warning banner to the console, and ensures each connecting client is notified once about the stale build. [1] [2] [3]Client notification of stale builds:
UI groundwork for persistent status notices:
chatPanel.tsfor a persistent status notice layer, distinct from transient toasts, to display these server-originated warnings in the UI. [1] [2]