For the complete documentation index, see llms.txt. This page is also available as Markdown.

Bolt CI Healer

When a Turbo CI check fails on a pull request, Paradime's Self-Healing feature can automatically trigger a DinoAI programmable agent against the failure. This guide walks you through wiring up a bolt-ci-healer agent that runs on the back of Turbo CI and autofixes the two things that break CI most often — pre-commit / lint failures and dbt errors on the build step — by pushing a fix commit straight to the PR's branch.

Crucially, it does more than blindly re-fix every red check. It deduplicates against prior healing attempts on the same branch, so it pushes a fix when one is genuinely needed and escalates to a human instead of looping when it has already tried.

compass

Before You Start

Integrations

The following must already be connected in Paradime:

  • Slack — Self-Healing posts and the agent's progress run in the configured slack_channel

  • A connected Git provider (GitHub / GitLab / Azure DevOps) so the agent can push a commit to the PR branch

What You'll Build

By the end of this guide you'll have:

  • A bolt-ci-healer DinoAI agent YAML committed under .dinoai/agents/

  • A Turbo CI schedule with self_healing.enabled = true pointing at this agent

  • A safe-by-default autopilot that classifies the failure (pre-commit vs dbt), pushes a fix commit to the PR's own branch, and stops after one attempt per distinct error instead of opening a new PR or looping forever

What Happens When a CI Check Fails

Once Self-Healing is enabled on a Turbo CI schedule:

Turbo CI runs on PR #482 ("fix: rename stg_orders columns") — a step fails
    └─ Paradime posts the standard CI failure notification to #data-alerts and #agent-demo
    └─ In #agent-demo (the configured self_healing.slack_channel):
        └─ "🦖 CI healing enabled — starting healing session..."
        └─ DinoAI agent `bolt-ci-healer` is triggered with:
              prompt   = "Review the CI run log and fix the failing checks on PR #482 (ci run_id 90412)"
              context  = Prior CI-healing attempts for this PR / branch (recent sessions)
        └─ Agent runs the recover-or-escalate flow:
              1. Get the CI run logs            (get_bolt_run_logs)
              2. Classify the failure           pre-commit/lint  ─or─  dbt build error
              3. Resolve the target branch      (list_pull_requests / read_pull_request)
              4. Inspect prior healing attempts on this branch (sessions + recent commits)
              5. If same error already fixed by a prior healing commit ─► STOP, escalate, exit
              6. Otherwise ─► apply fix, commit to the PR branch, push, post link

The dedup / loop-guard in steps 4–5 is the heart of this agent. Without it, a fix that re-triggers CI could fail again, heal again, and loop — burying the PR in commits and never reaching a human.

Architecture Overview

1

Create the Agent YAML

Commit this file at .dinoai/agents/bolt-ci-healer.yml:

Tool allowlist is deliberately narrow — and deliberately excludes PR creation. The agent has read access (read_file, ripgrep_search, run_sql_query), CI observability (get_bolt_run_logs), PR awareness (list_pull_requests, read_pull_request), and a terminal (run_terminal_command) to run the autofixers and git commit / git push to the PR branch. There is no create_pull_request — unlike the scheduled Pipeline Healer, a CI failure already has a PR, so the fix is committed to that branch, not a new one. No post_slack_message is needed either — Self-Healing already threads the agent into a Slack channel and the agent's stdout shows up there automatically.

2

Enable Self-Healing on the Turbo CI schedule (UI)

In the schedule editor for your Turbo CI schedule:

  1. Open the Self-Healing section.

  2. Toggle Enable Self-Healing.

  3. Pick the Slack channel the agent should run in — e.g. #agent-demo. It must already be configured under Notification Settings on this schedule.

  4. From the Agent Name dropdown, pick bolt-ci-healer. The list is populated from .dinoai/agents/*.yml on the schedule's git branch — so make sure the YAML from Step 1 has been merged into the base branch before configuring this.

  5. Save the schedule.

See Turbo CI for how CI runs are triggered, and Bolt → Self-Healing for the full UI walkthrough.

3

Or: enable Self-Healing via YAML (schedules-as-code)

If you manage your Turbo CI schedule as code, add the self_healing block to the CI schedule entry:

See the full schema at Schedules as Code → Configuration Reference → Self-Healing.

4

Watch the first heal in action

Open a PR that deliberately breaks CI — e.g. an unformatted model (pre-commit) or a model with a bad ref() (dbt). The next time Turbo CI runs and fails:

  1. Open #agent-demo in Slack and find the CI failure notification for the run.

  2. Inside that thread you'll see:

    • 🦖 CI healing enabled — starting healing session...

    • A series of agent messages showing the flow in action (CI logs → failure class → target branch → prior attempts)

    • Either:

      • A commit link pushed to the PR's branch (fix(ci): sqlfluff lint on stg_orders / fix(ci): correct ref in fct_orders), which re-triggers Turbo CI automatically, or

      • An "already tried this — needs a human" escalation post (when the loop-guard trips)

  3. Watch Turbo CI re-run on the new commit. If it goes green, review and merge the PR as normal.

How the loop-guard works

The loop-guard is what makes this agent safe to leave running unattended on every PR. Because a CI fix is itself re-tested by CI, a naive healer could push → fail → heal → push forever. The guard caps the agent at one fix attempt per distinct error and is driven by three pieces of context the agent reasons over:

Input
Source
Used to answer

Current CI error

get_bolt_run_logs(run_id=<failed CI run>)

What's failing right now — pre-commit/lint or a dbt error?

Target PR / branch

list_pull_requests / read_pull_request

Which branch do I commit the fix to?

Prior CI-healing attempts

Initial context block prepended automatically by Paradime when this PR / branch has prior healing sessions, plus the recent commits already on the branch

Have I already pushed a fix for this exact error on this branch?

The agent stops and escalates instead of pushing another commit if both conditions hold:

  1. The current error matches an error from a prior CI-healing attempt on the same branch.

  2. A healing commit addressing that error already exists on the branch and CI is still failing the same way.

If either condition fails — the error is genuinely new, or the prior attempt cleared and a different check is now red — the agent proceeds with the fix.

Why the initial context matters. Paradime injects a "Prior CI-healing attempts for this PR / branch" block into the agent's prompt automatically when prior sessions exist for the same branch. This is what gives the agent recall across CI re-runs without needing its own memory tool — and it's exactly what the loop-guard reads to decide whether it has already tried.

File Structure

Your repository should look like this after completing the setup:

Last updated

Was this helpful?