sessions

sessions is a skill for Claude Code from jonny981/claude-tandem. It costs 29 tokens per session (451 once invoked), scanned A, original, MIT.

A tool for viewing and managing active Tandem coding sessions. A session is one running work process connected to a project.

In plain words
What is it for?
Use it to inspect session details, group sessions by project, find dead sessions, and clean up orphaned session records.
Why use it?
It shows which sessions are running, where they work, and whether any have been abandoned after their process stopped.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the tandem plugin — 8 skills, 8 hooks shipped together

Good fit Use it to inspect session details, group sessions by project, find dead sessions, and clean up orphaned session records.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jonny981/claude-tandem/sessions
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.

Any agent
npx skills add jonny981/claude-tandem --skill sessions
Clone the repo
git clone --depth 1 https://github.com/jonny981/claude-tandem

Made for: Claude Code.

Or install tandem, the plugin that ships this one along with the rest of its 8 skills, 8 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/skills/jonny981/claude-tandem/sessions/github.svg)](https://agentmods.dev/skills/jonny981/claude-tandem/sessions)
Your own site
<a href="https://agentmods.dev/skills/jonny981/claude-tandem/sessions"><img src="https://agentmods.dev/badge/skills/jonny981/claude-tandem/sessions/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sessions

Your own site · 80×15
<a href="https://agentmods.dev/skills/jonny981/claude-tandem/sessions"><img src="https://agentmods.dev/badge/skills/jonny981/claude-tandem/sessions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 451 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00029 $0.00451
Opus 5 $0.00015 $0.00226
Sonnet 5 $0.00006 $0.00090
Haiku 4.5 $0.00003 $0.00045

Measured 9d ago against content hash 3648c6d6e833, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 9d 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.

plugins/tandem/skills/sessions/SKILL.md · 49 lines

What it actually says

Tandem Sessions

Inspect the session registry at ~/.tandem/sessions/.

Steps

  1. List all session directories under ~/.tandem/sessions/. For each, read state.json and display:

    • Session ID
    • Project (basename of project path)
    • Branch
    • Status (active/ended)
    • Current task
    • Last heartbeat (and how long ago)
    • PID (and whether it's still alive: kill -0 $pid)
  2. Group by project to show topology: which sessions share a project.

  3. Identify orphans: sessions where the PID is dead or heartbeat is older than 5 minutes with a dead process. Offer to clean them up (delete the session directory) if found.

Output format

Active Sessions:
  jonnyn-cv (2 sessions)
    abc123  main  "building session topology"  heartbeat: 30s ago  pid: 12345 ✓
    def456  main  "fixing CSS layout"          heartbeat: 2m ago   pid: 12346 ✓

  claude-tandem (1 session)
    ghi789  main  "adding frontmatter schema"  heartbeat: 1m ago   pid: 12347 ✓

Orphaned Sessions:
  jkl012  jonnyn-cv  pid: 99999 ✗ (dead)  last heartbeat: 15m ago
  → Clean up? (delete ~/.tandem/sessions/jkl012/)

Arguments

  • No arguments: show all sessions
  • clean: force-clean all orphaned sessions without prompting
  • <session-id>: show detailed state.json for a specific session

Implementation

Use bash to read ~/.tandem/sessions/*/state.json files. Check PIDs with kill -0. Calculate heartbeat age from the ISO timestamp. No external dependencies beyond jq.

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. 9d ago First seen · 49 lines · 29 tokens per session scan A 3648c6d6e833

Subscribe to this mod's changes

sessions is a skill published in the GitHub repository jonny981/claude-tandem (6 stars, last pushed 4mo ago), licensed MIT. It adds 29 tokens to every session and 451 once invoked, about $0.0001 per session on Opus 5. 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.