# VS Code IDE (/docs/agent-workspace/vscode-ide)



VS Code IDE is for editing Agent workspace code from your local machine. After setup, you can use **Open in VSCode** in Buda to connect directly to the workspace.

When to use VS Code IDE [#when-to-use-vs-code-ide]

Use VS Code IDE when you want the full local IDE experience:

* Edit multi-file projects
* Use VS Code extensions
* Review Git changes
* Debug frontend or backend code
* Let an Agent and a human developer work in the same workspace

If you only need to preview a web page, [WebPreview](/docs/agent-workspace/web-preview) is usually faster.

Basic flow [#basic-flow]

1. Install VS Code locally, then install the [VS Code Remote SSH](https://code.visualstudio.com/docs/remote/ssh) extension.
2. Install `websocat` locally and make sure it is available in your terminal.
3. Paste your local SSH public key into the Buda dialog.
4. Copy the SSH config from the dialog and append it to `~/.ssh/config` on this computer.
5. Click **Open VS Code**, or select the Host from VS Code Remote SSH.

Install websocat [#install-websocat]

On macOS, use Homebrew:

```bash
brew install websocat
```

On Windows and Linux, you can use Cargo:

```bash
cargo install websocat
```

You can also download the matching binary from [websocat Releases](https://github.com/vi/websocat/releases) and add it to your local `PATH`.

After installation, run this locally:

```bash
websocat --version
```

If the command is not found, `websocat` is not on your `PATH`.

Find your SSH public key [#find-your-ssh-public-key]

Common public key files are:

```txt
~/.ssh/id_ed25519.pub
~/.ssh/id_rsa.pub
```

View the public key locally:

```bash
cat ~/.ssh/id_ed25519.pub
```

Copy the full output line and paste it into **Add your SSH public key** in the Buda dialog.

If you do not have an SSH key yet, create one:

```bash
ssh-keygen -t ed25519 -C "your-email@example.com"
```

Then open the generated `.pub` file.

Configure VS Code Remote SSH [#configure-vs-code-remote-ssh]

The Buda dialog generates an SSH config block that starts with `Host buda-agent-...`. Append it to:

```txt
~/.ssh/config
```

Then run this command in VS Code:

```txt
Remote-SSH: Connect to Host
```

Select the Host shown in the Buda dialog.

Q&A [#qa]

VS Code says websocat cannot be found. What should I do? [#vs-code-says-websocat-cannot-be-found-what-should-i-do]

Run `websocat --version` locally. If the command does not exist, reinstall websocat or add the websocat directory to `PATH`.

The connection shows Permission denied. What should I do? [#the-connection-shows-permission-denied-what-should-i-do]

Make sure you pasted the content of the public key file, the `.pub` file, into Buda. Do not paste the private key. Public keys usually start with `ssh-ed25519` or `ssh-rsa`.

I have multiple SSH keys. Do I need IdentityFile? [#i-have-multiple-ssh-keys-do-i-need-identityfile]

Usually no. The SSH config generated by Buda does not force an `IdentityFile`; VS Code can use your local SSH agent or default key.

If you have multiple SSH keys and VS Code picks the wrong one, append these lines to the Host config generated by the dialog:

```txt
Host buda-agent-xxxx
  IdentityFile ~/.ssh/id_ed25519
  IdentitiesOnly yes
```

Replace `buda-agent-xxxx` with the Host generated by the dialog, and replace `~/.ssh/id_ed25519` with your private key path.

VS Code keeps connecting. What should I check? [#vs-code-keeps-connecting-what-should-i-check]

Check these items first:

* The SSH config from Buda is saved in local `~/.ssh/config`
* `websocat --version` works in your local terminal
* The [VS Code Remote SSH](https://code.visualstudio.com/docs/remote/ssh) extension is installed
* The Buda workspace is still running

If it still fails, reopen the Buda VS Code dialog and copy the latest config again.

Related pages [#related-pages]

* [WebPreview](/docs/agent-workspace/web-preview)
* [Terminal Tab](/docs/agent-workspace/terminal-tab)
* [Agent Workspace Overview](/docs/agent-workspace)
