Use cases

Patch production failures and vulnerable dependencies with coding agents

Turn failed builds, failed deploys and new security alerts into tracked patch work that coding agents pick up, prove in CI and hand back for review.

Updated

Build this freeNo credit card · Free plan included

A red build on main, a failed deploy or a new Dependabot alert is usually small work that nobody has time for. This page is the path that makes it routine: GitHub’s events land in Hookie, a workflow keeps the ones that matter and sorts them by kind, a coding agent such as Claude Code or Codex writes the smallest fix, and CI and a reviewer decide whether it ships.

Who this is for

  • Teams whose main branch breaks more often than anyone has time to fix it.
  • Teams with a backlog of Dependabot and security alerts that never get worked.
  • Anyone who wants patching to be routine work an agent does, with CI and a reviewer as the gate.

The problem

  • Failures pile up quietly. A red build on main or a failed deploy sits until someone notices, and everything behind it waits.
  • Security alerts become a backlog. Each one is small, there are many, and none is urgent until one is.
  • An agent’s patch is only as good as its proof. Without CI and a review gate, an automated fix is a new risk.

How each tool plugs in

ToolHow it connectsWhat it does in the loop
Claude CodeAdds Hookie’s hosted MCP server with one command. Runs unattended through Claude Code’s GitHub Action when a workflow gives it a prompt.Reads events, runbooks and memory from Hookie; writes the fix and opens the pull request.
CodexAdds Hookie’s MCP server by URL and signs in over OAuth. Runs unattended through OpenAI’s Codex GitHub Action or codex exec in CI.Same role as Claude Code.
Observability tools (Sentry, Datadog, Grafana, PagerDuty and others)Alert webhooks post to a Hookie endpoint. Log excerpts can be sent with an ingest key. Custom HMAC verification where the tool signs its requests.The trigger and the evidence: what broke, where, and the log lines around it.
GitHubSigned webhooks into a Hookie endpoint (GitHub signature verification). Outbound, a destination calls GitHub’s repository dispatch API to start an Actions run.Starts agent runs and closes the loop: pull requests, CI results and deployments come back as events.
Workspace BrainRunbooks, ADRs and postmortems as searchable documents; records linked in the knowledge graph; agent memory over MCP.Your team’s context: how you ship, what broke before, who owns what.

The agent is started the same way on every coding agent page: a destination on agent_jobs calls GitHub’s repository dispatch API, and a GitHub Actions workflow runs the agent with the prompt from the job. How a webhook starts Claude Code or Codex has the body template and the Actions workflow.

How it works

1. Every failure becomes a record

GitHub webhooks for workflow runs, deployment statuses and Dependabot alerts post to a Hookie endpoint with GitHub signature verification on, so forged events are refused before anything is stored. Error spikes from your observability tool arrive the same way. A cron trigger can also start a weekly patch sweep.

2. Hookie sorts the patch work

Workflow entry conditions keep only what matters: failures on main, failed production deploys, alerts above the severity you choose. Branches split the work by kind: a broken build, a runtime regression or a dependency bump.

3. The agent writes the smallest fix

Hookie emits a task with the failing run, the commit, the package and the advisory to your agent. The agent finds every place the failing code or package is used, checks Hookie memory for your rules on upgrades, and opens a pull request.

4. CI decides, not the agent

The workflow waits for the CI run on the agent’s branch. If it passes, the patch goes to review with a Slack note. If it fails or never finishes, it escalates to a person with both runs attached.

5. Roll out and confirm

After merge, the workflow can wait for the production deployment event and post a summary. Every patch, its trigger and its result stay on record, which is what a security review asks for.

Where Hookie stops, and what your agents do

Hookie does not scan for vulnerabilities, run your CI or merge. GitHub and your scanners find the problems; the agent writes the patch; CI proves it; a person approves it. Hookie connects those steps and records each one.

A worked example

This workflow runs when a GitHub Actions run fails on main. A routing rule files GitHub’s workflow_run webhooks into github_ci. The agent is told to work on a branch named after the failing run’s id, so the wait step can find its CI run.

{
  "name": "Failed build on main to agent patch",
  "entry_dataset": "github_ci",
  "entry_conditions": [
    { "path": "action", "op": "equals", "value": "completed" },
    { "path": "workflow_run.conclusion", "op": "equals", "value": "failure" },
    { "path": "workflow_run.head_branch", "op": "equals", "value": "main" }
  ],
  "steps": [
    { "type": "emit_event", "dataset": "agent_jobs",
      "payload": {
        "branch": "hookie-fix-{{entry.workflow_run.id}}",
        "prompt": "The {{entry.workflow_run.name}} run failed on main at commit {{entry.workflow_run.head_sha}}. Read the run's logs and open a pull request with the smallest fix, on the branch hookie-fix-{{entry.workflow_run.id}}.",
        "failed_run": "{{entry.workflow_run.html_url}}"
      } },
    { "type": "wait_for_event",
      "dataset": "github_ci",
      "conditions": [
        { "path": "workflow_run.head_branch", "op": "equals", "value": "hookie-fix-{{entry.workflow_run.id}}" },
        { "path": "action", "op": "equals", "value": "completed" }
      ],
      "timeout_seconds": 7200,
      "on_timeout": "continue" },
    { "type": "branch",
      "conditions": [{ "path": "waited_event.workflow_run.conclusion", "op": "equals", "value": "success" }],
      "then": [
        { "type": "emit_event", "dataset": "patch_ready",
          "payload": { "title": "Agent patch passed CI", "branch": "{{waited_event.workflow_run.head_branch}}" } }
      ],
      "else": [
        { "type": "emit_event", "dataset": "patch_escalations",
          "payload": { "title": "Agent patch did not pass CI", "severity": "high", "failed_run": "{{entry.workflow_run.html_url}}" } }
      ] }
  ]
}

The entry conditions only match failures on main, so the agent’s own CI runs on its branch never start a second patch. Destinations filtered to patch_ready and patch_escalations post to Slack.

What you can see afterwards

  • Every failure on main and every security alert, with the patch it produced or why it escalated.
  • The CI result that cleared or blocked each patch.
  • Delivery logs for every dispatch, with replay if GitHub or the agent was down.
  • A patch history you can export for an audit or a customer’s security questionnaire.

Flow

GitHub workflow run, deployment status or Dependabot alert, plus observability error spike → Hookie endpoint (signature verified) → workflow (filter, branch by kind) → agent_jobs destination → Claude Code or Codex (reads Hookie memory) → pull request → CI proves it → GitHub webhook back to Hookie → wait step resumes → patch_ready (Slack) or patch_escalations.

Feature development with coding agents · Orchestrate incident remediation · Replay and inspect failures from the CLI · Verify provider signatures · Connect a coding agent