Skip to content

Agent hooks and support

A hook is a script that an agent runs at a defined event, such as session start or completion of a tool call. OpenWolf uses these events to record work, provide context and report its own activity.

Agent support is different across products and versions. A registered hook is not proof that every tool path or event was delivered.

Integration by agent

AgentConnectionMain limits
Claude CodeProject settings and lifecycle hooksOutput replacement and event delivery depend on Claude's supported hook channels.
Codex CLI.codex/hooks.json and AGENTS.mdRequires hook support, enabled settings and project trust. Tool names and payloads can differ by version.
OpenCodeNative plugin and AGENTS.mdUses session and tool events. It does not implement every Claude hook feature.
Grok BuildEnabled Claude-compatible discoveryUses the existing registration. OpenWolf activity notices are dashboard-only.
Cursor, Gemini CLI, AntigravityProject instruction filesNo full hook integration or equivalent usage coverage is claimed.

See release validation for the native versions that were checked.

What hooks do

Event or scriptWork performed when supported
session-start.jsCheck the installed runtime, load a short project index and return available saved context.
user-prompt-submit.jsReturn changed task evidence and queued reminders with the next prompt.
pre-read.jsOffer file or symbol guidance and identify eligible duplicate reads.
pre-write.jsRetrieve relevant prior fixes and approved project rules.
pre-bash.jsSuggest limits for commands likely to produce large output.
post-read.jsRecord completed reads and distinguish ranged reads.
post-write.jsRecord edits, refresh affected project entries and check memory size budgets.
post-bash.jsApply supported output controls and track simple file reads made through Bash.
post-batch.jsReturn selected approved rules at the configured interval.
precompact.jsSave session state before compaction.
stop.jsReconcile session observations and usage; queue eligible reminders.
session-end.jsPerform a final flush and record session completion.

The OpenCode plugin performs its work through native session and tool events. Grok uses compatible events where available. Do not assume that the table describes every agent equally.

Permissions and memory authority

OpenWolf does not auto-approve agent tool calls. Project and hook trust prompts belong to the agent and remain in place.

Saved conversations, notes and packets are task evidence. Automatic durable instruction injection requires a protected runtime and independent administrator approval. User-owned npm files cannot establish that authority.

Hook health

Standalone hooks record their last success, last error and consecutive failures in .wolf/hooks/_heartbeat.json. The dashboard and status commands help identify missing or broken runtime files.

bash
openwolf status
openwolf operations doctor

A missing heartbeat can mean that a hook was not installed, was not trusted or was not called by that agent. Inspect the agent's own logs before treating it as a confirmed OpenWolf failure.

Notices and update checks

Completed operations can create local activity receipts. Claude can show a status-line segment, Codex can show recovery notices, and OpenCode can show toasts. Message limits reduce repetition. Grok and headless sessions retain dashboard history without terminal notices.

Update checks run in a detached worker. Tool hooks do not wait for npm requests or installation. The worker adds background network and disk work, while memory and indexing stay local. Read session visibility and automatic updates for configuration.

AGPL-3.0 · Made by Cytostack