VS Code
tealc vscode launches VS Code Remote-SSH against an agent through the same SSH data path used by tealc ssh.
Prerequisites
- Install VS Code and make its
codecommand available in the localPATH. - Install the VS Code Remote-SSH extension.
- Confirm that
tealc ssh AGENT_NAMEworks before troubleshooting VS Code.
Quick usage
tealc vscode [AGENT_NAME] [REMOTE_PATH]
REMOTE_PATH is the directory to open on the agent (defaults to the current directory).
Windows agents
On Windows agents, Goauld first prepares the SSH parent process by creating or reusing an sshd.exe hard link to the agent executable. If hard-link creation is unavailable, you can provide a standalone compatibility shim with the optional --shim flag:
tealc vscode AGENT_NAME --shim /path/to/goauld_shim_windows-amd64.exe
Build the Windows shim on demand with the client compiler when needed:
tealc compile --id shim --goos windows --goarch amd64
The resulting shim is placed under the compile output directory, in the shim subdirectory. The client validates the supplied shim before starting VS Code and uses it only when it is valid. Without --shim, VS Code requires the agent to be able to create the hard link.
Local state and connection reuse
The local ssh_config/settings.json generated for the remote session are stored per agent (under the OS cache directory, in a subfolder named after the target agent), so running tealc vscode against different agents at the same time doesn’t overwrite one session’s config with another’s.
VS Code Remote-SSH makes many separate connections to the agent (initial connect, server install, port forwards), which benefits significantly from SSH ControlMaster (see ControlMaster). Since tealc vscode has no -M flag of its own, this only kicks in if control-master: true is set as a persisted default in your configuration file.
Limitations and cleanup
VS Code downloads and executes its remote server in the agent’s working directory, which may trigger target security tooling. Automatic cleanup may not remove that directory reliably. Close the remote session and verify or remove the VS Code server files manually when the operation ends.