- Commit to the PR branch: the agent pushes a fix commit straight to the PR’s own branch. Turbo CI re-runs automatically.
- Open a draft fix PR: the agent checks out a new branch from the branch the failed CI run tested, heals the failure there, and opens a draft pull request against the PR’s branch. The PR description explains the error and how each change resolves it. The PR author reviews and merges it.
Prerequisites
- Slack connected (self-healing and the agent’s progress run in the configured channel).
- A connected Git provider (GitHub, GitLab, or Azure DevOps) so the agent can push a branch. For the draft fix PR variant, the agent also needs the provider’s CLI in the terminal to open the PR:
ghfor GitHub,glabfor GitLab. - On GitLab: on a workspace connected through the GitLab connection, the agent can push only to its own
paradime/<session id>branch. Each session starts on that branch, so use the Open a draft fix PR variant and push the fix from it, instead of creating a new branch. - Familiarity with programmable agents and Bolt self-healing.
Steps
1
Create the agent
In the Agent app, open Agents, select New agent, and start from the The Goal and Backstory set how the fix reaches the PR. Select the variant you want:Model: leave Auto selected.Allowed tools (the same for both variants; everything else is refused, see the Tools Reference):
bolt-ci-healer template (or Start from scratch). Fill in the builder fields with the content below, then select Deploy and choose Open a pull request: self-healing selects agents from .dinoai/agents/*.yml on the schedule’s git branch, so the agent definition must be merged there. See Build an agent in the UI for a tour of the builder. (Prefer YAML? The PR the builder opens contains the file, .dinoai/agents/bolt-ci-healer.yml, which you can edit by hand from then on.)Name: bolt-ci-healerRole:- Commit to the PR branch
- Open a draft fix PR
Goal:Backstory:
read_file,search_files_and_directories,ripgrep_searchrun_sql_querylist_pull_requests,read_pull_requestget_bolt_run_logsrun_terminal_command
The tool allowlist is deliberately narrow: read access, CI observability (
get_bolt_run_logs), PR awareness (list_pull_requests, read_pull_request), and a terminal. The terminal runs the autofixers and git commit/git push. In the draft fix PR variant, it also runs git checkout -b for the fix branch and the Git provider’s CLI (gh pr create --draft on GitHub, glab mr create --draft on GitLab) to open the PR. There is no create_pull_request tool, because standalone agents work with Git through the terminal. No Slack tool is needed either, because self-healing already threads the agent’s output into the channel.2
Enable self-healing on the Turbo CI schedule
Point your Turbo CI schedule’s self-healing at this agent, from the UI or as YAML. See Set up self-healing for the walkthrough. The
agent_name must match a .dinoai/agents/*.yml merged on the schedule’s git branch:paradime_schedules.yml
3
Watch the first heal
Open a PR that deliberately breaks CI, such as an unformatted model (pre-commit) or a model with a bad
ref() (dbt). The next time Turbo CI runs and fails, open the failure thread in your self-healing channel. You see the healing session start and the flow run (CI logs, then failure class, then target branch, then the loop-guard check).- Commit to the PR branch
- Open a draft fix PR
The thread ends with either a commit link pushed to the PR’s branch (which re-triggers Turbo CI automatically) or an “already tried this, needs a human” escalation when the loop-guard trips.
On a fresh CI failure, the agent either pushes a fix commit to the PR branch (Turbo CI re-runs on the new commit) or opens a draft fix PR against the PR branch (the PR branch is unchanged until someone merges it). It posts the link in the thread. On a repeat of an error it already tried to fix, it posts an escalation or the existing fix PR link instead of trying again.
Example draft fix PR description
With the Open a draft fix PR variant, the agent writes a description like this: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 fix, fail, and fix again forever. The guard caps the agent at one fix attempt per distinct error.- Commit to the PR branch
- Open a draft fix PR
The guard is driven by three pieces of context the agent reasons over:
The agent stops and escalates instead of pushing another commit only when both hold: the current error matches an error from a prior CI-healing attempt on the same branch, and a healing commit addressing that error already exists on the branch while CI is still failing the same way. If either fails (the error is genuinely new, or the prior attempt cleared and a different check is now red), it proceeds with the fix.
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. That is what gives the agent recall across CI re-runs without a memory tool, and it is what the loop-guard reads to decide whether it has already tried.
Next steps
Set up self-healing
Enable self-healing on a Bolt schedule.
Bolt pipeline healer
The same pattern for failed scheduled runs.
Build an agent in the UI
Create this agent visually instead of by hand.
Programmable Agents reference
The agent YAML schema and tools.