Configuration Reference
CodeSpider is configured via a YAML file (upstream codespider.example.yaml). Keys were verified against upstream fed7f5c; keys marked new were added afterwards and verified against ee66683.
Config Resolution Order
Section titled “Config Resolution Order”-f <path>CLI flag (./codespider -f /etc/codespider/codespider.yaml)CODESPIDER_CONFIG_PATHenvironment variable./codespider.yamlor./codespider.ymlin the current working directory
String values support optional ${ENV_VAR} expansion (for example, api_key: "${LLM_API_KEY}"). Send SIGHUP to the running daemon to hot-reload skills and budgets without restarting.
Daemon YAML Keys
Section titled “Daemon YAML Keys”| Key | Default | Required | Description |
|---|---|---|---|
server.listen_addr |
:8080 |
No | HTTP listen address for webhooks, metrics, and Operations Console |
server.admin_token |
"" |
Recommended | Bearer/Basic token protecting /, /status, /metrics, /events, and /api/* |
forge.provider |
gitea |
No | New. Forge backend, gitea or github. One daemon serves one forge. See GitHub setup. |
forge.repos |
[] |
No | New. Optional owner/repo allowlist for reconciliation; empty discovers repositories the token can access |
gitea.base_url |
— | Yes, when forge.provider is gitea |
Base URL of your Gitea instance (e.g. https://gitea.example.com) |
gitea.token |
— | Yes, when forge.provider is gitea |
API token for the Gitea bot account |
gitea.webhook_secret |
"" |
Recommended | HMAC-SHA256 secret configured in Gitea webhooks |
gitea.bot_username |
codespider |
No | Bot username used for @mention detection and self-loop prevention |
gitea.repos |
[] |
No | Optional owner/repo list for periodic reconciliation (empty = auto-discover) |
gitea.skip_draft_prs |
true |
No | Skip pull requests marked as draft or titled WIP: / [WIP] |
gitea.ignore_bot_prs |
true |
No | Skip pull requests authored by bots (type: Bot or *[bot]) |
gitea.sticky_summary |
true |
No | Maintain a single updated walkthrough card per PR with a Mermaid diagram |
gitea.require_collaborator_for_fix |
true |
No | Require repository collaborator permission before executing @codespider /fix |
forge.skip_draft_prs, forge.ignore_bot_prs, forge.sticky_summary, forge.require_collaborator_for_fix |
as the gitea.* rows |
No | New. Provider-neutral names for the four gitea.* switches above; the gitea.* names still work as aliases |
github.api_url |
https://api.github.com |
No | New. GitHub REST base URL; GitHub Enterprise Server is commonly https://HOST/api/v3. Must be HTTPS without user info, query, or fragment |
github.token |
— | Yes for GitHub, unless App credentials are set | New. Static token for API calls and HTTPS git. Do not combine with App credentials |
github.app_id, github.installation_id, github.app_private_key_path |
— | No | New. GitHub App credentials; all three must be set together. Installation tokens refresh automatically |
github.webhook_secret |
— | Yes for GitHub | New. Secret of the GitHub webhook; invalid X-Hub-Signature-256 signatures are rejected |
github.bot_username |
codespider |
No | New. Bot login for mention detection and self-loop prevention; GitHub App bots usually end in [bot] |
github.repos |
[] |
No | New. GitHub-specific reconciliation allowlist; forge.repos wins when set |
llm.base_url |
https://api.openai.com/v1 |
No | OpenAI-compatible base URL (OpenAI, OpenRouter, Ollama, vLLM, LiteLLM) |
llm.api_key |
"" |
Recommended | Bearer token for the LLM endpoint |
llm.model |
gpt-5 |
No | Primary model identifier passed to /chat/completions |
llm.fast_model |
"" |
No | Optional low-cost model for small PRs (<=50 lines), /summary, and /ci |
llm.timeout_seconds |
120 |
No | Per-request HTTP timeout for LLM calls |
llm.max_retries |
2 |
No | Max retries with exponential backoff on transient LLM errors (429, 5xx) |
llm.reasoning_effort |
"" (omitted) |
No | New. Sent as reasoning_effort on every chat request (none, minimal, low, medium, high). Reasoning models such as Qwen via Ollama can spend most of a review in hidden thinking tokens; none or low helps on slow hardware. Leave empty unless your endpoint accepts the field. |
agent.max_steps |
12 |
No | Max tool-calling turns per PR run |
agent.job_timeout_seconds |
300 |
No | New. Wall-clock budget for one PR review job (30 to 7200). Raise it for slow self-hosted models. Separate from llm.timeout_seconds, which only bounds a single LLM request. |
agent.max_tokens_per_run |
32000 |
No | Token budget cap per PR run |
agent.skills_dir |
./skills |
No | Directory containing <skill>/SKILL.md folders |
agent.default_skills |
[security, code-quality, testing] |
No | Default skills loaded on every PR |
agent.enable_write |
false |
No | Enables write_file, edit_file, and commit_and_push tools |
agent.adversarial_security |
true |
No | Enables Blue-Team verification pass to refute false-positive inline findings |
agent.enable_proof_of_bug |
false |
No | Enables isolated run_proof_test (go test -race) verification |
sandbox.mode |
disabled |
No | Execution sandbox mode (disabled or container) |
alert.webhook_url |
"" |
No | Optional Slack/Discord webhook URL for critical or secret-scan alerts |
daemon.data_dir |
./data |
No | Directory for bare git mirrors, worktrees, and state.json |
daemon.workers |
2 |
No | Number of concurrent PR review workers (1 recommended for local Ollama) |
daemon.reconcile_interval_seconds |
300 |
No | Interval for periodic reconciliation (0 disables reconciler) |
daemon.update_check_hours |
0 (off) |
No | New. Hours between release checks against api.github.com. 0 disables it, so the daemon makes no outbound update calls. See CLI. |
daemon.log_level |
info |
No | Log level (debug, info, warn, error) |
Repository Configuration (.codespider.yaml & AGENTS.md)
Section titled “Repository Configuration (.codespider.yaml & AGENTS.md)”CodeSpider automatically loads repository-level instructions from the checked-out PR worktree:
AGENTS.md.gitea/review-instructions.md.codespider/instructions.md
Trusted policy overrides in .codespider.yaml (or .codespider.yml) are read from the repository’s base branch mirror (refs/heads/<base>) so untrusted PR heads cannot disable review gates or expand ignore_paths:
review: enabled: true min_severity: warning model: gpt-5 auto_label: true auto_assign_reviewers: true adversarial_security: true skills: - security - code-quality - performance - chaos-resilience ignore_paths: - "*.lock" - "go.sum" - "vendor/**" instructions: | Verify context propagation on all database calls.Review gating, path instructions and pre-merge checks (new)
Section titled “Review gating, path instructions and pre-merge checks (new)”These .codespider.yaml keys were added after fed7f5c (verified against ee66683):
review: path_instructions: - "internal/db/**: Every transaction must have a deferred Rollback." - "*.sql: Flag destructive DDL that has no rollback script." base_branches: - main - "release/*" ignore_title_keywords: [WIP, "[skip review]"] title_pattern: "^(feat|fix|docs|chore)(\(.+\))?: .+" require_description: true max_changed_lines: 800| Key | Behavior |
|---|---|
path_instructions |
Block list of "<glob>: <instruction>" (up to 32, 1 KiB each). When a changed file matches, the instruction and the matching paths are appended to the review prompt. |
base_branches |
Automatic reviews run only for PRs targeting a matching branch (path.Match globs: release/* matches release/1.2, not release/1.2/hotfix). |
ignore_title_keywords |
Skips automatic review when the PR title contains a keyword (case-insensitive). A skipped PR gets a success commit status naming the reason. /review and /redteam always run. |
title_pattern, require_description, max_changed_lines |
Add an advisory Pre-merge checks table to the sticky summary. They never change commit status. |
base_branches, ignore_title_keywords, title_pattern, require_description, and max_changed_lines are policy keys: when the base branch has a .codespider.yaml, they are read from it only. Regex values are taken literally, with no YAML escape processing.
Fork pull requests (new)
Section titled “Fork pull requests (new)”Nothing is read from a fork’s head. For fork PRs CodeSpider uses the base branch versions of .codespider.yaml, AGENTS.md, .gitea/review-instructions.md, .codespider/instructions.md, and CODEOWNERS (for reviewer assignment), read from the cached mirror. The repository keeps its review rules, while a fork author cannot disable gates, inject prompt instructions, or pick reviewers. If the base branch has none of these files, the fork PR is reviewed with defaults.