core-agent-ide/codex-rs/mcp-server/src
dedrisian-oai 90a0fd342f
Review Mode (Core) (#3401)
## 📝 Review Mode -- Core

This PR introduces the Core implementation for Review mode:

- New op `Op::Review { prompt: String }:` spawns a child review task
with isolated context, a review‑specific system prompt, and a
`Config.review_model`.
- `EnteredReviewMode`: emitted when the child review session starts.
Every event from this point onwards reflects the review session.
- `ExitedReviewMode(Option<ReviewOutputEvent>)`: emitted when the review
finishes or is interrupted, with optional structured findings:

```json
{
  "findings": [
    {
      "title": "<≤ 80 chars, imperative>",
      "body": "<valid Markdown explaining *why* this is a problem; cite files/lines/functions>",
      "confidence_score": <float 0.0-1.0>,
      "priority": <int 0-3>,
      "code_location": {
        "absolute_file_path": "<file path>",
        "line_range": {"start": <int>, "end": <int>}
      }
    }
  ],
  "overall_correctness": "patch is correct" | "patch is incorrect",
  "overall_explanation": "<1-3 sentence explanation justifying the overall_correctness verdict>",
  "overall_confidence_score": <float 0.0-1.0>
}
```

## Questions

### Why separate out its own message history?

We want the review thread to match the training of our review models as
much as possible -- that means using a custom prompt, removing user
instructions, and starting a clean chat history.

We also want to make sure the review thread doesn't leak into the parent
thread.

### Why do this as a mode, vs. sub-agents?

1. We want review to be a synchronous task, so it's fine for now to do a
bespoke implementation.
2. We're still unclear about the final structure for sub-agents. We'd
prefer to land this quickly and then refactor into sub-agents without
rushing that implementation.
2025-09-12 23:25:10 +00:00
..
tool_handlers remove mcp-server/src/mcp_protocol.rs and the code that depends on it (#2360) 2025-08-18 00:29:18 -07:00
codex_message_processor.rs Review Mode (Core) (#3401) 2025-09-12 23:25:10 +00:00
codex_tool_config.rs Review Mode (Core) (#3401) 2025-09-12 23:25:10 +00:00
codex_tool_runner.rs Review Mode (Core) (#3401) 2025-09-12 23:25:10 +00:00
error_code.rs fix: update OutgoingMessageSender::send_response() to take Serialize (#2263) 2025-08-13 14:29:13 -07:00
exec_approval.rs chore: introduce ConversationManager as a clearinghouse for all conversations (#2240) 2025-08-13 13:38:18 -07:00
json_to_toml.rs Added allow-expect-in-tests / allow-unwrap-in-tests (#2328) 2025-08-14 17:59:01 -07:00
lib.rs fix: remove unnecessary flush() calls (#2873) 2025-08-28 22:41:10 -07:00
main.rs Added new auth-related methods and events to mcp server (#2496) 2025-08-20 20:36:34 -07:00
message_processor.rs chore: enable clippy::redundant_clone (#3489) 2025-09-11 11:59:37 -07:00
outgoing_message.rs feat: reasoning effort as optional (#3527) 2025-09-12 12:06:33 -07:00
patch_approval.rs chore: introduce ConversationManager as a clearinghouse for all conversations (#2240) 2025-08-13 13:38:18 -07:00