Skip to main content
Nectr uses feature flags to enable experimental features and customize review behavior. All feature flags are configured via environment variables.

Available Feature Flags

Parallel Review Agents

boolean
default:"false"
Enable parallel review mode with 3 specialized agents running concurrently.

Parallel Review Agents

By default, Nectr uses a single agentic review loop where Claude iteratively fetches context using MCP-style tools. When PARALLEL_REVIEW_AGENTS=true, Nectr switches to a parallel architecture with three specialized agents.

Architecture Comparison

Single Agentic Loop
Characteristics:
  • ✅ Faster for small PRs (1 API call)
  • ✅ Lower token usage
  • ✅ More efficient context fetching (only what’s needed)
  • ✅ Better for budget-conscious deployments
  • ❌ Single perspective on code review
Three Specialized Agents + Synthesis
Characteristics:
  • ✅ More thorough analysis (3 specialized perspectives)
  • ✅ Can be faster for large PRs (parallel execution)
  • ✅ Better at catching domain-specific issues
  • ✅ More comprehensive coverage
  • ❌ 4x API calls (higher cost)
  • ❌ Higher token usage
  • ❌ Overkill for small PRs

How It Works

1

Check Feature Flag

The PR review service checks the feature flag:
2

Choose Review Mode

Based on the flag, Nectr routes to the appropriate review function:
3

Execute Reviews

Standard Mode:
Parallel Mode:
4

Return Review Result

Both modes return the same ReviewResult structure:

When to Use Parallel Mode

  • Large PRs (>10 files or >500 lines changed)
    • Parallel execution can be faster
    • More thorough analysis justifies extra cost
  • Security-critical codebases
    • Dedicated security agent catches more vulnerabilities
    • Authentication, authorization, input validation get focused review
  • Performance-sensitive applications
    • Dedicated performance agent analyzes database queries, caching, algorithms
    • Better at identifying N+1 queries and memory leaks
  • Team projects with strict style guides
    • Style agent enforces consistency across codebase
    • Catches pattern violations and readability issues
  • High-stakes reviews
    • Production deployments
    • Public API changes
    • Database migrations
  • Small PRs (<5 files, <200 lines)
    • Overkill for minor changes
    • Standard mode is faster and cheaper
  • Documentation-only changes
    • No code to analyze
    • Parallel agents provide no extra value
  • Budget-constrained projects
    • 4x Claude API calls = 4x cost
    • Standard mode is sufficient for most PRs
  • High-volume repositories
    • Many PRs per day = high cost multiplier
    • Consider enabling only for specific branches or file patterns

Cost Comparison

Assuming Claude Sonnet 4.5 pricing (as of March 2026): Monthly cost estimate (100 PRs/month):
  • Standard: ~$6/month
  • Parallel: ~$22/month
Actual costs depend on PR size, number of tool calls, and model pricing. Monitor your Anthropic API usage dashboard.

Configuring Feature Flags

Via Environment Variables

Via Settings Class

Feature flags are defined in the settings class:
The default value is False if the environment variable is not set.

Runtime Changes

Feature flags are read at runtime on each PR review. You can change them without restarting the server.However, the behavior is determined when the review starts, so in-progress reviews won’t be affected.
To change feature flags:
  1. Update .env file
  2. If using Railway/Heroku/etc, update environment variables in the platform dashboard
  3. Changes take effect immediately for new webhook events

Experimental Features (Planned)

The following feature flags are planned for future releases:
Status: PlannedSend Slack notifications when reviews are posted.
Status: PlannedAutomatically update Linear issues when PRs are merged.
Status: PlannedAutomatically approve PRs that pass all checks and have no issues.
Status: PlannedCache review results for identical diffs to save API costs.

Debugging Feature Flags

Check Current Settings

View active feature flags via the health endpoint:
Expected response:

Check Logs

Feature flags are logged when a review starts:
Search logs for these messages to verify which mode is active:

Next Steps

Environment Variables

View all configuration options

Webhooks

Learn how PR events trigger reviews