Skip to content

Servers

Experimental

Remote servers are experimental. The servers: config and how server sessions work may change.

Code lists the sessions of each server under servers: in the hive config.yaml with your local sessions. A server is another machine that runs hive and that Hive Desktop reaches over ssh.

To set up a server and add it to config.yaml, follow Remote servers. Hive Desktop and the hive CLI read the same list.

Sessions on a server

A server's session sits in its repository's group, after your local sessions, with a server icon in that server's color. Hover the icon for the server's name. Each repository header has a colored dot for every server with a session in it. When a server session is open, the bar above its terminal names the server.

To create a session on a server, pick it in the Server field of the New Session dialog, or run New session on and the server name from the command palette. Both offer connected servers only. The dialog then lists that server's repositories and agents.

On a server's session you can:

  • open its terminal, which runs over ssh
  • start it when its terminal stopped; the server opens the session's tmux windows and agent from its own rules:
  • rename it, edit its tags, recycle it, and delete it
  • see its branch, line counts, uncommitted changes, and pull request in the status bar
  • open Changes to read its diff, see and dismiss the comments its agent wrote, and send a review to its agent

Changes reads the checkout on the server, and a review goes to the agent through the server's tmux. Comments that an agent on the server adds to the diff with hive review diff put stay in the server's hive, and Changes reads them again every 10 seconds while it is open. To send a review or to see agent comments, the server needs the same hive version as your machine.

Open in editor, Show in Finder, agent windows, configured actions, and the Tasks tab run on your machine, so Code does not offer them for a server's session. Code refuses an image pasted into its terminal, and a pop-up terminal in its directory, because the file or the terminal would be on your machine, not on the server. A create on a server does not take an agent workspace, and the dialog refuses a prompt above 32 KiB.

Server states

Settings ▸ Servers checks each server when it opens, and again when you press Check again.

State Meaning Fix
Connected The server answered
Offline ssh or the daemon did not answer Read the ssh error on the server's row, or hover the red dot in Code's status bar. Check that ssh <host> logs in without a prompt.
Incompatible The server's hive speaks another protocol version Install the same hive version on both machines

When a server goes offline or becomes incompatible, Hive Desktop sends one notification and shows a red dot on the right of Code's status bar. Hover the dot for each server's state and error, and click it to try again. Turning off the status bar hides the dot too. Sessions that Code already listed stay in place, struck through and without a menu, until the server answers again. After a restart of Hive Desktop, Code lists them only when the server answers. Your local sessions do not wait for it, but a server that hangs can hold back other servers' sessions for up to 5 seconds.