Skip to content

feat(ssh): detect remote-host CLI agents in quick-launch menu - #1027

Merged
Jinwoo-H merged 2 commits into
mainfrom
Jinwoo-H/ssh-agents-984
Apr 24, 2026
Merged

Jinwoo-H merged 2 commits into
mainfrom
Jinwoo-H/ssh-agents-984

Conversation

@Jinwoo-H

Copy link
Copy Markdown
Contributor

Summary

  • Adds relay-side agent detection (PreflightHandler) that runs which inside a login shell to match the user's real PATH on SSH hosts
  • Wires preflight:detectRemoteAgents IPC through main process and preload bridge
  • Extends the Zustand store with per-connection remote agent state, promise deduplication, and cache invalidation on SSH disconnect
  • Makes useDetectedAgents hook and QuickLaunchButton connection-aware with three-way connectionId semantics (string = remote, null = local, undefined = loading)

Closes #984

Test plan

  • Local worktree: + menu still detects and launches local agents (regression)
  • Remote SSH worktree: + menu detects agents installed on the remote host
  • Remote detection shows loading state during the 1-3s detection window
  • SSH disconnect clears cached remote agents; reconnect re-detects
  • pnpm run typecheck passes
  • pnpm test passes

#984)

When the active worktree is remote, the + menu now detects agents on the
SSH host (not locally) and launches them via the remote PTY provider.

Adds a PreflightHandler to the relay that runs `which` inside a login
shell to match the user's real PATH. The renderer store, hook, and UI
are connection-aware with proper loading states and cache invalidation
on SSH disconnect.
The composer's agent dropdown always called ensureDetectedAgents() (local)
regardless of whether the selected repo was SSH-remote. Now it reads the
repo's connectionId and calls ensureRemoteDetectedAgents when appropriate,
so the agent list matches what's installed on the SSH host.
@Jinwoo-H
Jinwoo-H merged commit 717f319 into main Apr 24, 2026
2 checks passed
@Jinwoo-H
Jinwoo-H deleted the Jinwoo-H/ssh-agents-984 branch April 24, 2026 20:21
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 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.

[Feature]: Detect and show remote-host CLI agents in the "+" quick-launch menu

1 participant