Skip to content

Add SSH-based remote agent support#51

Open
itslijohnny wants to merge 1 commit into
formulahendry:mainfrom
itslijohnny:feature/remote-ssh-agents
Open

Add SSH-based remote agent support#51
itslijohnny wants to merge 1 commit into
formulahendry:mainfrom
itslijohnny:feature/remote-ssh-agents

Conversation

@itslijohnny

Copy link
Copy Markdown

ACP only speaks JSON-RPC over stdio, so there's no way to point the extension at an agent (e.g. Hermes Agent) running on another machine. Add an optional remote: { host, user?, port?, identityFile? } block to acp.agents entries: when set, command/args are launched over ssh instead of locally, tunneling the agent's stdio.

Docs updated per Hermes's own ACP docs
(https://hermes-agent.nousresearch.com/docs/user-guide/features/acp), which confirm the agent side has no built-in network transport either.

ACP only speaks JSON-RPC over stdio, so there's no way to point the
extension at an agent (e.g. Hermes Agent) running on another machine.
Add an optional `remote: { host, user?, port?, identityFile? }` block
to acp.agents entries: when set, command/args are launched over `ssh`
instead of locally, tunneling the agent's stdio.

Docs updated per Hermes's own ACP docs
(https://hermes-agent.nousresearch.com/docs/user-guide/features/acp),
which confirm the agent side has no built-in network transport either.
Copilot AI review requested due to automatic review settings July 5, 2026 07:32
@itslijohnny

Copy link
Copy Markdown
Author

adding new remode agent

@itslijohnny itslijohnny closed this Jul 5, 2026
@itslijohnny itslijohnny reopened this Jul 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds optional SSH tunneling so ACP agents (JSON-RPC over stdio) can be spawned on a remote machine while keeping stdio connected to the extension locally.

Changes:

  • Introduces remote: { host, user?, port?, identityFile? } on acp.agents entries and spawns agents via ssh when set.
  • Updates configuration typing + VS Code settings schema to expose the new remote block.
  • Documents remote-agent usage, requirements, and limitations; adds a changelog entry.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/core/AgentManager.ts Adds SSH-based spawning path and helpers for remote agent invocation.
src/config/AgentConfig.ts Extends agent config types with a remote SSH target interface.
README.md Documents remote agent configuration and limitations.
package.json Updates acp.agents settings schema to include remote fields.
CHANGELOG.md Adds an Unreleased changelog entry for SSH remote agents.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/core/AgentManager.ts
*/
function buildRemoteSshInvocation(config: AgentConfigEntry): { command: string; args: string[] } {
const remote = config.remote!;
const sshArgs: string[] = ['-o', 'BatchMode=yes', '-o', 'StrictHostKeyChecking=accept-new'];
Comment thread src/core/AgentManager.ts
}

const target = remote.user ? `${remote.user}@${remote.host}` : remote.host;
sshArgs.push(target);
Comment thread src/core/AgentManager.ts
Comment on lines +96 to +97
const remoteCommandStr = [config.command, ...(config.args || [])].map(shellEscape).join(' ');
sshArgs.push(`bash -lc ${shellEscape(remoteCommandStr)}`);
Comment thread src/core/AgentManager.ts
Comment on lines +78 to +80
* The remote command runs through `bash -lc` so the remote user's login
* profile (nvm, pyenv, venvs, etc.) is sourced — mirroring the local-spawn
* behavior below.
Comment thread src/core/AgentManager.ts
Comment on lines +67 to +69
if (path.startsWith('~/')) {
return join(homedir(), path.slice(2));
}
Comment thread README.md
Requirements:
- Passwordless SSH access to the host (key-based auth — there's no interactive password prompt support).
- `hermes` on the remote account's `PATH`, with credentials already configured there (`hermes model`) — see the [Hermes ACP docs](https://hermes-agent.nousresearch.com/docs/user-guide/features/acp) for installing/configuring Hermes itself.
- The remote command runs via a login shell (`bash -lc`) so `PATH` picks up nvm/pyenv/venv entries from the remote profile, same as local agents.
Comment thread package.json
Comment on lines +314 to +317
"port": {
"type": "number",
"description": "SSH port. Omit to use the default (22) or ssh config."
},
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.

2 participants