sequential-hooks
sequential-hooks runs coding-agent hooks in a strict order. Without a wrapper, a host may start several hooks concurrently or in an undocumented order. A validator can then inspect an old tool input while another hook is still replacing it. Register one wrapper hook and place the former hook commands inside it as ordered steps.
Installation
sequential-hooks requires native CPython 3.13 or newer. Install the current checkout from the repository root with uv:
uv tool install .
To update an existing installation after pulling changes:
uv tool install --reinstall .
make install and make reinstall run the same commands.
Quick start
sequential-hooks has no configuration file. Choose the coding agent that will run the wrapper, then add the registration from its setup guide:
Check compatibility for supported hosts and known host limits, and
platforms for process handling. The guides use first-hook, second-hook,
and audit-hook as sample child commands. Replace them with hooks you have installed and want to
run in order. Move those child hooks into the wrapper and remove their separate registrations, or
the host may still start duplicate copies concurrently.
The wrapper command expects a native host payload on stdin. Configure it as a host hook rather than running the hook command interactively. After saving the registration, inspect it with the matching read-only report:
sequential-hooks doctor --agent claude
sequential-hooks doctor --agent codex
sequential-hooks doctor --agent agy
Exit 0 means the findings are informational. Exit 1 means at least one warning or error is present. Some warnings describe inspection limits and persist after host-side review. The troubleshooting guide explains common findings.
Antigravity requires an explicit event in each hook command. An all-neutral Antigravity pre-tool
chain emits the host's real automatic allow decision; it does not preserve the ordinary
permission prompt. Review the Antigravity setup guide before enabling it.
How commands compose
-a, --agent selects the installed host adapter for a coding agent. The built-in names are
claude, codex, and agy; a third-party adapter installed with
uv tool install . --with PACKAGE is selected by its own name. Nothing is inferred from the
payload. See adding a host.
-h, --help prints help for wrapper mode; doctor -h and doctor --help print doctor help.
sequential-hooks --agent codex --step-timeout 30 first-hook --agent codex -- second-hook --agent codex
The exact -- token separates steps and cannot be passed to a step. Each child receives its own
literal arguments, including its own --agent; wrapper options are not inherited by child
commands.
Documentation
| If you want to... | Read |
|---|---|
| Understand ordering, replacements, and decisions | Concepts |
| Review trust boundaries and pre-permission execution | Security |
Interpret doctor findings or runtime failures |
Troubleshooting |
| Look up hook grammar, limits, and exit codes | CLI reference |
| Check accepted input, output, and decisions for each event | Host protocol reference |
| Check supported hosts and platforms | Compatibility |
| Add support for another coding agent | Adding a host |
| Browse every guide | Documentation map |
Development
See the development guide for the required tools, CI, and dependency locks. With those tools installed, run:
make setup
make check
License
sequential-hooks is available under the MIT License.
Metadata
Release files for sequential-hooks 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sequential_hooks-0.1.1.tar.gz | 145.4 kB | With provenance | Details for sequential_hooks-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sequential_hooks-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for sequential_hooks-0.1.1-py3-none-any.whl |
Total release size: 260.1 kB
Release files / sequential_hooks-0.1.1.tar.gz
| Download URL | sequential_hooks-0.1.1.tar.gz |
|---|---|
| Size | 145.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d22586c7eeccff62c1aa802bda4ce86c7c302464ddaa316b81b5ba3e7280f0e5
|
|
BLAKE2b-256 checksum How to use checksums |
61caae6a3fb190fae20038a4122affaf015fca2e7f87f160a4830b4baf04e776
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.
Transparency logRelease files / sequential_hooks-0.1.1-py3-none-any.whl
| Download URL | sequential_hooks-0.1.1-py3-none-any.whl |
|---|---|
| Size | 114.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4b06c2a33c9415cde96e4ff7841bd7fc23a897956782bdaac12c265640667090
|
|
BLAKE2b-256 checksum How to use checksums |
897d34f6f57d5897548d40ca55e54889b2ee83936514ac6cd3e368d2fbc53357
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.
Transparency logSecurity for sequential-hooks 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for sequential_hooks-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.