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 Settings → AI Assistant and paste the token.
The OAuth token uses your Claude subscription, so there are no additional API charges.
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. There is no shared or instance-wide AI key — every user who wants to use AI features must set up their own credential.
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 changes are never auto-merged.
Review a Merge Request
- Open a merge request.
- In the conversation tab, click Review with AI.
- Claude Code reads the diff and posts a code review as a comment on the MR.
Limits
| Limit | Value |
|---|---|
| Concurrent AI jobs per user | 1 |
| AI jobs per hour per user | 5 |
| Job timeout | 30 minutes |
| Log size | 1 MB (truncated) |
Requiring Approval for AI Merge Requests
AI-generated merge requests are never auto-merged, 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.
-
Tool access is restricted to
Read,Edit,Write, andBash— no network tools. - 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 Settings → AI Assistant.
- The button only appears on open issues.
"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:latestDocker 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).