Skip to Content
Commandslist

hty list

Show all sessions the server knows about, including sessions that are still running and those that have exited or been killed. Also scans log files on disk, so historical sessions appear even after a server restart.

Reference

hty list [--json]

List currently running sessions. Empty output if none.

Flags:
  --json   Emit the full structured response as JSON.

Default output

By default, hty list prints a formatted table:

ID NAME PROGRAM STATUS STARTED 019687a2 editor vim running 2m ago 019687a1 build make exited 5m ago

If no sessions exist, it prints “no sessions” to stderr.

JSON output

With --json, the output is a JSON object:

{ "ok": true, "sessions": [ { "id": "019687a2-b4c1-7e3a-8f02-d4c9a1e07b55", "name": "editor", "program": "vim", "args": "/tmp/notes.txt", "status": "running", "created_at_ms": 1749823441000 } ] }

The JSON form uses the same merged session set as the table output, including sessions recovered from disk after a server restart.

Session statuses

StatusMeaning
runningThe process is alive and accepting input
exitedThe process terminated on its own
killedThe process was stopped with hty kill
failedThe process could not be started
staleFound on disk from a prior server instance with no clean exit event
Last updated on