# Notifications

:::caution[Preview]
Notifications are new and have not yet been tested end to end. Details may change.
:::

Run `lt unify` on your computer and every running VPS in your team can send you short messages:
when Claude Code finishes a task, when it needs your input, or when an agent asks you a question
or for a file.

```sh
lt unify
```

It runs until Ctrl-C. VPSs you start or create while it runs are picked up; stopped and deleted
ones are dropped. [`lt view --tunnel`](/view/) shows the messages of one VPS the same way.

## Claude Code

New VPSs set this up for Claude Code: its "needs input" and "done" events send a message. You
see it as a line in the terminal where `lt unify` runs (with the VPS's name) and, where your
system supports it, as a desktop notification.

Messages sent while it is closed arrive the next time you start it. `lt unify ls` lists the
recent ones.

## Send your own

On the VPS, `lt-notify` sends a message from any script or command:

```sh
lt-notify "Tests passed"
lt-notify --kind done "Build finished"
lt-notify --kind needs_input "Waiting for review"
```

`--kind` is `info` (the default), `done` or `needs_input`. Inside a terminal session the message
names that session; `--session <name>` sets another.

## Ask a question and wait

`lt-notify ask` sends a question and waits for your answer, then prints it:

```sh
answer=$(lt-notify ask "Deploy to staging now?")
```

Answer it from your computer, with the message id `lt unify` shows, or `latest`:

```sh
lt unify reply my-vps latest "yes, go ahead"
lt unify reply my-vps 1794136000000 --cancel
```

It waits 15 minutes (`--timeout SECONDS` changes it). It exits 0 with your answer, 3 when time
runs out and 4 when you cancel.

## Ask for a file from your computer

An agent on the VPS can ask for one file from your computer:

```sh
lt-notify request-file ~/notes/plan.md docs/
```

`lt unify` shows the full path on your computer and asks `allow? [y/N]`. Only when you type `y`
does it copy that one file (with `lt cp`) to the destination on the VPS (default: the home
directory); anything else denies it. It refuses paths outside your home directory, directories
and missing files. The command on the VPS exits 0 when the file was copied and 4 when you
denied it. Nothing in a message is ever run on your computer.

## Use messages in your own scripts

`lt unify` also saves every message on your computer, one JSON object per line, in:

```text
~/.local/state/liveterminal/inbox/<vps-id>.jsonl
```

(`$XDG_STATE_HOME/liveterminal/inbox/` if you set `XDG_STATE_HOME`.) Each line looks like this:

```text
{"id":1794136000000,"kind":"done","session":"main","text":"Build finished","time":"2026-11-08T11:06:40.000Z","vps":"<host name>"}
```

- `id`: a number that grows with each message from that VPS.
- `kind`: `info`, `done`, `needs_input`, `ask` or `request_file`.
- `session`: the terminal session it came from, or `null`.
- `text`: the message.
- `time`: when the VPS sent it, in UTC.
- `vps`: the VPS's host name.
- `deadline` (`ask`, `request_file`): when the VPS stops waiting; `path` and `dest`
  (`request_file`): the file asked for and where it goes.

Your own scripts can watch that file, for example:

```sh
tail -F ~/.local/state/liveterminal/inbox/<vps-id>.jsonl
```

The file keeps the last 7 days, at most 1000 messages per VPS. Message text comes from the VPS:
treat it as untrusted input and never run it as a command.

## Let the AI on your VPS talk to the AI on your computer

When Claude Code (or Codex) works on a VPS and another one works on your computer, they can talk
through `lt unify`. Ask your local AI to keep `lt unify` running in the background and act on
what arrives, for example:

> Run `lt unify` in the background and keep watching it. When a message comes from one of my
> VPSs, do what it asks if you can, and answer it with `lt unify reply <vps> <id> "<answer>"`.

Then tell the AI on the VPS how to reach it:

> When you need something from my computer (a file, a login, a check), ask with
> `lt-notify ask "<question>"` and wait for the answer. Send progress with `lt-notify`.

Each side keeps its own work: the VPS's AI runs your long jobs, and your local AI handles what
only your computer has.

## Emails from LiveTerminal

LiveTerminal also emails you about the teams you belong to: when the platform stops or starts a
VPS, about a failed payment or billing block, when usage reaches 80% of a plan limit (not on a plan
with a single VPS, whose one machine always fills it), and about incidents. List the recent ones (kept for 90 days) and whether each email was sent:

```sh
lt notifications list
```

Each kind of email has its own switch, for all your teams at once: `platform`, `billing`,
`quota`, `incident` and `agent` (a coding agent on a VPS you created asks you to step in on its
screen). All are on until you turn them off:

```sh
lt notifications settings                    # show the switches
lt notifications settings --off quota        # stop quota emails
lt notifications settings --on quota         # turn them back on
```

A switched-off notification is still listed, marked `skipped`.

Offers emails (free and discounted offers you're eligible for) come only if you say yes: tick
"Email me about free and discounted offers I'm eligible for." when you sign in or keep your free
computer, or turn on **Offers and promotions** on the dashboard's Notifications page. They are
off until you do. Each one has an unsubscribe link that turns them off in one click, without
signing in; the Notifications page turns them off too.