Use cases

Orchestrate incident remediation with coding agents

When an alert fires, Hookie collects the logs and context, hands a scoped investigation to a coding agent, and keeps your team in charge of the fix.

Updated

Build this freeNo credit card · Free plan included

An alert says what broke. It does not say which deploy, which owner or which runbook, and the first hour of an incident goes on finding out. This page is the path that does that hour for you: the alert lands in Hookie, a workflow triages it and posts the incident card, a coding agent such as Claude Code or Codex investigates and opens a draft fix, and the workflow holds that fix until someone on your team approves it.

Who this is for

  • Teams without a dedicated on-call rotation, where the person paged is also the person shipping features.
  • Teams that already get alerts from Sentry, Datadog, Grafana or PagerDuty and want the first hour of investigation done before anyone opens a laptop.

The problem

  • Alerts arrive without context. The page says what broke, not which deploy, which owner or which runbook.
  • Investigation is manual and slow. Someone reads logs, searches the code and pieces together the timeline by hand.
  • Agents need a brief and a boundary. A coding agent can trace a bug fast, but only with the right evidence, and nobody wants it shipping to production unsupervised.

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. Alerts and logs land in one place

Point your observability tools’ alert webhooks at a Hookie endpoint, and send log excerpts with an ingest key. Routing rules normalize each tool’s payload into one alerts dataset with the same fields: service, severity, summary, link, and an alert_id mapped from $submission.id. When a tool sends an Idempotency-Key header, its retries of the same alert are stored once.

2. Triage runs before anyone wakes up

A workflow filters to the severities you care about. An AI step summarizes the alert and the log excerpt into a likely service and cause. A knowledge graph step can add the service’s owner, recent deploys and past incidents. A Slack destination posts the incident card.

3. A coding agent investigates

Hookie emits a scoped task to your agent: the alert, the log lines, the suspected service and the instruction to find the root cause and open a draft pull request with a fix and a test. The agent traces the code path in your repository, searches related events in Hookie over MCP, and reads your runbook from the Workspace Brain.

4. People approve the fix

The workflow waits for an approval record for this incident, from a Hookie form. If nobody approves within the window, it escalates in Slack instead of going quiet.

5. Verify and remember

After the fix deploys, the workflow can wait for the deployment event, pause, and check your monitoring API with an HTTP step. The incident, the pull request and the fix are linked in the Workspace Brain, and the postmortem can be uploaded as a Brain document, so the next agent that sees a similar alert finds it.

Where Hookie stops, and what your agents do

Hookie does not replace your monitoring or your paging tool, and it never deploys code. It turns alerts into a brief, routes the brief to an agent, holds the approval gate and keeps the timeline. Your agent investigates and proposes the fix; your team decides whether it ships.

A worked example

This workflow runs on critical and high alerts. Two destinations do the delivery: one filtered to incident_channel posts to Slack, one filtered to agent_jobs starts the agent run. The approval form posts incident_id and decision into an approvals dataset.

{
  "name": "Incident to agent investigation",
  "entry_dataset": "alerts",
  "entry_conditions": [{ "path": "severity", "op": "in", "value": ["critical", "high"] }],
  "steps": [
    { "type": "call_ai",
      "instructions": "Summarize this alert and log excerpt. Reply with JSON: summary, suspected_service, suspected_cause.",
      "output_key": "triage" },
    { "type": "emit_event", "dataset": "incident_channel",
      "payload": { "title": "{{triage.summary}}", "severity": "{{entry.severity}}", "incident_id": "{{entry.alert_id}}" } },
    { "type": "emit_event", "dataset": "agent_jobs",
      "payload": {
        "incident_id": "{{entry.alert_id}}",
        "branch": "hookie-incident-{{entry.alert_id}}",
        "prompt": "Investigate incident {{entry.alert_id}}: {{triage.summary}}. Likely cause: {{triage.suspected_cause}}. Trace the code path and read the runbook in Hookie. Open a draft pull request with a fix and a test. Do not merge."
      } },
    { "type": "wait_for_event",
      "dataset": "approvals",
      "conditions": [{ "path": "incident_id", "op": "equals", "value": "{{entry.alert_id}}" }],
      "timeout_seconds": 14400,
      "on_timeout": "continue" },
    { "type": "branch",
      "conditions": [{ "path": "waited_event.decision", "op": "equals", "value": "approve" }],
      "then": [
        { "type": "emit_event", "dataset": "incident_log",
          "payload": { "status": "fix approved", "approved_by": "{{waited_event.approver}}" } }
      ],
      "else": [
        { "type": "emit_event", "dataset": "incident_channel",
          "payload": { "title": "Incident {{entry.alert_id}} still needs an owner", "severity": "high" } }
      ] }
  ]
}

The wait’s {{entry.alert_id}} is filled in for each run, so an approval only resumes the incident it names. Wait timeouts resolve on a five-minute sweep, so treat the four-hour window as approximate.

What you can see afterwards

  • One timeline per incident: the raw alert, the AI triage, the brief the agent got, the approval and who gave it.
  • The agent’s pull request and the deploy that followed, as events on the same record.
  • Every Slack post and agent dispatch in the delivery log, retried if a service blipped mid-incident.
  • Past incidents linked in the Workspace Brain, for people and agents to search.

Flow

Sentry, Datadog, Grafana or PagerDuty alert → Hookie endpoint → rules normalize into alerts → workflow (AI triage, graph context) → Slack incident card, and agent_jobs destination → Claude Code or Codex (reads Hookie events and runbook over MCP) → draft pull request → your team approves (Hookie form) → wait step resumes → deploy event → incident linked in the Workspace Brain.

Feature development with coding agents · Patch production failures · Destinations, including Slack · The Agentic Brain · Connect a coding agent