Configuration
CodeRecon uses two config files per repo, both inside .recon/.
.recon/config.yaml¶
User-editable. Created by recon register. Persists across re-indexing.
# Port the daemon listens on for this repo's MCP slot.
# Override via: recon register --port <N>
# Or env var: CODERECON__SERVER__PORT=<N>
port: 7654
Full schema¶
# ── Logging ────────────────────────────────────────────────
logging:
level: INFO # DEBUG | INFO | WARN | ERROR
outputs:
- format: console # "console" or "json"
destination: stderr # stderr, stdout, or absolute file path
level: null # optional per-output override
# ── Server ─────────────────────────────────────────────────
server:
host: "127.0.0.1" # str — bind address
port: 7654 # int — daemon port
shutdown_timeout_sec: 5 # int — graceful shutdown timeout
poll_interval_sec: 1.0 # float — health poll interval
debounce_sec: 0.3 # float — file-change debounce window
worktree_idle_timeout_sec: 300 # float — idle worktree eviction
# ── Index ──────────────────────────────────────────────────
index:
max_file_size_mb: 10 # int — skip files larger than this
excluded_extensions: # list — file extensions to skip
- ".min.js"
- ".min.css"
- ".map"
index_path: null # str — override index storage location
# ── Background Indexer ─────────────────────────────────────
indexer:
debounce_sec: 0.5 # float — debounce between incremental reindexes
max_workers: 1 # int — concurrent indexer threads (1 recommended)
queue_max_size: 10000 # int — max pending file changes in queue
# ── Timeouts ───────────────────────────────────────────────
timeouts:
server_stop_sec: 5.0 # float — server shutdown grace period
force_exit_sec: 3.0 # float — force-kill after grace period
watcher_stop_sec: 2.0 # float — file watcher shutdown timeout
epoch_await_sec: 5.0 # float — max wait for index epoch completion
session_idle_sec: 1800.0 # float — session eviction after idle (30 min)
dry_run_ttl_sec: 60.0 # float — refactor preview expiry
# ── Query Limits ───────────────────────────────────────────
limits:
search_default: 20 # int — default search result count
map_depth_default: 3 # int — default tree depth for repo map
map_limit_default: 100 # int — default file limit for repo map
files_list_default: 200 # int — default file listing limit
operation_records_max: 1000 # int — max stored operation records
# ── Testing ────────────────────────────────────────────────
testing:
default_parallelism: 4 # int — parallel test workers
default_timeout_sec: 600 # int — per-target timeout (10 min)
timeout_sec_by_language: # dict — per-language timeout overrides
java: 900
python: 120
memory_reserve_mb: 1024 # int — RAM reserved for test runner
subprocess_memory_limit_mb: null # int — optional per-subprocess limit
# ── Ranking ────────────────────────────────────────────────
ranking:
strategy: file_first # "file_first" or "direct"
# file_first: score files, prune, then rank defs
# direct: rank all defs without file-level pruning
# ── Features (ML component toggles) ───────────────────────
features:
splade: true # bool — load SPLADE sparse encoder (~470 MB RSS)
cross_encoder: true # bool — load cross-encoder reranker
# ── Database ───────────────────────────────────────────────
database:
busy_timeout_ms: 30000 # int — SQLite busy-wait timeout
max_retries: 3 # int — retry count on transient errors
retry_base_delay_sec: 0.1 # float — base delay between retries
pool_size: 5 # int — connection pool size
checkpoint_interval: 1000 # int — WAL checkpoint frequency
# ── Telemetry (OpenTelemetry) ──────────────────────────────
telemetry:
enabled: false # bool — enable OTLP export
otlp_endpoint: null # str — collector URL
service_name: coderecon # str — service name in traces
# ── Debug ──────────────────────────────────────────────────
debug:
enabled: false # bool — enable debug endpoints
verbose_errors: false # bool — include stack traces (SECURITY RISK)
# ── Governance Policies ────────────────────────────────────
governance:
coverage_floor:
enabled: false
level: warning # "info" | "warning" | "error"
threshold: 80.0
lint_clean:
enabled: false
level: error
no_new_cycles:
enabled: false
level: warning
test_debt:
enabled: true
level: warning
coverage_regression:
enabled: false
level: warning
threshold: 0.0
module_boundary:
enabled: false
level: info
centrality_impact:
enabled: false
level: info
threshold: 0.8
.recon/state.yaml¶
Auto-generated. Do not edit. Stores runtime paths (index location for cross-filesystem setups).
.recon/.reconignore¶
Controls what CodeRecon indexes. Follows .gitignore syntax. Created automatically by recon register.
# Noise directories
node_modules/
dist/
build/
.venv/
__pycache__/
*.pyc
*.log
coverage/
.pytest_cache/
Customizing ignore rules¶
Edit .recon/.reconignore directly, or add a .reconignore file at the repo root. Root-level patterns are merged in automatically so they survive --reindex.
Sensitive files
Index artifacts in .recon/ are gitignored by design, so it is safe to index files like .env. They are never committed or shared. Exclude them via .reconignore only if you don't want them in the semantic search index.
Config Precedence¶
Settings are resolved in this order (highest wins):
- Environment variables (
CODERECON__SECTION__KEY) - Per-repo:
.recon/config.yaml - Global:
~/.config/coderecon/config.yaml - Built-in defaults
Environment Variables¶
Environment variables use a CODERECON__ prefix with double underscore delimiter for nesting:
CODERECON__LOGGING__LEVEL=DEBUG
CODERECON__SERVER__PORT=8080
CODERECON__FEATURES__SPLADE=false
CODERECON__TESTING__DEFAULT_TIMEOUT_SEC=300
Global Configuration¶
Global config lives at ~/.config/coderecon/config.yaml and applies to all repos. Per-repo config takes precedence.