raigal agent runs an iterative repair session with a local coding tool inside an isolated git worktree.
How worktree repairs work
To protect your active working branch from unverified edits,raigal agent isolates all changes:
- Raigal creates an ephemeral git worktree at
.raigal/worktrees/agent-<timestamp>-<pid>/, automatically registered in.git/info/excludeto prevent polluting git status. - The agent provider (Claude Code, OpenCode, or Codex) receives diagnostic output, file context, and target score expectations in its prompt.
- The provider makes edits and verifies changes inside the worktree.
- After reviewing the diff, you can run
raigal agent apply <session-id>to merge changes locally, or pass--prto open a pull request on GitHub.
Supported providers
Raigal supports three local coding tools:
Check which providers are installed on your machine:
Workflows
1. Interactive local repair session
Preview and test changes locally before committing:2. Automated pull request creation (--pr)
To create a branch and open a pull request automatically, run:
--pr, Raigal:
- Runs safe autofixes and passes remaining issues to the agent provider.
- Checks that the quality score meets
--target(default: 90). - Commits the changes to an isolated branch (
raigal/repair-...). - Pushes the branch and opens a GitHub pull request.
- Sends telemetry to Raigal Cloud to create a card in the Agent Actions column.
3. Lifecycle synchronization (report-pr-closed)
When an agent pull request is merged or closed on GitHub, update your board status with a GitHub Actions workflow:
Opening a pull request with
raigal agent --pr creates a card in the Agent Actions tab. When merged, report-pr-closed moves it to Merged and records the score delta.