
Product
Introducing Repository Access Permissions and Custom Roles
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.
@claudemini/ses-cli
Advanced tools
A CLI memory system for human-AI coding sessions.
ses-cli records agent activity as structured session artifacts, keeps checkpoint history, and adds query/review tooling on top of those artifacts. Think of it as a black box flight recorder for AI-assisted development.
┌─────────────────────────────────────────────────────────────────────┐
│ AI Coding Agents │
│ Claude Code Gemini CLI Cursor OpenCode Codex │
│ │ │ │ │ │ │
│ hooks.json settings.json hooks.json plugin.ts notify │
└───────┬──────────────┬───────────┬──────────┬──────────┬────────────┘
│ │ │ │ │
└──────────────┴───────────┴──────────┴──────────┘
│
┌────────▼────────┐
│ ses log <evt> │ Unified entry point
└────────┬────────┘
│
┌──────────────▼──────────────┐
│ dispatchHookEvent() │
│ │
│ 1. Validate & parse │
│ 2. Enrich (_ts, _hook) │
│ 3. Append events.jsonl │
│ 4. Update V2 state │
│ - prompts, turns │
│ - tool_counts, file_ops │
│ - token_usage, errors │
│ 5. Phase machine → actions │
│ 6. Save state │
│ 7. Write state.json (compat)│
│ 8. Enqueue outbox │
└──┬──────────────────────┬────┘
│ │
┌────────▼──┐ ┌───────▼────────┐
│ Checkpoint │ │ Outbox/Webhook │
│ │ │ │
│ SaveStep │ │ batch upload │
│ Condense │ │ session.ended │
└─────┬──────┘ └────────────────┘
│
┌────────▼──────────────┐
│ Git Branches │
│ │
│ ses/<commit> │ Shadow: full working tree
│ ses/blackbox/v1 │ Blackbox: metadata + transcript
└────────────────────────┘
Hook event (JSON)
│
├─► events.jsonl Append-only event log with timestamps
│ Every event: { ..., _ts, _hook, _turn }
│
├─► V2 SessionState Single source of truth
│ (.git/ses-sessions/) Prompts, turns, tools, tokens, files, phase
│
├─► state.json Backward-compatible projection
│ (.ses-logs/<id>/) Read by: ses view, ses list, review, overview
│
├─► outbox.jsonl Queued for service delivery
│ (.ses-logs/.reporting/) Batched upload (50 events/batch)
│
├─► Shadow branch Full working tree snapshot per turn
│ (ses/<commit-hash>) Restorable: git checkout ses/<hash>
│
└─► Blackbox branch Persistent metadata on orphan branch
(ses/blackbox/v1) Sharded: <id[:2]>/<id[2:]>/0/
Files: metadata.json, full.jsonl,
context.md, prompt.txt
UserPromptSubmit ──► TurnStart ──► prompt recorded
│
PreToolUse ◄──────┤ (Read, Edit, Bash, ...)
PostToolUse ◄──────┤ tool_counts++, file_ops updated
PreToolUse ◄──────┤
PostToolUse ◄──────┘
│
Stop / AfterAgent ──► TurnEnd ───► turn paired (prompt + response)
│
SaveStep ───► shadow branch checkpoint (dedup by tree hash)
┌─────────────┬──────────────────────┬──────────────────────────────────┐
│ Agent │ Hook mechanism │ Data captured │
├─────────────┼──────────────────────┼──────────────────────────────────┤
│ Claude Code │ .claude/settings.json│ Prompt, response, tools, tokens │
│ │ (hook commands) │ last_assistant_message via Stop │
├─────────────┼──────────────────────┼──────────────────────────────────┤
│ Gemini CLI │ .gemini/settings.json│ Prompt, response, tools, tokens │
│ │ (matcher hooks) │ prompt_response via AfterAgent │
├─────────────┼──────────────────────┼──────────────────────────────────┤
│ Cursor │ .cursor/hooks.json │ Prompt, response, tools │
│ │ (hook commands) │ text via afterAgentResponse │
├─────────────┼──────────────────────┼──────────────────────────────────┤
│ OpenCode │ .opencode/plugins/ │ Prompt, response, tools, tokens │
│ │ ses.ts (Plugin API) │ message.part.updated (sync) │
├─────────────┼──────────────────────┼──────────────────────────────────┤
│ Codex │ ~/.codex/config.toml │ Prompt, response (per turn) │
│ │ notify = ["ses", ..] │ Zero daemon, native notify hook │
└─────────────┴──────────────────────┴──────────────────────────────────┘
SaveStep triggers on every TurnEnd/SubagentEnd/Compactiongit checkout)ses/blackbox/v1 to remote--no-checkpoint to skip)context.md includes full conversation (prompt + AI response per turn)files_touched derived from actual tool operationsnotify hook, zero daemon_ts (timestamp), _hook (lifecycle type), _turn (boundary marker)npm install -g @claudemini/ses-cli
Or run without installing:
npx @claudemini/ses-cli <command>
Node requirement: >= 18
cd /path/to/your/project
ses enable # Enable for Claude Code (default)
ses enable --all # Enable for all supported agents
ses enable codex # Enable for Codex (configures ~/.codex/config.toml)
Then use your AI agent normally. Session data is captured automatically.
ses status # Current session
ses list # All sessions
ses view <id> # Session details (accepts session ID or shadow branch)
ses enable --all
ses enable codex
Adds notify = ["ses", "codex-notify"] to ~/.codex/config.toml. Zero daemon.
ses disable # Remove project hooks (keeps Codex global config)
ses disable --global # Also remove Codex global config
ses disable --clean # Remove all data
ses status
ses list
ses view <session-id>
ses view <shadow-branch> # e.g. ses view ses/4b3a871
ses view <session-id> --json
ses query --recent=5
ses query --file=src/auth.ts
ses explain <session-id>
ses review
ses review --json
ses review --md
ses review --recent=3
ses review --engine=multi-agent --providers=codex,dim,opencode
ses review --strict --fail-on=medium
ses checkpoints
ses commit
ses shadow # List shadow branches
ses rewind <checkpoint>
ses resume <checkpoint>
ses reset --force
ses doctor
ses doctor --fix
ses clean --days=7 --dry-run
ses clean --days=7
ses summarize <session-id>
ses webhook --test
ses pricing status
ses pricing sync
.ses-logs/
.gitignore # Ignores all contents
index.json
<session-id>/
events.jsonl # Raw events with _ts, _hook, _turn
state.json # Session state (tools, files, turns, tokens)
review.json / review.md
.git/ses-sessions/ # V2 state (source of truth)
<session-id>.json
ses/<commit> # Shadow branch: full working tree snapshot
ses/blackbox/v1 # Blackbox branch: checkpoint metadata
<shard>/0/
metadata.json # Session & checkpoint info
full.jsonl # Agent transcript (complete)
context.md # Conversation (prompt + response per turn)
prompt.txt # User prompts
content_hash.txt # Dedup hash
Configuration lives in .ses-logs/config.json. Environment variables override config file values.
Pricing:
{
"pricing": {
"models": {
"claude-sonnet-4": {
"match": "prefix",
"input_per_million": 3.0,
"output_per_million": 15.0,
"cache_read_input_per_million": 0.3,
"cache_creation_input_per_million": 3.75
}
}
}
}
Webhooks:
{
"webhooks": {
"url": "https://example.com/hook",
"events": ["session.ended", "review.completed"],
"secret": "",
"auth_token": ""
}
}
npm run lint
npm run typecheck
npm test
npm pack --dry-run
npm publish --access public
See package.json.
FAQs
Session-based Hook Intelligence Tracker for human-AI coding sessions
The npm package @claudemini/ses-cli receives a total of 26 weekly downloads. As such, @claudemini/ses-cli popularity was classified as not popular.
We found that @claudemini/ses-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.