claude-session-keeperlisted
Install: claude install-skill superbereza/claude-session-keeper
# claude-session-keeper
Keeps long-running Claude Code **Remote Control / tmux** sessions alive across reboots,
the machine sleeping, and OOM kills. A session **registers itself**, the list is a plain
TSV, and a systemd timer **self-heals** anything that died — re-launching it with the same
conversation (`claude --resume <uuid>`) and re-enabling Remote Control.
> **CLI:** call **`claude-keep`** (auto-added to PATH when installed as a plugin). If it's somehow
> not on PATH, fall back to `"$CLAUDE_PLUGIN_ROOT/bin/claude-keep"`. Never hardcode a versioned cache path.
## How a session identifies itself
`claude-keep add` takes **no arguments** — it reads the calling session's own environment:
| Field | Source |
|---|---|
| uuid | `$CLAUDE_CODE_SESSION_ID` |
| tmux name | `tmux display-message -p '#{session_name}'` |
| cwd | `$PWD` |
| effort | `$CLAUDE_EFFORT` |
So an agent can add *itself* in one call. **Run `claude-keep add` from inside the session you want
to persist** (e.g. the agent runs it in its own Bash tool) so the env reflects that session.
Model is **not** stored — `claude --resume` restores the session's own model.
## Commands
| Command | Action |
|---|---|
| `claude-keep add [--no-rc] [--effort <e>]` | Register THIS session. `--no-rc` = plain tmux session (don't re-enable Remote Control on restore). |
| `claude-keep rm [name]` | Remove THIS session (no arg) or a named one. Accepts the bare title (`yango`) or full tmux name (`cc—dev-serv-in/yango`). |
| `claude