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.
npx skills add ZaxbyHub/opencode-swarm --skill durable-session-stategit clone --depth 1 https://github.com/ZaxbyHub/opencode-swarmWrote 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.
[](https://agentmods.dev/skills/zaxbyhub/opencode-swarm/durable-session-state)<a href="https://agentmods.dev/skills/zaxbyhub/opencode-swarm/durable-session-state"><img src="https://agentmods.dev/badge/skills/zaxbyhub/opencode-swarm/durable-session-state/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.
<a href="https://agentmods.dev/skills/zaxbyhub/opencode-swarm/durable-session-state"><img src="https://agentmods.dev/badge/skills/zaxbyhub/opencode-swarm/durable-session-state.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium Rogue Agent · line 18 Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00070 | $0.00844 |
| Opus 5.5 | $0.00028 | $0.00338 |
| Sonnet 5.5 | $0.00014 | $0.00169 |
| Haiku 4.5 | $0.00007 | $0.00084 |
Grade A, and why
durable-session-state 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Durable Session State
Long swarm-mode sessions outlive their context window. Compaction summarizes history, and summaries lose exactly the things the swarm gates depend on: which diff a reviewer approved, what evidence was recorded, which decisions are settled. Without durable artifacts, a resumed session re-litigates settled decisions or — worse — treats a stale approval as current. Persist state to files as you go; treat the conversation as cache, not storage.
Where artifacts live
- Generic swarm tasks:
.claude/session/tasks/<task-slug>/in the project. - Issue-tracer work:
.agents/issue-traces/<issue-slug>/(that skill's own schema —08b-implementation-review.md,09-final-critic.md— wins for its work). - Never write task artifacts to the repo root, and never under
.swarm/— that directory is the OpenCode plugin's runtime state, not Claude Code's. - These artifacts are working state, not deliverables: do not commit them
unless the user asks. Before committing, check
git statusand exclude them explicitly.
What to persist
Keep it to four small files per task; update in place:
-
plan.md— task scope, success criteria, files in scope, what must not break. Update when scope changes; never fork a second plan file. -
decisions.md— one line per settled decision with a one-line rationale ("chose X over Y because Z"). Settled means: do not reopen without new evidence or a user request. -
evidence.md— validation commands run and their outcomes (pass/fail plus the load-bearing output lines, not full logs). -
gates.md— the approval ledger. One entry per reviewer/critic verdict:## <gate> — <APPROVE|NEEDS_REVISION|BLOCKED> when: <ISO timestamp or turn marker> head: <git rev-parse HEAD> diff: <git diff --stat summary> items: <blocking items, or none>
When to write
- At phase boundaries (scope settled, plan built, implementation done, each gate verdict received).
- Before ending a turn while background subagents are running.
- Whenever you notice the conversation is long — write ahead of compaction, not after it.
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.
- 1mo ago Changed · +1 lines 7a30dbd4f5c4
- 3mo ago Changed 3d7dcfdb513c
- 3mo ago First seen · 83 lines · 70 tokens per session scan A 63515caeabe2
durable-session-state is a skill published in the GitHub repository ZaxbyHub/opencode-swarm (555 stars, last pushed today), licensed MIT. It adds 70 tokens to every session and 844 once invoked, about $0.0003 per session on Opus 5.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-30.
durable-session-state compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| durable-session-stateZaxbyHub/opencode-swarm | Skill | 555 | today | MIT | A | 70 | Claude Code |
| context-engineeringmvschwarz/openrig | Skill | 9.0k | today | Apache-2.0 | A | 142 | Claude Code, Codex |
| claude-compaction-restoremvschwarz/openrig | Skill | 9.0k | today | Apache-2.0 | A | 60 | Claude Code |
| retiring-and-inheriting-a-seatmvschwarz/openrig | Skill | 9.0k | today | Apache-2.0 | A | 145 | Claude Code |
| session-compaction-and-restoremvschwarz/openrig | Skill | 9.0k | today | Apache-2.0 | B | 88 | Claude Code |
| continuous-learningericrisco/rsc-harness | Skill | 707 | 2d ago | MIT | A | 73 | Claude Code, Codex |
| initrekal-dev/rekal-cli | Skill | 205 | 19d ago | Apache-2.0 | A | 81 | Claude Code |