Add the Toolbox session ID registry and session-aware logging foundation. - #356
Merged
Conversation
This drops support for Toolbox versions older than 3.7.2 but instead provides new APIs that can give better control and insight to the Coder plugin.
Keep one generated session ID for each workspace and agent pair so SSH reconnects share the same correlation value. Remove the entry only when Toolbox disposes the environment, allowing a later environment to begin a new session.
Add one logger wrapper that preserves existing logging calls and lets callers attach a connection session ID when a message belongs to a workspace session. Keep the existing log-and-show behavior in the same wrapper so messages are logged before they are displayed to the user.
Expose the Coder logger from the shared plugin context and use it for existing log-and-show calls. Keep popup creation and error handling inside the logger so callers use one place for logging and user notifications.
fioan89
requested review from
code-asher,
jeremyruppel and
matifali
and removed request for
code-asher
August 27, 2026 21:24
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.
Context
The connection correlation requirements ask clients to generate a session ID and propagate it through client logs, Coder API requests, telemetry, and the Coder CLI. This provides one value that can be searched across the full connection lifecycle.
Toolbox has a different lifecycle from IDE-oriented clients. Each workspace and agent pair can have one Toolbox-managed SSH connection, and multiple JetBrains IDEs can be launched through that connection. The SSH connection can start before an IDE, remain active after an IDE closes, span multiple IDE launches, or exist without the user launching an IDE at all.
Because of this, a Toolbox session is associated with the workspace and agent connection rather than an individual IDE process. Its session ID remains stable across IDE launches and transient SSH reconnections, and is removed when the Toolbox environment is disposed.
Toolbox requirements
For Toolbox, we need to:
What this PR provides
This PR adds the foundation for these requirements:
Follow-up work will connect the registry to the SSH lifecycle and propagate the session ID through API baggage, the CLI environment, telemetry, and session-specific log call sites.