Coder Remote Work
Coder Remote Work connects local VS Code to Codework-managed sandbox containers. It discovers available containers from the Codework Manager, opens the selected sandbox through VS Code Remote - SSH, and lets you continue OpenCode agent sessions from a VS Code panel.
Features
- Discover sandbox containers from a Codework Manager service.
- Select the active container from the Codework side bar.
- Show the current container name and short ID in the VS Code status bar.
- Open the selected sandbox workspace with one command; stopped environments are started and polled automatically.
- Run layered health checks for Manager access, environment state, Gateway readiness, local SSH/Tunnel dependencies, transport, and ACP.
- Connect to sandboxes through Remote - SSH, including SSH over HTTPS proxy mode.
- View, create, continue, stop, and refresh remote OpenCode sessions.
- Send prompts from the embedded Codework panel and receive live updates.
- Show generated SSH config and ACP proxy commands when needed.
- Use the bundled
codework-acp-proxy command for ACP stdio clients.
Requirements
- VS Code 1.90.0 or later.
- Microsoft Remote - SSH extension:
ms-vscode-remote.remote-ssh.
- A reachable Codework Manager URL.
- A Codework Manager token.
- A manager container profile that includes the sandbox Gateway URL, client token, remote mode, and workspace path.
- OpenSSH available on the local machine.
Remote Tunnel mode also requires Microsoft Remote - Tunnels: ms-vscode.remote-server. The default sandbox path is provided by the manager profile.
Setup
- Install this extension from the VS Code Marketplace.
- Install
Remote - SSH.
- Open VS Code
settings.json.
- Add the Codework Manager URL and account token.
- Run
Codework: 容器 to choose a container. The selected container is stored in extension state, so switching containers does not require editing settings.json.
- Run
Codework: 连接工作区. The extension runs the layered preflight, prepares SSH when needed, and opens the remote workspace.
- Open the Codework side bar to start or continue an OpenCode session.
OpenCode provider URL, token, and model are configured on the remote sandbox or Gateway. The extension does not store those provider settings.
Settings
The extension stores only the manager entry settings in VS Code settings. The selected container ID is stored in extension state and can be changed with Codework: 容器.
{
// Codework Manager base URL.
"codework.managerUrl": "https://your-codework-manager.example.com",
// Codework Manager account token. Reuse the same token for all containers you can access.
"codework.managerToken": "your-manager-token",
// Legacy optional fallback. New container selection is done by Codework: 容器.
"codework.activeContainerId": ""
}
The extension reads containers from GET /api/plugin/containers and reads the active connection profile from GET /api/plugin/containers/{id}/profile. Container connection details stay in memory and refresh from the manager.
Commands
| Command |
Purpose |
Codework: 连接 |
Enter or update the Codework Manager URL and token. |
Codework: 容器 |
Select the active sandbox container. |
Codework: 环境 |
Select the active sandbox container. |
Codework: 设置 |
Open VS Code settings.json. |
Codework: 状态 |
Run the read-only layered connection health check and write a redacted report to the Codework output channel. |
Codework: 新建 |
Create a new remote OpenCode session. |
Codework: 刷新 |
Reload the remote session list. |
Codework: 侧栏 |
Open the Codework panel in the Secondary Side Bar. |
Codework: 打开会话 |
Open or focus the selected session panel. |
Codework: 发送 |
Send a prompt to the selected session. |
Codework: 停止 |
Stop the selected remote session. |
Codework: 连接工作区 |
Start a stopped environment, run connection preflight, and open the workspace through Remote - SSH or Tunnel. |
Codework: Tunnel |
Open the selected sandbox through Remote Tunnel mode. |
Codework: 登录码 |
Show the Remote Tunnel login code when tunnel mode needs authorization. |
Codework: SSH 配置 |
Show the generated SSH config for the selected container. |
Codework: ACP 命令 |
Show the local ACP proxy command. |
Codework: 测试 ACP |
Test the ACP initialize handshake. |
Codework: Diff |
Open VS Code diff for remote workspace changes. |
Remote Connection
Codework: 连接工作区 checks the connection in five layers before opening the folder: Manager and environment discovery, environment profile and lifecycle, Gateway health, local client and transport, then the optional ACP handshake. A failed blocking layer stops the open action and identifies the failing layer in the output report. ACP failures are warnings and do not block a normal remote workspace connection.
Codework: 状态 uses the same checks without starting or changing the selected environment. The latest redacted result is stored in VS Code extension state and shown in the Codework status bar tooltip.
For https-ssh profiles, the extension writes a Host block to the local SSH config and uses the bundled codework-ssh-proxy script as ProxyCommand. This lets Remote - SSH connect through the sandbox HTTPS Gateway instead of a public SSH port.
For direct ssh profiles, the manager profile must include the SSH host, port, user, alias, and workspace path.
For tunnel profiles, the extension uses VS Code Remote - Tunnels and can show the login code if the remote tunnel still needs authorization.
ACP
The extension includes bin/codework-acp-proxy.js. ACP-compatible clients can use the command shown by Codework: ACP 命令 to connect to the active container Gateway through stdio.
Security
Treat the manager token, sandbox client token, and SSH key as workspace credentials. The published extension README uses placeholders only; put real values in your local VS Code settings.
WeCom SmartBot settings are container attributes. Configure them in the Codework Manager web UI, not in this extension.