Help home Getting Started MCP setup Purple Red Blue Green Auth Use cases Tools Errors Pricing Troubleshooting

Help / Red Codens

Red Codens setup

Error detection to auto-fix PR. Analyzes bugs from Sentry or manual reports, generates fix plans, and submits complex fixes to the Purple chain for a PR.

Overview

Red's primary unit is the bug report. A bug report can come from any of the following:

Once analyzed, a fix plan is produced. One click (or one call) submits it to Purple Codens for a PR. A 3-Retry loop auto-improves the patch up to a few times if tests fail.

Prerequisites

  1. A Codens account and organization.
  2. codens-mcp installed and logged in.
  3. Admin / write access on the target GitHub repository.
  4. Codens GitHub App installed (required for PR creation).
  5. For Sentry integration: Sentry organization owner / manager (required to create webhooks).

Step 1. Create a project & link a repo

Use the dashboard (app.red.codens.ai) → "New Project", or register the same repo across products via MCP:

await tools.codens_register_project_unified({ repo_full_name: "Corevice/your-repo", products: ["red", "purple"] });

During project creation, the GitHub App install status is checked. If missing, you'll be prompted into the install flow.

Step 2. Connect an error source

Using Sentry

  1. Red dashboard → Project → Integrations → Sentry → "Connect".
  2. Copy the webhook URL and signing secret into Sentry's Internal Integration.
  3. Configure Sentry alert rules to call the webhook for the issues you care about.

Inbound issues automatically create a bug report and kick off analysis.

Manual / agent intake

// Create and analyze in one shot await tools.red_bug_report({ action: "create", project_id: "...", title: "Login endpoint returns 500 on empty password", description: "...", severity: "high", auto_analyze: true });

Step 3. First fix plan → PR

// Generate a fix plan from the analyzed bug const plan = await tools.red_bug_fix_plan({ action: "generate", bug_id: "..." }); // Submit to Purple Codens to produce a PR const submission = await tools.red_bug_fix_plan({ action: "submit_to_purple", plan_id: plan.id }); // → workflow run starts and PR URL comes back

Simple single-file fixes can be PR'd directly via red_fix_proposal. Structural or multi-file fixes do better through the Purple chain.

Operational notes

Next steps