djig

Agent Session State — Development skill for Claude Code

Development community

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: