-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Delegate review to codex instance #5572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@review this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea. It would be good to push it slightly further before merging in order to avoid duplicating some logic
adb72db to
6aad461
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is way better IMO
A bunch of tests would be cool
| <results> | ||
| {results} | ||
| </results> | ||
| </user_action> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tab issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does tab issue mean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The indentation of the file is not correct I think
6270245 to
2ff1aa3
Compare
2ff1aa3 to
159532a
Compare
💡 Codex Reviewhttps://github.com/openai/codex/blob/6270245a014cbaf466d2bac8474d6ae82f99e665/codex-rs/core/src/tasks/review.rs#L31-L54 The new delegate-based reviewer always returns ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
7200de2 to
4ddabaa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| }; | ||
| if !cancellation_token.is_cancelled() { | ||
| exit_review_mode(session.clone_session(), output.clone(), ctx.clone()).await; | ||
| } | ||
| None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CLI reviews emit no output after delegate change
The delegate now throws away the reviewer’s final response. In ReviewTask::run (lines 50‑54) the parsed review output is ignored and the task always returns None, so Session::on_task_finished emits TaskComplete { last_agent_message: None }. The only signal that remains is ExitedReviewMode. Clients such as the CLI (codex-rs/exec/src/event_processor_with_human_output.rs lines 156‑205 and 500‑505) render only last_agent_message and currently treat ExitedReviewMode as a no‑op, so invoking /review from the CLI (or other non-TUI frontends) now completes with no review output at all. We need to either return the reviewer’s final text here (as before) or update those clients to consume the structured review event, otherwise reviews outside the TUI are unusable.
Useful? React with 👍 / 👎.
|
@codex review this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
codex/codex-rs/core/src/codex.rs
Lines 1107 to 1111 in fd7a31c
| info!("spawning ghost snapshot task"); | |
| let task = GhostSnapshotTask::new(token); | |
| Arc::new(task) | |
| .run( | |
| Arc::new(SessionTaskContext::new(self.clone())), |
Lines 1107‑1111 unconditionally spawn GhostSnapshotTask every time maybe_start_ghost_snapshot runs, and run_task still invokes this helper for every turn (line 1675). The guard that previously short‑circuited when Feature::GhostCommit was disabled or when the turn was a review thread was removed, so ghost snapshots now run even when the feature is turned off in the session config. That causes unexpected repo writes and extra approvals for users who explicitly disabled snapshots. Please restore the feature/review checks so the background task only runs when snapshots are enabled.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review this |
💡 Codex Reviewcodex/codex-rs/core/src/tasks/review.rs Lines 104 to 112 in 7b729a5
The new delegate never forwards the reviewer’s final response. In ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good
A few comment left and our async discussion on the source of the SubAgent (to be piped to the client). Then, looks good to me
Ping me if you want another review
In this PR, I am exploring migrating task kind to an invocation of Codex. The main reason would be getting rid off multiple
ConversationHistorystate and streamlining our context/history management.This approach depends on opening a channel between the sub-codex and codex. This channel is responsible for forwarding
interactive(approvals) andnon-interactiveevents. Thetaskis responsible for handling those events.This opens the door for implementing
codex as a tool, replacingcompactandreview, and potentially subagents.One consideration is this code is very similar to
app-serverspecially in the approval part. If in the future we wanted an interactivesub-codexwe should consider usingcodex-mcp