sessions

A command set for managing agent sessions, which group a sandbox, agent type, and status together. Sessions can be started, stopped, saved as snapshots, resumed, listed, or deleted.

In plain words
What is it for?
Use it to start sessions for coding agents, check their status, stop or resume them, save their current state, and clean them up.
Why use it?
It keeps work and its related sandbox organised across stops and restarts. Saving a session preserves its sandbox so you can continue later.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/thrashr888/agentkernel/sessions
Clone the repo
git clone --depth 1 https://github.com/thrashr888/agentkernel
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 665 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00665
Opus 5 $0.00000 $0.00332
Sonnet 5 $0.00000 $0.00133
Haiku 4.5 $0.00000 $0.00067

Measured 2d ago against content hash ff07197d6a5c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sessions scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/commands/sessions.md · 98 lines

How it starts

The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.

agentkernel session

Manage agent sessions. A session ties together a sandbox, an agent type, and lifecycle metadata (creation time, exec count, status). Sessions can be stopped, saved (snapshotted), and resumed.

Subcommands

Command Description
session start --name NAME --agent AGENT [-B BACKEND] Start a new session
session list List all sessions
session stop <NAME> Stop a session (stops sandbox, keeps metadata)
session save <NAME> Save a session (snapshot sandbox + mark saved)
session resume <NAME> Resume a stopped or saved session
session delete <NAME> Delete a session and clean up

Examples

Start a session

agentkernel session start --name feature-x --agent claude -B docker
# Output:
# Session 'feature-x' started.
#   Sandbox: session-feature-x
# Use: agentkernel attach session-feature-x

The sandbox is named session-<name>. Use exec to interact with any supported backend. Interactive attach is available only on backends that support it; server-owned Firecracker sessions use agentkernel exec session-<name> -- <command> or agentkernel ssh session-<name> when SSH is configured.

List sessions

$ agentkernel session list
NAME                 AGENT      STATUS     DURATION      EXECS
feature-x            claude     running    2h 14m            5
bugfix-123           gemini     saved      1d                12
old-session          codex      stopped    3d                0

Work in a session

agentkernel exec session-feature-x -- python3 -c "print('working')"
# Docker and other interactive-attach backends only:
agentkernel attach session-feature-x

Save a session (snapshot)

# Creates a snapshot and marks the session as saved
agentkernel session save feature-x
# Output: Session 'feature-x' saved (snapshot: feature-x-20260201)

Resume a session

# Restarts the sandbox and marks session as running
agentkernel session resume feature-x

Read the full file on GitHub · 98 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 98 lines · 0 tokens per session scan A ff07197d6a5c

Subscribe to this mod's changes

sessions is a command published in the GitHub repository thrashr888/agentkernel (58 stars, last pushed 3d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 665 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.