Session Management
Remi tracks sessions across restarts. You can list running sessions, browse recent projects, create new sessions locally or remotely, attach your terminal, or resume a previous Claude conversation.
remi ls
List live sessions from a running Remi daemon.
remi ls
Queries the local daemon and prints active sessions:
NAME PORT STATUS DURATION LAST ACTIVITY
--------------------------------------------------------------------------
my-project 18765 active 45m 0s ago
another-project 18766 idle 2h 5m ago *
Sessions marked with * are available to attach. The PORT column is the WebSocket port of the daemon hosting that session; use it with remi attach host:port/name or remi kill host:port/name to target a specific daemon when several are running.
Remote listing
Query a remote daemon:
remi ls --host 100.79.39.98
Discover sessions across the network (uses mDNS):
remi ls --network
When a machine is reachable via multiple IPs (e.g., both LAN and VPN/Tailscale), --network deduplicates sessions so each session appears only once.
Options
| Option | Description |
|---|---|
--host HOST | Query daemon at HOST instead of localhost |
--port PORT | Query daemon on specific port |
--network | Discover and list sessions across the local network |
remi recent
Browse recent project directories from session history.
remi recent
Shows the 20 most recently used project directories by default.
Output:
# DIRECTORY SESSIONS LAST USED
----------------------------------------------------------------
1 ~/git/yooz/remi 12 2h ago
2 ~/git/yooz/eventformer 8 1d ago
3 ~/git/osa 2 3d ago
Remote recent
Query a remote daemon's session history:
remi recent --host 100.79.39.98
remi recent --host 100.79.39.98 --port 9000
remi new
Start a new session. Without flags, this is equivalent to remi (wrapper mode). You can pass additional Claude Code arguments after --:
remi new --dir ~/project -- --resume
Start in a specific directory
remi new /path/to/project
remi new --dir ~/git/my-project
The positional form (remi new /path) is a shorthand for --dir.
Pick from recent directories
remi new --recent
Shows a numbered list of recent project directories and prompts you to select one. Empty input defaults to the first item.
Create a session on a remote machine
remi new --host 100.79.39.98
Spawns a new daemon process on the remote machine and automatically attaches your terminal. Each remi new --host creates a fresh daemon on a free port (one session per daemon). Combine with --dir or --recent to choose the working directory:
remi new --host 100.79.39.98 --dir ~/project
remi new --host 100.79.39.98 --recent
You can also use the host:path shorthand to specify both host and directory in one argument:
remi new myserver:~/project
remi new myserver:/absolute/path
remi new [::1]:~/project # IPv6 with bracketed notation
This is equivalent to remi new --host myserver --dir ~/project.
Options
| Option | Description |
|---|---|
--host HOST | Create session on remote daemon and auto-attach |
--dir PATH | Working directory for the new session |
--recent | Pick from recent project directories (mutually exclusive with --dir) |
--dir and --recent are mutually exclusive. Use one or the other, not both.
remi attach
Attach your terminal to a running session, similar to tmux attach.
# Attach to the most recent active session
remi attach
# Attach to a specific session (prefix match)
remi attach abc12345
Once attached, you see Claude's live output and can type responses directly. Detach with Ctrl+B d (like tmux).
If the session already has another client attached, you get a clear error message explaining the session is busy. Wait for the other client to detach (Ctrl+B d) or use remi kill to force disconnect.
Remote attach
Attach to a session on a remote daemon:
remi attach 100.79.39.98:18765/abc12345
Or use --host and --port:
remi attach abc12345 --host 100.79.39.98
If you omit the session ID, Remi auto-attaches to the only available session (or the only attachable one if multiple exist):
remi attach 100.79.39.98:18765
If the session ID is ambiguous (matches multiple sessions), Remi shows the matches and asks for a longer prefix.
remi detach
Detach from the current or a named session.
# Detach from current session
remi detach
# Detach from a specific session
remi detach my-project
In practice, you will usually detach interactively with Ctrl+B d while attached.
remi kill
Kill a running session by name or session ID.
remi kill my-project
remi kill abc12345
The session's Claude Code process is terminated. Use remi ls to see available sessions and their names.
Remote kill
Kill a session on a remote daemon using --host or the inline host:port/session format:
remi kill my-project --host 100.79.39.98
remi kill my-project --host 100.79.39.98 --port 9000
remi kill 100.79.39.98:18765/my-project
remi --sessions
List stored sessions. By default shows only running sessions.
remi --sessions # Running sessions only
remi --sessions all # All sessions (running + exited)
remi --sessions exited # Exited sessions only
Output:
Stored sessions:
abc12345 running /home/user/my-project claude:xyz98765 2026-03-01T10:30:00Z
def67890 exited (0) /home/user/other-project claude:uvw12345 2026-02-28T09:00:00Z
Each line shows the Remi session ID (first 8 chars), status, project path, Claude session ID (if captured), and start time.
Filter options
| Filter | Description |
|---|---|
| (none) | Running sessions only (default) |
all | All sessions, including exited |
exited | Exited sessions only |
remi --resume
Resume a previous Claude Code session using Claude's --resume flag.
# Resume the most recent session
remi --resume
# Resume a specific session (by Remi session ID prefix or Claude session ID)
remi --resume abc12345
Remi looks up the stored session, finds its Claude session ID, and passes --resume <claude-session-id> to Claude Code. It also changes to the stored project directory.
If the session has no Claude session ID (e.g., it exited too quickly), Remi reports an error.