Skip to content

Log ssh send failure#315787

Merged
roblourens merged 5 commits into
mainfrom
roblou/evident-eagle
May 12, 2026
Merged

Log ssh send failure#315787
roblourens merged 5 commits into
mainfrom
roblou/evident-eagle

Conversation

@roblourens
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings May 11, 2026 17:34
@roblourens roblourens enabled auto-merge (squash) May 11, 2026 17:34
@roblourens roblourens self-assigned this May 11, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds logging to the SSH relay protocol transport so that failures to send messages over the SSH relay are surfaced via the VS Code logging infrastructure, and wires up dependency injection to provide an ILogService to the transport.

Changes:

  • Inject ILogService into SSHRelayTransport and log relay close + relay send failures.
  • Switch SSH relay transport construction to IInstantiationService.createInstance(...) to satisfy the new service dependency.
  • Update SSH relay transport unit tests to pass a NullLogService when constructing the transport directly.
Show a summary per file
File Description
src/vs/platform/agentHost/test/electron-browser/sshRelayTransport.test.ts Updates tests to pass a NullLogService due to the new ILogService dependency.
src/vs/platform/agentHost/electron-browser/sshRemoteAgentHostServiceImpl.ts Uses DI (createInstance) to construct SSHRelayTransport with injected services.
src/vs/platform/agentHost/electron-browser/sshRelayTransport.ts Adds ILogService injection and logs relay close + relaySend failures.

Copilot's findings

Comments suppressed due to low confidence (1)

src/vs/platform/agentHost/electron-browser/sshRelayTransport.ts:67

  • relaySend failures are commented as a likely/expected consequence of a closed connection in the similar TunnelRelayTransport implementation, but here they are logged at error level. This risks log spam during normal teardown or transient disconnects. Consider either (a) logging at trace/warn with this._connectionId included, (b) suppressing known/expected errors (e.g. disposed/canceled), or (c) rate-limiting to once per connection.
	send(message: ProtocolMessage | AhpServerNotification | JsonRpcNotification | JsonRpcResponse | JsonRpcRequest): void {
		const text = JSON.stringify(message);
		this._ahpLogger?.log(message, 'c2s', getAhpLogByteLength(text));
		this._sshService.relaySend(this._connectionId, text).catch((err) => {
			this._logService.error('[SSHRelayTransport] relaySend failed', err);
		});
  • Files reviewed: 3/3 changed files
  • Comments generated: 1

Comment thread src/vs/platform/agentHost/electron-browser/sshRelayTransport.ts
@roblourens roblourens marked this pull request as draft May 11, 2026 17:43
auto-merge was automatically disabled May 11, 2026 17:43

Pull request was converted to draft

Copy link
Copy Markdown

@eremognosis eremognosis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks Good
It logs actually well
No issues found

roblourens and others added 2 commits May 11, 2026 14:14
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 123d29a0 Current: 40251f85

Changed (6)

agentSessionsViewer/FailedWithoutDuration/Dark
Before After
before after
agentSessionsViewer/FailedWithoutDuration/Light
Before After
before after
agentSessionsViewer/WithBadgeAndDiff/Dark
Before After
before after
agentSessionsViewer/WithBadgeAndDiff/Light
Before After
before after
agentSessionsViewer/ClaudeProvider/Dark
Before After
before after
agentSessionsViewer/ClaudeProvider/Light
Before After
before after

@roblourens roblourens marked this pull request as ready for review May 12, 2026 04:27
@roblourens roblourens enabled auto-merge (squash) May 12, 2026 04:27
@roblourens roblourens merged commit e781699 into main May 12, 2026
25 checks passed
@roblourens roblourens deleted the roblou/evident-eagle branch May 12, 2026 04:28
@vs-code-engineering vs-code-engineering Bot added this to the 1.121.0 milestone May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants