> ## Documentation Index
> Fetch the complete documentation index at: https://docs-dev.byterover.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent Review Workflow

> How coding and autonomous agents discover and handle reviews on your behalf

[Coding agents](/connectors/overview) (Claude Code, Cursor, Windsurf, etc.) and [autonomous agents](/autonomous-agents/overview) (OpenClaw, Hermes) can manage the review process for you. When a curation triggers a review, the agent sees the pending changes and can approve or reject them — with your permission.

## How agents discover reviews

There are two paths depending on whether the agent waits for curation to complete.

### Inline notification (default)

When an agent runs `brv curate` without the `--detach` flag, it waits for the curation to finish. If any operations are flagged for review, the review summary is printed directly in the command output:

```
✓ Context curated successfully. (Log: cur-1775299176764)

⚠  1 operation requires review (task: 30555b0f-b593-4c01-af3f-503f84f5a6bc)

  [UPSERT · HIGH IMPACT] - path: infrastructure/caching/caching_strategy.md
  Why:   Update caching strategy: replacing Redis with Memcached
  Before: Unified caching strategy with in-memory (L1) and Redis (L2) layers
  After:  Replaced Redis with Memcached, 10-minute TTL, LRU eviction

  To approve all:  brv review approve 30555b0f-b593-4c01-af3f-503f84f5a6bc
  To reject all:   brv review reject 30555b0f-b593-4c01-af3f-503f84f5a6bc
  Per file:        brv review approve/reject 30555b0f-... --file <path> [--file <path>]
```

The output includes:

* The task ID
* Each flagged operation with its type, impact, reason, and before/after summaries
* The exact `brv review approve` and `brv review reject` commands

The agent reads this output, presents the changes to you, and asks for your decision.

### Detached mode (`--detach`)

When an agent runs `brv curate --detach`, the command queues the curation and returns immediately without waiting for completion:

```
✓ Context queued for processing. (Log: cur-1775299231152)
```

Since the agent doesn't wait, it never sees the inline review notification. Instead, it uses `brv review pending` to check for unresolved reviews after the task completes:

```bash theme={null}
# Agent runs curation in detached mode
brv curate --detach "Update: switching from Redis to Memcache for caching"

# Later, agent checks for pending reviews
brv review pending

# Agent acts on the results
brv review approve <taskId>
```

This is the standard pattern for MCP-based integrations, where the coding agent calls `brv-curate` (which uses detached mode internally) and then follows up with `brv review pending`.

## The agent review loop

A typical agent-driven review follows this sequence:

```
1. Agent runs brv curate (or brv-curate via MCP)
       │
2. Agent checks for pending reviews
   (inline output or brv review pending)
       │
3. Agent presents changes to you:
   "This curation wants to update the caching strategy
    from Redis to Memcache. Approve or reject?"
       │
4. You respond ("approve", "reject", or give feedback)
       │
5. Agent runs brv review approve/reject <taskId>
       │
6. Done — changes are finalized or rolled back
```

## Agent review in practice

Any agent with a ByteRover connector (skill, MCP, rules, or hook) follows the same pattern. The connector teaches the agent the `brv review` commands, so it can:

* List pending reviews with `brv review pending`
* Approve or reject with `brv review approve/reject <taskId>`
* Selectively approve/reject files with `--file`
* Use `--format json` for structured parsing

The agent reads the review summary, presents the changes to you conversationally, and asks for your decision before running the approve or reject command.

**Example — OpenClaw handling a review:**

<Steps>
  <Step title="User asks OpenClaw to curate">
    ```
    Remember this: we're switching from Redis to Memcached for all caching.
    New TTL is 10 minutes with LRU eviction.
    ```
  </Step>

  <Step title="OpenClaw curates and discovers a pending review">
    <Card title="OpenClaw" icon="bot">
      I've curated the caching strategy update, but ByteRover flagged it as a high-impact change that needs your review.

      |               |                                                                    |
      | ------------- | ------------------------------------------------------------------ |
      | **Operation** | UPSERT · HIGH IMPACT                                               |
      | **File**      | `infrastructure/caching/caching_strategy.md`                       |
      | **Why**       | Update caching strategy: replacing Redis with Memcached            |
      | **Before**    | Unified caching strategy with in-memory (L1) and Redis (L2) layers |
      | **After**     | Replaced Redis with Memcached, 10-minute TTL, LRU eviction         |

      This changes your project's caching approach from Redis to Memcached. Should I **approve** or **reject** this change?
    </Card>
  </Step>

  <Step title="User responds">
    ```
    Approve it
    ```
  </Step>

  <Step title="OpenClaw approves the change">
    <Card title="OpenClaw" icon="bot">
      Done — approved `infrastructure/caching/caching_strategy.md`. The change is now finalized and eligible for push.
    </Card>
  </Step>
</Steps>

## Detach mode reference

| Scenario                | How the agent discovers reviews                                 |
| ----------------------- | --------------------------------------------------------------- |
| `brv curate` (no flags) | Review summary printed in stdout after task completion          |
| `brv curate --detach`   | Agent calls `brv review pending` to check after the fact        |
| MCP `brv-curate` tool   | Curation is queued (detached); agent calls `brv review pending` |

<Note>
  The `--detach` flag is useful when you don't want the agent to block while curation processes. The tradeoff is that the agent must explicitly check for reviews afterward using `brv review pending`.
</Note>

<Tip>
  If your agent runs unattended and you don't want to review changes at all, you can disable the HITL review log for the current project with `brv review --disable`. See [Disable the review log](/review/manage-reviews#disable-the-review-log) for the full behavior.
</Tip>

## Connector setup

To enable agent-driven reviews, your agent needs a ByteRover connector installed. The connector teaches the agent the `brv review` commands alongside `brv query` and `brv curate`.

```bash theme={null}
# Install a connector for your agent
brv connectors install "<agent name>"
```

For setup instructions, see [Coding Agent Connectors](/connectors/overview) and [Autonomous Agents](/autonomous-agents/overview).
