Agentic coding, ticket to merged code — a self-hosted loop where I write the ticket and press merge, and two AI agents do everything in between.

/agent … comments send the work back.What the ticket shows

/agent … comment sends it back to the agent.Inside one agent run

Rules
| rule | how |
|---|---|
| Only I start it | ticket changes and /agent comments from anyone else are ignored
|
| Only I merge | agents work on their own branch and can never push to main |
| Agents can't cheat | changes to existing tests or to the CI setup are rolled back |
| It always stops | at most 3 rounds per run; nothing restarts without me |
How this differs from CI/CD
CI/CD builds, tests and releases code that is already written. This loop writes the code from a ticket and uses CI as one of its checks. Its review agent runs before the pull request exists; the automated review in Firmware CI/CD on GitHub Actions reviews pull requests opened by anyone.
Stack
Plane (tickets) · Gitea (code, pull requests, CI) · Claude Code in headless mode (developer and review agents) · a small webhook receiver and orchestrator script.