espresso — Claude Code hook: what it does, how to install
espresso triggers scripts on session launch and prompt submission to keep agent outputs brief while preserving evidence.
MIT ★ 1,596 updated 2026-10-29
.claude/settings.jsonWhat espresso does
The espresso hook bundle ships with the espresso plugin for Claude Code and Codex. It ties bundled Ponytail scripts to two lifecycle events: SessionStart and UserPromptSubmit. When you submit a prompt, the hook invokes espresso-remind.js and ponytail.js. On session start, it triggers ponytail.js.
Each hook execution runs via node with a hard limit of 5 seconds. If node is absent from the runtime environment, the command fails.
What it helps with
- produce concise agent responses with verifiable evidence
- trigger reminder scripts before each submitted prompt
- execute Ponytail logic during session startup
Example prompts for the agent
- Compare the two config files and list differences with line numbers
- Check the test failure log and identify the root cause
How to install espresso
Manually: put the files in place
.claude/settings.jsonThe hooks block: event (PreToolUse, PostToolUse, Stop…) → command. Personal ones go to ~/.claude/settings.json
Step by step, with commands for each platform: Claude Code hooks: what they are, where to configure them, how to block a risky command
Questions about espresso
How to install espresso in Claude Code?
Add the hook definitions directly into your .claude/settings.json file.
What does the espresso hook do?
It keeps responses brief, preserves factual evidence, and runs bundled Ponytail scripts.
Which events does espresso handle?
It handles SessionStart and UserPromptSubmit events, running node commands with a 5-second timeout.
Source text
espresso · MIT
Hooks bundle shipped with the espresso plugin for Claude Code.
Concise, evidence-preserving output with bundled Ponytail, for Claude Code, Codex, Pi and OMP.
Triggers on: UserPromptSubmit, SessionStart.
```json
{"hooks":{"SessionStart":[{"hooks":[{"type":"command","command":"node \"${PLUGIN_ROOT}/src/hooks/ponytail.js\" SessionStart","timeout":5}]}],"UserPromptSubmit":[{"hooks":[{"type":"command","command":"node \"${PLUGIN_ROOT}/src/hooks/espresso-remind.js\"","timeout":5},{"type":"command","command":"node \"${PLUGIN_ROOT}/src/hooks/ponytail.js\" UserPromptSubmit","timeout":5}]}]}}
```
© Mirko Bozzetto · MIT · hashgraph-online/awesome-codex-plugins