Skip to main content
hook CX Codex

tailtest — Claude Code hook: what it does, how to install

tailtest detects files modified during an agent turn and triggers automated test writing and execution. Works across 8 languages with zero config.

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 tailtest does

tailtest monitors code modifications made during an agent turn. Once files change, it directs Codex to write and execute relevant test suites automatically. It supports 8 programming languages out of the box. Zero setup is required.

The bundle attaches to three lifecycle triggers: SessionStart, PostToolUse, and Stop. Starting a session runs session_start.py. Every tool invocation triggers post_tool_use.py, while session termination calls stop.py.

Each trigger relies on python3 pointing to $HOME/.codex/plugins/tailtest/hooks/. Without python3 installed, the hooks will fail immediately. If you place plugin files outside that specific home directory, you must adjust the paths inside the hook definitions.

What it helps with

  • track files modified during an agent turn
  • generate tests automatically for touched source files
  • run test suites without executing manual terminal commands

Example prompts for the agent

  • Implement email validation logic in the registration module
  • Refactor the discount calculation helper in the checkout service

How to install tailtest

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 tailtest

How to install tailtest in Claude Code?

Add the hook definitions to .claude/settings.json. Configure the command entries under the hooks section for SessionStart, PostToolUse, and Stop.

What does tailtest do?

It detects which files changed during an agent turn, then directs Codex to create and run tests for them. It handles 8 programming languages without extra setup.

What dependencies does tailtest require?

Your environment must have python3 installed. The scripts must also reside at $HOME/.codex/plugins/tailtest/hooks/.

Source text

hooks.json · MIT
Hooks bundle shipped with the tailtest plugin for Claude Code.

Hook-powered test generation -- detects files changed during an agent turn and instructs Codex to write and run tests automatically. Zero config, 8 languages.

Triggers on: PostToolUse, SessionStart, Stop.

```json
{
  "hooks": {
    "SessionStart": [
      {
        "matcher": "startup",
        "hooks": [
          {
            "type": "command",
            "command": "python3 $HOME/.codex/plugins/tailtest/hooks/session_start.py"
          }
        ]
      }
    ],
    "PostToolUse": [
      {
        "matcher": ".*",
        "hooks": [
          {
            "type": "command",
            "command": "python3 $HOME/.codex/plugins/tailtest/hooks/post_tool_use.py"
          }
        ]
      }
    ],
    "Stop": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "python3 $HOME/.codex/plugins/tailtest/hooks/stop.py"
          }
        ]
      }
    ]
  }
}

```

© AvanSaber Inc. · MIT · hashgraph-online/awesome-codex-plugins

Similar hooks

Everything for Testing and QA →

From the same set391

The whole set →
carsxe carsxe is a Claude Code hook that loads the CarsXE API key at session start. The API provides vehicle data such as VIN details, market value, history, and OBD codes. CX Codex ★ 1,596repo stars wtfm wtfm generates illustrated end-user help articles from codebase files and renders screenshots locally from the actual interface code. CX Codex ★ 1,596repo stars vibestretch vibestretch is a Claude Code hook that prints a stretch or eye-rest prompt and plays a soft chime after the agent has kept you waiting. It runs on prompt submission, tool use, and agent stop. CX Codex ★ 1,596repo stars tree-ring-memory tree-ring-memory is a Claude Code hook that loads saved context when a session starts and checks memory when it ends. It also runs at subagent start and stop. CX Codex ★ 1,596repo stars stop-that-shit The stop-that-shit hook for Claude Code and Codex checks agent actions against explicit task modes and bounds decisions about dependencies, hashes, and subagents. CX Codex ★ 1,596repo stars board A SessionStart hook that tells the agent what is on the project board. The board lives in plain Markdown files, so you can read it straight from the terminal. CX Codex ★ 1,596repo stars steinwall The steinwall hook for Claude Code and Codex provides cost controls, action guards, and loop recovery for unattended agent sessions with shell execution. CX Codex ★ 1,596repo stars session-orchestrator session-orchestrator — a hook for Claude Code and Codex that wraps each agent session in structured planning, staged execution, and quality gates. Fires on SessionStart, PreToolUse, PostToolUse, Stop, and SubagentStop. CX Codex ★ 1,596repo stars

Project sponsors

Companies that keep this analytics open