Quickstart#
I Choose one installation route#
Universal CLI#
Install persistently from the public Git repository:
uv tool install git+https://gitlab.com/doering-ai/apps/gate.git
gate register
gate doctor
pipx users can install the same source:
pipx install git+https://gitlab.com/doering-ai/apps/gate.git
gate register
gate doctor
The default registration targets Claude Code user settings. Register the separate Codex pre-flight hook for the native spawn_agent fan-out boundary:
gate register --harness codex
gate doctor --harness codex
gate status --harness codex
Restart Codex after changing hooks configuration. Codex receives the pre-flight deny on spawn_agent; Claude alone has the start/stop detection layers.
Claude Code plugin#
Run these commands inside Claude Code:
/plugin marketplace add https://gitlab.com/doering-ai/apps/gate.git
/plugin install my-gate@my-gate
/reload-plugins
/plugin
Use the plugin manager’s Installed and Errors tabs to inspect plugin state.
Do not also run register: duplicate hooks can consume a one-off grant on the first run and deny the launch on the second.
II Verify the CLI route#
gate doctor
gate status
doctor checks Python, configuration syntax, the hook script, Claude Code settings JSON, and the grants store.
It also warns when the registered launch handler lacks onFailure: block, when a registered hook script or interpreter is missing, when the script path runs through a symlink or the interpreter lives in a virtualenv, and when a registered hook fails a harmless payload.
A healthy persistent CLI install ends with 0 failure(s)..
status reports settings-file registrations; Claude marketplace plugins remain visible in Claude Code’s plugin manager instead.
III See the decision path work#
selftest feeds synthetic hook payloads through the real gate logic.
It launches no agents.
$ gate selftest
[ok] unpinned workflow under heavy session denied
[ok] fully light-pinned workflow allowed
[ok] explicit heavy pin denied even under light session
[ok] unpinned workflow under light session allowed
[ok] explicit heavy Agent override denied
[ok] inherited Codex Sol spawn allowed
[ok] garbage payload ignored
[ok] grant honored (heavy Agent allowed)
[ok] grant exhausted (heavy Agent denied)
[ok] expired grant ignored (heavy Agent denied)
[ok] unwritable store fails closed (denied)
0 failure(s).
The examples in package docstrings also run as part of the test suite, so behavior changes cannot silently leave them stale.
IV What happens at launch time#
Situation |
Outcome |
|---|---|
Explicit Claude opus or fable nested-agent pin |
Denied before launch |
Native spawn_agent under GPT-5.6/6/6.1-Sol |
Allowed as ordinary peer delegation |
Unpinned Claude workflow under a resolvable superheavy session |
Denied before fan-out |
Explicit sonnet, haiku, terra, luna, or GPT-5.6/6/6.1-Sol pin |
Allowed, including under Opus/Fable parents |
Allowlisted or one-off-granted launch |
Allowed |
Launch visible only after it starts |
Marked heavy for tint, counted heavy at stop |
To remove settings-file registrations:
gate unregister
register makes the Claude launch handler fail closed ("onFailure": "block"), so a crashing hook blocks every Agent, Task and Workflow launch.
gate unregister from any shell, or deleting the handler for hook.py in ~/.claude/settings.json, ends that; claude --settings <file> with {"disableAllHooks": true} lifts every hook for one session.
Run gate doctor for the cause and gate register to restore the handlers.
Plugin users uninstall from Claude Code:
/plugin uninstall my-gate@my-gate