All work

myGate

Stops runaway nested-agent launches and reviews my GitLab merge requests.

Source on GitLab Python · MIT · v0.5.0
Isometric floor from an agent to a merge. Cyan solids belong to myGate, slate ones do not. Where an agent launches a subagent, myGate stands on the path at three hook events. PreToolUse is a tall wall because it can deny the launch; SubagentStart and SubagentStop are low curbs because they only notify. Separately, before a merge, a review tray reads the branch and asks a model for its findings through the model gateway on port 4000, drawn as a cyan slab behind the tray. The floor joins the two checkpoints for the picture; no code runs them in sequence. agent PreToolUse SubagentStart subagent SubagentStop review merge gateway:4000 wall denies, curbs notify

myGate keeps agent fleets from running up the bill. When an orchestrating agent tries to launch a swarm of sub-agents on the most expensive models, it denies the launch before it starts, unless every one of them is pinned to a lighter model.

It has since grown into my merge-request reviewer as well: it reviews the exact base and head commits of a GitLab MR in a disposable checkout and posts findings as native discussions, with a receipt that can be verified later.

It's agent-driven, but it took me so dang long to get all those guards and critics working that I just have to include it! From mid-August to 2 October 2026 it reviewed at least 1,561 merge requests across my repositories and published 1,818 distinct findings, five of which it ranked critical. One of those was in its own code: a path where a review blocked by the secret scan could be merged away into a clean verdict.

$ gate selftest 2>/dev/null
[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 denied
[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).
A session pinned to a heavy model (opus) tries to launch three agent() calls. When one call carries no model it inherits the heavy session, and myGate denies the whole launch before any of the three starts. When every call explicitly pins a light model (sonnet, haiku, terra), all three run. session opus opus agent() → sonnet agent() → haiku agent() no model → opus DENIED none run agent() → sonnet agent() → haiku agent() → terra RUNS all run
Gate binds a merge request's exact base and head commits, then reviews a disposable detached checkout at that head; uncommitted files in the caller's working copy never enter it. The review posts findings as native GitLab discussions and records a receipt. gate merge reads that receipt back: it lands the branch only when the discussions are resolved and the head has not moved, and otherwise blocks. base head uncommitted disposable detached checkout review findings discussion: resolved discussion: open receipt gate merge lands blocked resolved open/moved