Skip to content
Agent Workspaces
Hook

Hooks

What agent-strace runs automatically, and when. A hook is a command Claude Code fires at a fixed moment, without you asking for it.

From plugin
agent-strace
1081 skill1 agent7 hooks

Claude Code

> /plugin marketplace add Siddhant-K-code/agent-trace
> /plugin install agent-strace@agent-trace

What fires, and when

UserPromptSubmit

Fires before Claude sees each prompt you send. A plugin can use it to inject context, so the same instruction reaches the model every turn instead of only at session start.

  • agent-strace hook user-prompt

PreToolUse

  • agent-strace hook pre-tool

PostToolUse

  • agent-strace hook post-tool

PostToolUseFailure

  • agent-strace hook post-tool-failure

Stop

  • agent-strace hook stop

SessionStart

Fires once when a session begins, and again after a context compaction. It is where a plugin sets up its environment, or restores state the compaction dropped.

  • agent-strace hook session-start

SessionEnd

  • agent-strace hook session-end
Read hooks/hooks.json
@siddhant-k-code
Ships withagent-strace

Local evidence and replay for coding agents. agent-strace records what a coding agent did in a session (prompts, tool calls, file operations, commands, failures) as local files, then does three jobs: Replay what happened. replay shows the session in order.

1081 skill1 agent
Get the whole plugin

Stars on GitHub

Momentum

stars in total
108
Star history of Siddhant-K-code/agent-trace on GitHub, a chart by star-history.com

More plugins that ship hooks.

clawd-on-desk

clawd-on-desk

A pixel desktop pet that watches Claude Code, Codex, Cursor & other AI coding agents, so you don't have to.

109 hooks6.8k
@rullerzhou-afk@rullerzhou-afk
Install Plugin
effortless

effortless

Mods for Claude Code. effortless picks the reasoning effort for every prompt and shows the cache countdown. textless (desktop app) shows art, quotes and chess instead of the wall of text while Claude works.

1 hook+1361
@heycubit@heycubit
Install Plugin

Questions about the hooks in agent-strace.

Which coding agents can use the hooks in agent-strace?
The hooks in agent-strace install in Claude Code and Cursor: each runs Claude Code hooks from .claude/settings.json, so copy the hooks there.