sessions

sessions is a command for coding agents from MadaraUchiha-314/the-loop. It costs 0 tokens per session (4,089 once invoked), scanned A, original, MIT.

A command set for linking work items, such as GitHub issues, with sessions running in a coding-agent harness.

In plain words
What is it for?
Use it to register sessions, connect pull requests, list active or paused work, attach to a session, control execution, and clean up session records.
Why use it?
It provides one place to find, attach, pause, resume, stop, close, or reset those work sessions.

Command

Part of the the-loop plugin — 2 skills, 37 commands, 2 hooks shipped together

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/madarauchiha-314/the-loop/sessions
Clone the repo
git clone --depth 1 https://github.com/MadaraUchiha-314/the-loop

Or install the-loop, the plugin that ships this one along with the rest of its 2 skills, 37 commands, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sessions

README.md
[![agentmods](https://agentmods.dev/badge/commands/madarauchiha-314/the-loop/sessions.svg)](https://agentmods.dev/commands/madarauchiha-314/the-loop/sessions)
Your own site
<a href="https://agentmods.dev/commands/madarauchiha-314/the-loop/sessions"><img src="https://agentmods.dev/badge/commands/madarauchiha-314/the-loop/sessions.svg" alt="Measured on agentmods" height="20"></a>
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 4,089 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.04089
Opus 5 $0.00000 $0.02044
Sonnet 5 $0.00000 $0.00818
Haiku 4.5 $0.00000 $0.00409

Measured yesterday against content hash 26d7e32aa8b1, 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 yesterday.

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/cli/commands/sessions.md · 321 lines

How it starts

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

sessions

The work-item ↔ harness-session registry, the five execution-control commands, and the reset that forgets a work item entirely.

# registry
the-loop sessions register --work-item github:OWNER/REPO#N --harness claude \
    --harness-session-id "$CLAUDE_SESSION_ID" [--cwd .] [--force]
the-loop sessions link-pr --work-item github:OWNER/REPO#N --pull-request REF|N
the-loop sessions list   [--status active|paused|closed] [--format table|json]
the-loop sessions attach --work-item github:OWNER/REPO#N [--read-only]
the-loop sessions close  --work-item github:OWNER/REPO#N [--keep-tmux|--kill-tmux]
the-loop sessions reset  --work-item github:OWNER/REPO#N [--work-item …] [--dry-run]
the-loop sessions reset  --all [--dry-run]

# execution control — the same five commands as the comment keywords
the-loop sessions start   --work-item github:OWNER/REPO#N [--no-comment]
the-loop sessions pause   --work-item github:OWNER/REPO#N [--no-comment]
the-loop sessions resume  --work-item github:OWNER/REPO#N [--no-comment]
the-loop sessions stop    --work-item github:OWNER/REPO#N [--no-comment]
the-loop sessions cleanup --work-item github:OWNER/REPO#N [--no-comment]

Every subcommand accepts --registry-dir, defaulting to routing.registryDir.

::: warning --registry-dir / --portable-dir and the service Since issue-161 these commands run through the control-plane service, which reads its own configured state directories. The two path flags therefore only take effect on the in-process path the test suite uses; to point real invocations at other state, point the service at it — the-loop --config other.yaml start, or set routing.registryDir / state.root in the config the service runs on. Arbitrary filesystem paths are deliberately not accepted over HTTP. :::

The registry

One human-inspectable JSON file per session under <registryDir> (default <state.root>/local/, git-ignored). Writes are atomic, so concurrent sessions on one machine are safe.

Read the full file on GitHub · 321 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. yesterday Changed · +1 lines 26d7e32aa8b1
  2. 5d ago First seen · 320 lines · 0 tokens per session scan A 355d9a7e4dda

Subscribe to this mod's changes

sessions is a command published in the GitHub repository MadaraUchiha-314/the-loop (4 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 4,089 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-31.