SessionStart

SessionStart is a hook for coding agents from HawkannG/Claude-Warden. Its token cost is not measured, scanned B, original, MIT.

Checks that run when a Claude Code session starts, including cleanup and detection of outdated Warden safety files.

In plain words
What is it for?
Preparing a project session and identifying old Warden hooks or files that should be migrated.
Why use it?
They remove leftover tracking data and warn when an older installation may still interfere with the current setup.

Hook

Part of the claude-warden plugin — 7 skills, 4 hooks shipped together

One of 4 entries in hooks.json — they are configured in one file and arrive together.

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 hooks/hawkanng/claude-warden/session-start
Clone the repo
git clone --depth 1 https://github.com/HawkannG/Claude-Warden

Or install claude-warden, the plugin that ships this one along with the rest of its 7 skills, 4 hooks.

Wrote 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.

agentmods badge for SessionStart

README.md
[![agentmods](https://agentmods.dev/badge/hooks/hawkanng/claude-warden/session-start.svg)](https://agentmods.dev/hooks/hawkanng/claude-warden/session-start)
Your own site
<a href="https://agentmods.dev/hooks/hawkanng/claude-warden/session-start"><img src="https://agentmods.dev/badge/hooks/hawkanng/claude-warden/session-start.svg" alt="Measured on agentmods" height="20"></a>
Per session not measured What this adds to a session before it is invoked.
When invoked not measured Not applicable: nothing here is loaded into a session.
Security scan B 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Security

Grade B, and why

SessionStart scanned grade B with 2 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 4d ago.

A static scan of the commands this hook runs, not an audit. A hook is shell that executes on your machine at the event it names, which is why every command in it is printed with what was found.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

"command": "P=\"${CLAUDE_PROJECT_DIR:-.}\"; F=0; ls \"$P\"/.claude/hooks/warden-*.sh >/dev/null 2>&1 && F=1; grep -q '\\.claude/hooks/warden-' \"$P/.claude/settings.json\" 2>/dev/null && F=1; [ \"$F\" = 1 ] && echo '⚠️ O

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

"command": "P=\"${CLAUDE_PROJECT_DIR:-.}\"; F=0; ls \"$P\"/.claude/hooks/warden-*.sh >/dev/null 2>&1 && F=1; grep -q '\\.claude/hooks/warden-' \"$P/.claude/settings.json\" 2>/dev/null && F=1; [ \"$F\" = 1 ] && echo '⚠️ O
hooks/hooks.json · 19 lines

What it actually says

{
  "SessionStart": [
    {
      "matcher": "",
      "hooks": [
        {
          "type": "command",
          "command": "rm -f \"${CLAUDE_PROJECT_DIR:-.}/.claude/warden-edit-tracker\"",
          "timeout": 5
        },
        {
          "type": "command",
          "command": "P=\"${CLAUDE_PROJECT_DIR:-.}\"; F=0; ls \"$P\"/.claude/hooks/warden-*.sh >/dev/null 2>&1 && F=1; grep -q '\\.claude/hooks/warden-' \"$P/.claude/settings.json\" 2>/dev/null && F=1; [ \"$F\" = 1 ] && echo '⚠️  OLD WARDEN INSTALL DETECTED: Ghost hooks or files from a previous curl-based install found. Run /warden-setup to migrate (use --dry-run to preview).' >&2; exit 0",
          "timeout": 5
        }
      ]
    }
  ]
}
Same file

What else hooks.json configures

This page is one entry in a file that holds 4. Installing the file brings all of them; each is measured and scanned on its own page.

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. 4d ago First seen · 19 lines scan B a4017bc8282a

Subscribe to this mod's changes

SessionStart is a hook published in the GitHub repository HawkannG/Claude-Warden (2 stars, last pushed 5mo ago), licensed MIT. Its token cost is not measured: a hook is shell that never enters the context. A static security scan graded it B with 2 findings (reads agent configuration directories, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.