Skip to content

feat(agent): detect Zed SSH sessions - #32258

Merged
EhabY merged 3 commits into
mainfrom
feat/agentssh-detect-zed-sessions
Nov 17, 2026
Merged

EhabY merged 3 commits into
mainfrom
feat/agentssh-detect-zed-sessions

Conversation

@EhabY

@EhabY EhabY commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Zed connects over plain SSH and sends no app name, so its sessions show up as SSH. When no app name is set, the agent now labels a session zed if its command starts Zed's remote server proxy (zed-remote-server-… proxy --identifier …). zed was already in the list of apps Coder knows, so it now shows up in session counts, connection logs and metrics with no server change.

Verified against a real Zed 1.28.1 connection to a dogfood workspace: the agent runs .zed_server/zed-remote-server-stable-1.28.1+stable.390.… proxy --identifier workspace-2.

Limitations:

  • Zed's short setup commands (version check, binary upload, platform check) still count as SSH.
  • Zed's terminals, tasks and agent processes each open their own SSH session with no Zed marker, so they also count as SSH. The Zed connection itself is counted once, through the proxy session.
  • After a reconnect, one connection can briefly count twice until the old proxy session closes.
  • The check relies on Zed's binary name and proxy arguments, which aren't a stable API. The tests pin the current command forms.

Closes ENG-359

Decision log
  • A zed:// link can't carry an app name: Zed keeps only the user, host, port and path from it.
  • Using a special host name with a config-ssh change would only count sessions opened from dashboard links, so I didn't do that.
  • Detecting the command in the agent counts every Zed connection, however it was opened, and needs no client changes.
  • This check doesn't reuse or copy the JetBrains detection.

🤖 Generated with Coder Agents on behalf of @EhabY

@EhabY EhabY self-assigned this Nov 16, 2026
@linear-code

linear-code Bot commented Nov 16, 2026

Copy link
Copy Markdown

ENG-359

@EhabY
EhabY temporarily deployed to main November 16, 2026 12:05 — with GitHub Actions Inactive
@EhabY
EhabY temporarily deployed to main November 16, 2026 12:05 — with GitHub Actions Inactive
@EhabY
EhabY temporarily deployed to main November 16, 2026 12:12 — with GitHub Actions Inactive
@EhabY
EhabY temporarily deployed to main November 16, 2026 12:58 — with GitHub Actions Inactive
@EhabY EhabY changed the title feat(agent/agentssh): detect Zed SSH sessions feat(agent): detect Zed SSH sessions Nov 16, 2026
@EhabY
EhabY temporarily deployed to main November 16, 2026 13:09 — with GitHub Actions Inactive
@EhabY
EhabY temporarily deployed to main November 16, 2026 13:09 — with GitHub Actions Inactive

@chanelleXcoder chanelleXcoder left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM 👍🏽

@aslilac aslilac left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

zed appreciation day!!!

Comment thread agent/agentssh/agentssh.go Resolved
Comment thread agent/agentssh/appname_internal_test.go Resolved
@EhabY
EhabY merged commit d611c80 into main Nov 17, 2026
31 of 32 checks passed
@EhabY
EhabY deleted the feat/agentssh-detect-zed-sessions branch November 17, 2026 09:39
@EhabY
EhabY temporarily deployed to main November 17, 2026 09:39 — with GitHub Actions Inactive
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 17, 2026

This branch had an error being deployed

1 failed and 1 inactive deployments
main — 88eb11d1 Deployed Nov 17, 2026 by EhabY via cla #258503
docs-preview — 88eb11d1 Deployed Nov 17, 2026 by EhabY via cleanup #157
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants