Agent Session State — Development skill for Claude Code
Durable, runtime-agnostic agent session state for React: approvals that survive reload, resumable streams, subagent trees, token/cost accounting.
How to install Agent Session State
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open djig/agent-session-state and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Agent Session State does
Durable, runtime-agnostic agent session state for React: approvals that survive reload, resumable streams, subagent trees, token/cost accounting.
Alternatives in Development
- Godogen Source Repo — This repository contains two source trees for the same project: - claude/ — Claude Code source tree - codex/ 2.8k ★
- Htb Writeups — The most comprehensive Hack The Box writeup collection - 500+ machines, 400+ challenges, interactive knowledge 244 ★
- Close Review — Month-end close / GL compliance check — invokes accounting-reviewer to produce TM-accounting-{slug}.md with do 83 ★
README
@djignesh21/agent-session-state
**Durable, runtime-agnostic agent session state for React: pending approvals that survive reload, resumable stream cursors, subagent trees, and token/cost accounting — one event log, any transport.**
Headless. No UI components. Works with Vercel AI SDK `useChat` message parts, AG-UI event streams, LangGraph-style interrupts, or a hand-rolled SSE feed. It sits *under* assistant-ui / AI Elements / CopilotKit components, not instead of them.
npm i @djignesh21/agent-session-state
- Core: ~6.3 KB gzipped, zero dependencies, ESM + CJS, strict TypeScript.
- React entry: ~1 KB on top (
useSyncExternalStore, React ≥ 18). - Storage: memory, localStorage, IndexedDB, or HTTP to your backend (reference handler included).
Why
Every agent UI library owns one slice of session state; none of them owns the whole session and hydrates it on cold start. The approval the user was looking at before the tab reloaded is the first casualty:
- CopilotKit: "Interrupt state can't be resumed after page reload" — https://github.com/CopilotKit/CopilotKit/issues/2418 (closed stale, folded into https://github.com/CopilotKit/CopilotKit/issues/3553: "connect path doesn't hydrate… nothing pending comes back on cold start").
- assistant-ui: "pending tool approval is lost on reload" — https://github.com/assistant-ui/assistant-ui/issues/8560 (Sep 29 2026).
- LangGraph's frontend HITL docs ship no approval component; you render
stream.interruptyourself and own its persistence — https://docs.langchain.com/oss/python/langchain/frontend/human-in-the-loop - AI SDK resumable streams require Redis +
resumable-stream+ two endpoints + a stop endpoint you write — https://ai-sdk.dev/docs/ai-sdk-ui/chatbot-resume-streams — and https://github.com/vercel/ai/issues/11865 reports resume failing when the tab is backgrounded. - Ably's write-up on the same gap (https://ably.com/vercel/vercel-why-ai-chat-history-disappears-between-sessions): "when the compon
Related Skills
Backtest2live
Backtest2Live: free, local, engine-agnostic checks for whether a trading strategy will survive live, plus a te
Agentic Eval
Niche-agnostic agentic evaluator using CLEAR v2.0 framework — 6-domain assessment, 8 analysis dimensions, 6-ti
Masterplan
Resumable orchestrator for /masterplan: brainstorm→plan→execute on durable run bundles. Verbs: full, brainstor
Warden Cost
Dollar accounting — what does each active rule actually save, in money? Translates the token-measured verdict
Ccli
Terminal view of every Claude Code session across all your accounts: tokens, list-price cost, subagent trees,
Agentic Coding Harness
Run, watch, and meter Claude Code, Codex CLI, Gemini CLI, OpenCode, and Kiro from one CLI. Normalized events,
Related Agents
Act 4 First Agent
Read-only narrative steward for Act IV (slides 16-18) — the First Agent demo that proves resumable streams via
Ops Sentinel
Interprets the back office's own run ledger, flagging failing or missed jobs, repeated failures, cost spikes a
Controller
Controlling specialist for Kostenrechnung (cost accounting), KPI systems, Deckungsbeitragsrechnung, and manage