AI Assistant
GitBlixt's AI Assistant lets you use Claude Code to automatically fix issues and review merge requests directly from the web UI. Claude Code runs in a sandboxed Docker container on the server, reads your repository, makes changes, and opens a merge request with the result.
Setup
Before using AI features, you need to provide an authentication credential so GitBlixt can run Claude Code on your behalf. You have two options:
Option A: Anthropic API Key (Pay-per-use)
- Go to console.anthropic.com/settings/keys and create a new API key.
- Copy the key (it starts with
sk-ant-). - In GitBlixt, go to Settings and scroll to the AI Assistant section.
- Paste the key and click Save.
- Click Test to verify the key works.
Usage is billed directly to your Anthropic account. GitBlixt never sees your bill or controls your spending — set spend limits in the Anthropic Console.
Option B: Claude OAuth Token (Subscription)
If you have a Claude Pro or Max subscription, you can use your subscription instead of pay-per-token API rates.
-
On a machine with a web browser, install Claude Code:
npm install -g @anthropic-ai/claude-code -
Generate a long-lived token:
This opens a browser to authenticate, then prints a token valid for 1 year.claude setup-token - Copy the token.
- In GitBlixt, go to AI → Providers and paste the token.
The OAuth token uses your Claude subscription, so there are no additional API charges.
Multiple keys
AI → Providers holds as many keys as you like — one per account or OpenAI-compatible endpoint. Name each one (e.g. "Fireworks", "Together", "Work OpenAI") and pick between them by name when you start a job or create a scheduled agent.
How Keys Work in Teams
Each user provides their own API key or OAuth token. When you click Fix with AI or Review with AI, the job runs using your key — the one saved in your personal settings. Other users' keys are never used for your jobs, and yours is never used for theirs.
If you haven't configured a key, the AI buttons won't appear.
Instance review key
The root user can save one shared Anthropic API key or Claude OAuth token as the
Instance review key
in Admin → Settings → AI Settings. While it is set, every
merge request review (Review with AI, review & fix loops, automatic
reviews, /agent review) and every merge request fix (Fix with AI
on a merge request, /agent fix) runs on it with the default Claude model, for
every user, even users who saved a key of their own — and users without one get the
review and fix buttons. Those jobs leave out your saved Claude Code settings and your
command (stdio) MCP servers. Everything else keeps using each user's own key: fixing issues,
resolving conflicts, other /agent
instructions, scheduled agents and the repository's Run AI agent.
The root user can turn AI off for the whole instance with AI enabled in Admin → Settings → AI Settings. While it is off, nobody can start AI jobs, admins and root included: the AI buttons are hidden, the API (with a 403) and the MCP server refuse AI runs, queued jobs are canceled, and AI release notes and idea breakdowns stop. Jobs already running finish. Personal AI settings stay available.
Using AI Features
Fix an Issue
- Open an issue in any repository where you have write access.
- Click the Fix with AI button in the comment bar (only visible if you have a credential configured and the issue is open).
- A modal appears showing Claude Code's live output as it reads your code and works on a fix.
-
When done, GitBlixt automatically:
- Creates a branch (
ai/fix-issue-N-xxx) - Commits the changes
- Opens a merge request linked to the issue
- Labels the MR with
ai-generated
- Creates a branch (
- Review the MR as you would any other — AI fixes are never auto-merged. (Only a scheduled agent with auto-merge enabled merges its own work, and only after its gates pass.)
Review a Merge Request
- Open a merge request.
- In the conversation tab, click Review with AI.
- The agent comments on the MR as soon as it starts, so the thread shows a run is under way, and comments again if the run fails.
- Claude Code reads the diff and posts a code review as a comment on the MR.
- The review covers the commits as they were when you started it, or the new tip if the branch was force-pushed, even if the MR is merged while the run waits in the queue. If the MR is closed without merging, or its commits are gone after a squash merge, the run is skipped.
- Once new commits are pushed, that review collapses to a one-line summary you can expand, and the button becomes Review new commits.
Review depth
Choosing Review with AI also asks how deep the review should go. Every depth runs a recall pass followed by a verify pass that re-checks each finding.
- Quick — One agent reviews the diff with a secrets scan and semgrep, without compiling or running tests; about 5 to 10 minutes.
- Moderate — Parallel subagents review the diff after compiling and running the project's static analysis; about 20 to 45 minutes.
- Thorough — Everything in Moderate, plus the tests that cover the change, run against a provisioned test database; about 40 to 75 minutes.
The default depth is set under Default review depth
in AI settings.
It preselects the choice in the run dialog and is used for automatic reviews. Reviews that
gate an auto-merge always run thorough. Reviewers get no Edit or Write tools, and
nothing they change is committed (they can still run commands through Bash). Moderate and thorough reviews also inject GitBlixt's own
review agents into the workspace (elixir-reviewer, react-native-reviewer, bug-hunter, rules-checker, finding-verifier, and test-runner). These run on fixed models
whatever model you pick for the review: bug-hunter
and finding-verifier
on Claude Opus, the language
reviewers on Claude Sonnet, and rules-checker
and test-runner
on Claude Haiku. An agent of your own with the same name takes precedence; a
repository's doesn't.
Every other Claude Code job runs with an agent cap: at most 2 subagents at once and 5 in total per session, nested ones included. Past that, the job does the work itself. Reviews are exempt, so their parallel reviewers and verifiers always run.
To tell the reviewer what matters in a repository, add a .gitblixt/review.md
file at the repository root. It is plain markdown, such as the invariants to protect, areas
that deserve extra scrutiny, or patterns to ignore, and the reviewer reads it alongside
CLAUDE.md
and AGENTS.md. The AI job page shows the review depth,
the cost, and the number of turns the job took. To benchmark the reviewer, start a review
with dry_run: true
through the MCP run_ai_job
tool: it runs the
review and stores it on the job without posting anything to the merge request.
Provider, model, and effort
Every AI action opens a picker for the provider key, model, and effort.
Effort trades speed and cost against how hard the model thinks: lower levels answer faster
and cheaper, higher levels reason longer on difficult changes. Default
leaves the choice to the model. The levels on offer depend on the model — Claude
Opus 4.7 and newer offer Low through Max, older models fewer, and models without
reasoning controls (such as Claude Haiku 4.5) none, in which case the selector is hidden.
Your last selection, effort included, becomes the default for the next run. Having no
picker, /agent
comments always run on that default; see or change it under Settings → AI → Default AI model. The same selector appears on scheduled
agents, subagents, and the auto-review settings.
Limits
| Limit | Value |
|---|---|
| Concurrent AI jobs per user | 1 |
| AI jobs per hour per user | 5 |
| Job timeout | 30 minutes |
| Log size | 8 MB (truncated) |
Requiring Approval for AI Merge Requests
AI-generated merge requests are never auto-merged (unless they come from a scheduled agent with auto-merge enabled), but you can add extra guardrails by configuring your repository's merge settings. Go to your Repository Settings page and look at these three sections:
- Approval rules — require a minimum number of human approvals before any MR (including AI-generated ones) can be merged. For example, create a rule named "Code Review" requiring 1 or 2 approvals.
-
Branch rules — enforce approvals and CI checks on specific
branches. Add a rule for your default branch (e.g.
main) with "Require approval rules to pass" enabled and a minimum approval count. - Protected branches — prevent direct pushes and force-pushes to important branches, ensuring all changes (including AI fixes) go through merge requests.
With these configured, an AI-generated MR targeting your default branch will require the same reviews and checks as any human-authored MR before it can be merged.
Security
- Your API key / OAuth token is encrypted at rest using AES-256-GCM and never leaves the server.
- Claude Code runs in an isolated Docker container with no access to other repositories.
-
Agents get none of the repository's CI/CD variables unless one is marked
Expose to AI agents
in Settings → CI/CD Variables
(say, an API key a scheduled agent calls). Even then only scheduled agents and
Run AI agent
jobs get it, as their instructions come from someone with write access to the
repository. No other AI job does (reviews, fixes, conflict resolution,
/agentcommands, and any job started from an idea), since issue, merge request, comment and idea text can come from people without it. Only names starting withAGENT_can be exposed, so a variable can't change how the agent itself runs. Exposed values are hidden in job logs and in what the agent posts, also as they appear inside JSON. Still, anything the agent reads during the run (issues, merge request notes, comments, web pages it fetches) can lead it to leak an exposed key some other way, and masking only covers the logs and output, so expose only low-privilege keys you can revoke. -
Tool access is restricted to
Read,Edit,Write,Bash,WebFetch, andWebSearch— enough to read code, make changes, and consult external documentation, and nothing else. - All AI-generated merge requests are clearly labeled and require human review before merging.
Troubleshooting
The "Fix with AI" button doesn't appear
- Make sure you are logged in.
- Make sure you have saved a credential in AI → Providers.
- The button only appears on open issues.
- AI may be turned off for the instance: AI → Providers says so if it is.
"Test" fails for my API key
- Verify the key is correct and not revoked in the Anthropic Console.
- Ensure the server has outbound internet access to
api.anthropic.com. -
Note: the Test button only works for API keys (
sk-ant-), not OAuth tokens. OAuth tokens are validated when a job runs.
AI job fails immediately
-
Check that the
gitblixt-ai:11Docker image is built. It is built automatically on first use, but requires Docker to be available on the server. - Check the job log for error details (click the button to open the log modal).