why

A command that reads the decision log for a guarded agent session. The log records whether actions were allowed, denied, or affected by a hook crash.

In plain words
What is it for?
Use it to review denials, crashes, recent decisions, or decisions for a particular tool or rule.
Why use it?
It helps explain why an action was blocked and reveals when a crashed safety check may have allowed an action through.

Command

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 commands/bogzx/seeks/why
Clone the repo
git clone --depth 1 https://github.com/Bogzx/seeks
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 813 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.00015 $0.00813
Opus 5 $0.00008 $0.00407
Sonnet 5 $0.00003 $0.00163
Haiku 4.5 $0.00002 $0.00081

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

Security

Grade A, and why

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

commands/why.md · 29 lines

What it actually says

Run shell via the Bash tool. This is read-only — it never edits loop state.

Every PreToolUse verdict, every Stop-gate verdict and every hook crash is appended to .seeks/run/<name>/decisions.jsonl. That file is hook-owned (the edit tools and Bash are both denied at that path) — this command is the sanctioned way to read it.

  1. Pick the loop (<name>). $0 if it looks like a loop name, else node "${CLAUDE_PLUGIN_ROOT}/bin/seeks.mjs" latest. If none, say there are no loops and STOP.

  2. Replay. node "${CLAUDE_PLUGIN_ROOT}/bin/seeks.mjs" why <name> — pass through any of the user's flags:

    • --denied — only the denials (the usual question: "why did that get blocked?")
    • --crashes — only hook crashes. Check this first when the guardrails seem not to be firing: the hooks are fail-open by design, so a crashed hook allows everything silently. A non-empty list here means enforcement was off for those calls.
    • --last N (default 20), --tool Bash|Edit|Write, --rule <id>, --hook pre-tool|stop-gate, --json
  3. Explain the verdict in plain language, keyed on the rule id — don't just paste the log:

    rule what it means what to do instead
    git-push push/merge/rebase is denied at every level delivery is seeks deliver at L3; otherwise the human merges
    l1-commit / l1-edit the loop is L1 = report-only write findings under .seeks/run/<name>/; ask the user to re-run at L2 to change code
    hook-owned the command touched status.json / hook-state.json / decisions.jsonl use seeks status-get / status-set / why
    denylist the path matched the secret/.git denylist that file is out of bounds; if it's a false positive the user can rename it or widen denylist in the loop's status
    outside-worktree the edit left the loop's worktree work inside the worktree only
    strict-bash SEEKS_STRICT_BASH is on and the command's head wasn't allowlisted use an allowlisted tool, or the user adds it via strict_bash_allow
    wrap-up the time budget is spent only the seeks CLI, git add/commit and run-dir writes remain — write summary.md and end the turn
    stop:* the Stop gate released the loop (done, max_iters, time-budget, stuck, needs_human) that is why the loop ended
    hook-crash a hook threw and failed open — enforcement was NOT applied for that call surface the error verbatim and suggest /seeks:doctor, then /seeks:export for a bug report
  4. If the user asked about one specific action, quote the matching line(s) and answer the actual question. If nothing matches, say so plainly rather than guessing — an empty log means the hooks never ran for that loop (check /seeks:doctor).

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 · 29 lines · 15 tokens per session scan A e41a7bd9b286

Subscribe to this mod's changes

why is a command published in the GitHub repository Bogzx/seeks (4 stars, last pushed 15d ago), licensed MIT. It adds 15 tokens to every session and 813 once invoked, about $0.0001 per session on Opus 5. 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.