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.
Before You StartIntegrationsThe 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-healerDinoAI agent YAML committed under.dinoai/agents/ - A Turbo CI schedule with
self_healing.enabled = truepointing 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
Architecture Overview
1
Create the Agent YAMLCommit this file at
.dinoai/agents/bolt-ci-healer.yml:.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:
- Open the Self-Healing section.
- Toggle Enable Self-Healing.
- Pick the Slack channel the agent should run in — e.g.
#agent-demo. It must already be configured under Notification Settings on this schedule. - From the Agent Name dropdown, pick
bolt-ci-healer. The list is populated from.dinoai/agents/*.ymlon the schedule’s git branch — so make sure the YAML from Step 1 has been merged into the base branch before configuring this. - Save the schedule.
3
Or: enable Self-Healing via YAML (schedules-as-code)If you manage your Turbo CI schedule as code, add the See the full schema at Schedules as Code → Configuration Reference → Self-Healing.
self_healing block to the CI schedule entry:paradime:schedules.yml
4
Watch the first heal in actionOpen 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:- Open
#agent-demoin Slack and find the CI failure notification for the run. - 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)
- A commit link pushed to the PR’s branch (
- 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:
The agent stops and escalates instead of pushing another commit if both conditions hold:
- The current error matches an error from a prior CI-healing attempt on the same branch.
- A healing commit addressing that error already exists on the branch and CI is still failing the same way.
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:Related Docs
- Turbo CI — slim, state-aware CI on every pull request
- Bolt → Self-Healing — enabling the feature on a schedule
- Bolt Pipeline Healer — the scheduled-run sibling of this agent
- Programmable Agents — Quick Start
- Programmable Agents — YAML Configuration
- Programmable Agents — Tools Reference
- Schedules as Code — Configuration Reference