Resolve & Fix Workflow

This is oversight's differentiator. Resolve doesn't just review code — it reads all review feedback, implements every fix, runs a full self-review CR loop until clean, reorganizes commits by area of concern, and pushes. End-to-end, from findings to fixed code.

Overview

The resolve workflow picks up a pull request and drives it to completion. It reads the PR description, diff, and all review comments, then systematically addresses every actionable finding — Critical, Important, and Suggestions alike. The goal is to finish the original author's work, not rewrite it.

After implementing fixes, resolve runs a full code review on its own changes using the same multi-agent review engine. If that review surfaces new findings, it fixes those too and reviews again. This loop continues until a complete round returns zero actionable findings. Only then does it push.

The Full Pipeline

Step 1: Build Context

Resolve starts by gathering everything it needs to understand the PR:

Step 2: Fix Merge Conflicts

Before addressing review findings, resolve checks the PR's merge status. If the branch has conflicts with the target, it runs a conflict resolution pass first using the merge-fix prompt. This ensures the codebase is in a clean state before any review fixes are applied.

Step 3: Implement Fixes

Resolve addresses every actionable finding from reviews and comments:

Resolve stays within the scope of what the PR is trying to accomplish. It does not refactor unrelated code or add unrelated features.

Step 4: Self-Review CR Loop

After implementing all fixes, resolve runs a full code review on its own changes. This is the same multi-agent review engine used for standalone reviews, including strategy selection:

If the self-review finds issues, resolve fixes them and runs the review again. The loop exits only when a complete round of all agents returns zero actionable findings.

The actionable threshold is absolute. Any bug is actionable regardless of estimated practical impact. A function that returns an invalid value for a subset of its inputs is a bug, not a "suggestion." The loop does not exit while known bugs exist.

Step 5: Reorganize Commits

After the CR loop exits clean, resolve reorganizes all its fix commits by area of concern and purpose. The original PR author's commits are left intact. Iterative fix-up commits like "fix lint" or "address review round 2" are eliminated — each final commit describes what was done and why.

Step 6: Quality Checks

Before pushing, resolve runs a full quality check sequence:

  1. Commitlint — if the repo uses conventional commits, all messages must comply
  2. Tests — the full test suite must pass
  3. Formatters — Prettier or equivalent must report clean
  4. Linters — ESLint or equivalent must pass
  5. Build — a full build must succeed (not just tsc --noEmit)

Step 7: Push and Verify

Resolve pushes to the PR branch and checks CI status. After pushing, it automatically approves any pending GitHub Actions workflow runs triggered by the new commits.

Fork PR Handling

When a PR comes from a fork where maintainerCanModify is false, resolve cannot push to the fork's branch. Instead, it creates a superseding PR:

  1. Pushes commits to a branch on the upstream repo (same branch name)
  2. Opens a new PR targeting the same base branch, with credit to the original author
  3. Comments on the original PR explaining the situation and linking the new PR
  4. Offers the original author the option to cherry-pick the fix commits instead

The resolution report notes the new PR number and links to it.

Triggering Resolve

API Request http
POST /api/tasks
Content-Type: application/json

{
  "repoId": 1,
  "itemNumber": 42,
  "taskType": "resolve",
  "params": {
    "reviewTaskId": "abc123-..."
  }
}

The optional reviewTaskId parameter links the resolve to a specific review. If omitted, resolve looks up the latest completed review for the PR. If no review exists, resolve still works — it reads PR comments and review threads directly from GitHub.

Configuration

Parameter Default Description
RESOLVE_TIMEOUT_MS 30 minutes Maximum wall-clock time for a resolve task. These do real development work, so the timeout is generous.
CLI_IDLE_TIMEOUT_MS 5 minutes Maximum time with no stdout output before the CLI is killed. Prevents hanging tasks.
CLI_HARD_TIMEOUT_MS 30 minutes Absolute ceiling regardless of activity. Safety net for runaway processes.

Monitoring Progress

Resolve tasks report progress in real time via Supabase Realtime. The progress object includes:

The web UI renders this as a live progress view with streaming output.

Resolution Report

When resolve completes, it produces a structured report separated by a ---RESOLUTION-REPORT--- marker. Everything after the marker is stored as the task result and shown in the UI. The report includes:

If the original review had a Notion page, the resolution report is also synced to Notion as a follow-up.

Retry and Error Handling

Resolve includes built-in retry logic for transient failures (API rate limits, network timeouts). If the Claude CLI encounters a retryable error, it backs off exponentially (30s, 60s, 90s) and retries up to 3 times.

Non-retryable failures (missing GitHub token, deleted PR branch, permission errors) fail immediately with a descriptive error message stored in the task record.

How It Differs from Review

Aspect Review Resolve
Output Markdown document with findings Committed code + resolution report
Modifies code No Yes — implements fixes, writes tests, pushes commits
Self-review loop No Yes — full multi-agent CR until clean
Timeout ~5 min idle / 30 min hard 30 minutes (doing real development work)
Merge handling N/A Fixes conflicts automatically before resolving
Fork support N/A Creates superseding PR when maintainerCanModify is false
Resolve never merges. It pushes code and verifies CI, but merging is always an explicit human decision. This keeps the human in the loop for the final ship/no-ship call.