cerium
All guides

How-to 2 min read

Auto-fix failing GitHub Actions in a clean worktree

Instead of breaking stride to dig through red Actions logs, let Cerium catch failing pushes and open a clean worktree thread with the logs already attached.

A Cerium CI recovery thread running in its own cerium/fix-ci git worktree, finding and fixing a flaky backoff test.
A CI recovery thread running in its own cerium/fix-ci worktree. The failed logs came in with the prompt, and the fix never touched main.

Set up the automation once

Make sure gh is signed in and your project's setup command (like bun install) is confirmed in Settings → Git & GitHub so new worktrees install dependencies on their own.

  1. Create a CI automation

    Open Automations in the left rail, add a rule, and set When to When CI fails.

  2. Give each run a fresh worktree

    Pick your repository under Where and select New worktree each run.

  3. Write a short prompt

    Tell the agent to reproduce the break from the attached logs, run your local checks, and push the fix once green.

  4. Optionally add cross-lab review

    Toggle Cross-lab review when done so a second model checks the patch before it lands (see Codex diff review).

Cerium Automations panel showing Fix failing CI set to When CI fails in a New worktree each run with Cross-lab review when done enabled.
Everything lives on one panel, including a Run now button to replay your last failed build while tuning your prompt.

What happens when a build breaks

Whenever an agent pushes through Cerium, Cerium runs your real git push (hooks and all) and watches GitHub Actions via gh for up to six hours. If any check fails, it creates a fresh cerium/* worktree, copies your .env* files (plus anything listed in .worktreeinclude), and hands the agent the failing check names, step logs, and run URL.

  • Your checkout stays clean

    Fixes run on an isolated cerium/* branch in a separate folder, never stashing or interrupting whatever you're editing.

  • No infinite loops

    If a fix commit fails CI again, the new logs go straight back to that same thread instead of spawning another run.

  • Works while you're away

    Runs while Cerium is open, minimized to the tray, or on a 24/7 server you can check from your phone with remote access.