Skip to main content
hook CX Codex

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

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/settings.json
Open on GitHub

What 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.json

The 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

Similar hooks

All hooks for Agent setup: memory, context, orchestration →

From the same set391

The whole set →
off-the-wall The off-the-wall hook quotes your earlier fixes into the prompt before every Codex answer. The model sees what you corrected before and stops repeating the same mistakes. CX Codex ★ 1,596repo stars nightshift nightshift binds Codex work sessions to strict time limits, tracking punch lists, deferred decisions, and run logs. CX Codex ★ 1,596repo stars homie homie checks tool calls, pauses risky actions for approval, and removes secrets from results the model reads. CX Codex ★ 1,596repo stars codex-goal-progress codex-goal-progress is a Claude Code hook that tracks Codex Goals with checklist progress and token usage. It shows goal status in the interface. CX Codex ★ 1,596repo stars development-skills This hook routes development work through three tiers, formats file changes, and sends each change to a staff-reviewer subagent. It supports Claude Code and Codex. CX Codex ★ 1,596repo stars devin Session lifecycle hooks for Claude Code: track start and end, gate stops with a review, and hand tasks off to Devin's cloud. CX Codex ★ 1,596repo stars deepseek-minimal-anchor deepseek-minimal-anchor adjusts DeepSeek default reasoning behavior in Claude Code and Codex. It injects working anchors at session start, guides prompts per turn, and logs trajectory reports. CX Codex ★ 1,596repo stars debt-ops The debt-ops hook records deferred tech-debt items in a repository registry, while a review skill ranks them by file churn. Use it to keep postponed cleanup visible during coding. CX Codex ★ 1,596repo stars

Project sponsors

Companies that keep this analytics open