netclaw sessions
Pick up where you left off. netclaw sessions opens a terminal UI (TUI) listing your recent sessions — scroll, hit Enter, and you’re back in the conversation. For scripts, --once and --json dump session data to stdout instead.
Requires a running daemon. If it’s not up, start it with netclaw daemon start (or run netclaw init which starts it for you).
This command only lists sessions — there’s no delete or cleanup here. Session lifecycle is managed by the daemon’s retention policy.
netclaw sessions [options]Options
Section titled “Options”| Flag | Description | Default |
|---|---|---|
--once | List sessions to stdout and exit (no TUI) | TUI mode |
--json | Output as JSON array (implies --once) | Plain text |
TUI mode
Section titled “TUI mode”netclaw sessionsFull-screen session browser. Each entry shows:
[cli] Deploy troubleshooting (8 turns, 23m ago)[slack] Weekly standup recap (3 turns, 2h ago)[cli] Config migration (12 turns, 1d ago)The channel tag (cli, slack, etc.) shows where the session originated. The daemon returns up to 50 of your most recent sessions.
Keyboard shortcuts
Section titled “Keyboard shortcuts”| Key | Action |
|---|---|
↑ / K | Move selection up |
↓ / J | Move selection down |
Enter | Resume selected session (opens chat) |
N | Start a new netclaw chat session |
Ctrl+Q | Quit |
Escape | Quit |
Enter drops you straight into netclaw chat with that session’s full history loaded. When no sessions exist, you’ll see “No sessions found. Press Enter to start a new chat.”
Single-shot mode
Section titled “Single-shot mode”Plain text output
Section titled “Plain text output”netclaw sessions --onceLists all sessions to stdout, one per line:
a1b2c3d4 Deploy troubleshooting [active] turns=8 last=2026-05-03 14:22e5f6g7h8 Weekly standup recap [inactive] turns=3 last=2026-05-03 11:45Active means the session is held in memory and responds instantly. Inactive means it’s persisted to disk — resuming one replays its history, which takes a moment.
The session ID in the first column is what you pass to netclaw chat --resume:
netclaw sessions --once | head -1 | awk '{print $1}' | xargs netclaw chat --resumeJSON output
Section titled “JSON output”netclaw sessions --jsonOutputs a JSON array of session objects:
[ { "persistenceId": "session-a1b2c3d4", "channel": "cli", "title": "Deploy troubleshooting", "status": "active", "turnCount": 8, "createdAt": 1746268800000, "lastActivity": 1746282120000, "logPath": "/home/user/.netclaw/logs/sessions/a1b2c3d4" }]JSON fields
Section titled “JSON fields”| Field | Type | Description |
|---|---|---|
persistenceId | string | Full internal persistence ID (prefixed with session-) |
channel | string | Origin channel (cli, slack, discord, etc.) |
title | string? | Auto-generated or null for untitled sessions |
description | string? | Session description, if set |
status | string | active (in memory) or inactive (persisted to disk) |
turnCount | int | Number of completed conversation turns |
createdAt | long | Creation time (Unix milliseconds) |
lastActivity | long | Last activity time (Unix milliseconds) |
logPath | string? | Path to per-session log directory |
lastInputTokens | long? | Input tokens from the last recorded turn |
Note that sessionId is not included in the JSON — it’s computed at runtime. To derive the short ID from persistenceId, strip the session- prefix:
# Requires jqnetclaw sessions --json | jq -r '.[0].persistenceId | ltrimstr("session-")'Active sessions have their actor materialized in memory — they respond without any startup cost. Inactive sessions are persisted to disk and fully recoverable; resuming one replays its history, which takes a moment depending on the number of turns.
Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
0 | Sessions listed successfully |
1 | Daemon unavailable or request failed |
In TUI mode, a failed daemon connection shows “Failed to connect to daemon. Is it running?” In --once mode, the error looks different:
[FAIL] sessions: unable to reach daemon at <endpoint>: <message>run 'netclaw daemon start' and retry.Examples
Section titled “Examples”Find sessions with many turns
Section titled “Find sessions with many turns”# Requires jqnetclaw sessions --json | jq '[.[] | select(.turnCount > 10)] | sort_by(-.lastActivity)'Resume the most recently active session
Section titled “Resume the most recently active session”# Requires jq — derives session ID by stripping the "session-" prefixnetclaw chat --resume "$(netclaw sessions --json | jq -r '.[0].persistenceId | ltrimstr("session-")')"Related commands
Section titled “Related commands”netclaw chat— Pass--resume <id>to jump straight into a specific sessionnetclaw chat -p— Headless mode with--resumefor scripted multi-turn conversationsnetclaw status— Check daemon health if sessions can’t connectnetclaw stats— Token usage and session count metrics
Resources
Section titled “Resources”- jq manual — filter and transform
--jsonoutput - Akka.NET persistence — how session state survives daemon restarts