v0.5.0 c37833b

remote-resilience.md RawHistoryFolder

Remote sessions

vev attach user@host[:session]

vev must be installed on the remote host. The remote daemon owns the session: it runs the shells, renders the screen, and sends only small diffs to your client. Nothing is proxied through your local daemon.

How the connection works

  1. vev opens SSH to the host and starts a short-lived QUIC server there.
  2. SSH hands back a one-time token and the server's certificate fingerprint.
  3. Your client connects directly over QUIC (UDP), checks the fingerprint, and uses the token once.

Terminal traffic then goes over QUIC, not SSH. The token and keys stay in memory only.

If UDP is blocked, use SSH only:

VEV_REMOTE_TRANSPORT=stdio vev attach user@host

What survives a network problem

  • The remote session and its shells keep running while you are offline.
  • The client reconnects by itself after a network change, a VPN switch, or a laptop sleep.
  • If the reconnect window has expired but the session still exists, the client opens a fresh attachment to it.
  • Several clients can attach to the same session. Each keeps its own window, tab, focus, and copy mode.

Connection states

State Meaning
connected Everything works.
degraded Packets arrive, but updates are slow.
probing No contact; vev is looking for a working path.
offline No contact for a while; vev is reconnecting.
dead The connection is gone for good.

States appear in the vev status bar, never inside your shell output.

Hybrid mode: local and remote together

Add a host once:

vev host add user@host

Then the session picker (SSP) shows local and remote sessions in one list. Remote sessions appear as session@host, with tags like down or broken when they can't be opened.

  • Selecting a session switches to it, local or remote. BCK goes back to the previous one; JRS jumps to a recent one.
  • A remote session opened from the picker uses the remote host's environment and saved working directory.
  • CNS asks where to create the new session when several daemons are available.
  • Session history and the last selected tab in each session are per client and kept only while that client runs. Switching back restores that tab; choosing a specific tab overrides it. If the remembered tab was closed, vev falls back to the first tab.
  • Previews of remote sessions are cached in memory only, never written to disk.

After you leave a remote, vev keeps its connection warm so going back is instant. See warm remote transports.

Timeouts

What Limit
Connect to first screen 15 s
vev cmd result 10 s
A detached remote attachment waiting to resume 15 min

Upgrading

Client and daemons must run the same protocol version. Upgrade vev on your machine and on every remote host together.

Debugging

VEV_LOG=debug vev attach user@host
scripts/debug-remote-attach.sh user@host   # collects redacted connection health

Useful manual checks: block UDP, switch networks or VPN, suspend the laptop, then reattach to the same session.

Keep hostnames, usernames, and keys out of shared logs and screenshots.

source
1# Remote sessions
2
3```sh
4vev attach user@host[:session]
5```
6
7vev must be installed on the remote host. The remote daemon owns the session: it runs the shells, renders the screen, and sends only small diffs to your client. Nothing is proxied through your local daemon.
8
9## How the connection works
10
111. vev opens SSH to the host and starts a short-lived QUIC server there.
122. SSH hands back a one-time token and the server's certificate fingerprint.
133. Your client connects directly over QUIC (UDP), checks the fingerprint, and uses the token once.
14
15Terminal traffic then goes over QUIC, not SSH. The token and keys stay in memory only.
16
17If UDP is blocked, use SSH only:
18
19```sh
20VEV_REMOTE_TRANSPORT=stdio vev attach user@host
21```
22
23## What survives a network problem
24
25- The remote session and its shells keep running while you are offline.
26- The client reconnects by itself after a network change, a VPN switch, or a laptop sleep.
27- If the reconnect window has expired but the session still exists, the client opens a fresh attachment to it.
28- Several clients can attach to the same session. Each keeps its own window, tab, focus, and copy mode.
29
30## Connection states
31
32| State | Meaning |
33|---|---|
34| `connected` | Everything works. |
35| `degraded` | Packets arrive, but updates are slow. |
36| `probing` | No contact; vev is looking for a working path. |
37| `offline` | No contact for a while; vev is reconnecting. |
38| `dead` | The connection is gone for good. |
39
40States appear in the vev status bar, never inside your shell output.
41
42## Hybrid mode: local and remote together
43
44Add a host once:
45
46```sh
47vev host add user@host
48```
49
50Then the session picker (`SSP`) shows local and remote sessions in one list. Remote sessions appear as `session@host`, with tags like `down` or `broken` when they can't be opened.
51
52- Selecting a session switches to it, local or remote. `BCK` goes back to the previous one; `JRS` jumps to a recent one.
53- A remote session opened from the picker uses the remote host's environment and saved working directory.
54- `CNS` asks where to create the new session when several daemons are available.
55- Session history and the last selected tab in each session are per client and kept only while that client runs. Switching back restores that tab; choosing a specific tab overrides it. If the remembered tab was closed, vev falls back to the first tab.
56- Previews of remote sessions are cached in memory only, never written to disk.
57
58After you leave a remote, vev keeps its connection warm so going back is instant. See [warm remote transports](configuration.md#warm-remote-transports).
59
60## Timeouts
61
62| What | Limit |
63|---|---|
64| Connect to first screen | 15 s |
65| `vev cmd` result | 10 s |
66| A detached remote attachment waiting to resume | 15 min |
67
68## Upgrading
69
70Client and daemons must run the same protocol version. Upgrade vev on your machine and on every remote host together.
71
72## Debugging
73
74```sh
75VEV_LOG=debug vev attach user@host
76scripts/debug-remote-attach.sh user@host   # collects redacted connection health
77```
78
79Useful manual checks: block UDP, switch networks or VPN, suspend the laptop, then reattach to the same session.
80
81Keep hostnames, usernames, and keys out of shared logs and screenshots.

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 12

Tags 11

↑↓ moveenter openesc close