state-checkpoint

A checkpoint system that saves compact progress files outside the chat. The files record the goal, status, constraints, relevant files, errors, next action, tests, and risks.

In plain words
What is it for?
Use it to save state after decisions and work phases, recover the next step later, and keep separate progress records for different coding tools or sessions.
Why use it?
It preserves working context when a session times out, changes tools or models, or runs several tasks in parallel.

Agent

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 agents/aksoftcode/aicrew/state-checkpoint
Clone the repo
git clone --depth 1 https://github.com/AKSoftCode/aicrew
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 293 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.00293
Opus 5 $0.00000 $0.00147
Sonnet 5 $0.00000 $0.00059
Haiku 4.5 $0.00000 $0.00029

Measured yesterday against content hash 363ece9bb1ac, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

state-checkpoint 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.

skills/agents/state-checkpoint.md · 37 lines

What it actually says

state-checkpoint (usage-limit resilience)

Goal: survive usage timeouts and multi-tool parallel work by keeping durable, compact state files outside the chat.

Where to write state

  • Directory: .ai/state/ (create if missing)
  • File pattern: .ai/state/AI_STATE.<tool>.<session>.md

<tool> examples: cursor, claude, codex, gemini, antigravity

<session>: short human label (slug). If not set, use unknown-<YYYY-MM-DD>-<HHMM>.

When to update

  • After every explicit checkpoint ("wait for answer/confirmation")
  • At the end of every phase (research/design/implement/tests/etc.)
  • Before switching tools/models
  • After any major decision that changes the plan

If filesystem write tools are unavailable, output the full file contents so the user can paste it.

Format (keep compact)

  • Goal:
  • Current status:
  • Key constraints (must not break):
  • Relevant files (paths only):
  • Latest errors/logs (verbatim, short):
  • Next step (single exact action):
  • Tests: ran / not run
  • Assumptions/risks:

Multi-tool rule

Never share a single global AI_STATE.md when running multiple AI tools at once. Always include <tool> and <session> in the filename to avoid overwrites.

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 First seen · 37 lines · 0 tokens per session scan A 363ece9bb1ac

Subscribe to this mod's changes

state-checkpoint is an agent published in the GitHub repository AKSoftCode/aicrew (3 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 293 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.