-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Add collaboration_mode to TurnContextItem #9583
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
Add collaboration_mode to TurnContextItem #9583
Conversation
|
@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.
Reviewed commit: ad2d90f1d6
ℹ️ 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".
ad2d90f to
77c9673
Compare
|
@codex review this |
|
Codex Review: Didn't find any major issues. 🎉 ℹ️ 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". |
84252b3 to
8b00125
Compare
|
@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.
Reviewed commit: 8b001256f2
ℹ️ 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-rs/core/src/codex.rs
Outdated
| let collaboration_mode = { | ||
| let state = sess.state.lock().await; | ||
| state.session_configuration.collaboration_mode.clone() | ||
| }; |
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.
Persist the turn’s collaboration mode snapshot
If collaboration mode can change while a turn is in flight (e.g., an Op::OverrideTurnContext/settings update arrives after the turn starts), this code records the current session configuration rather than the mode that actually produced the prompt. That makes the rollout’s TurnContextItem misleading for resume/diff logic, because the stored mode can differ from the one used in this turn. Consider storing collaboration_mode on TurnContext at creation and persisting that snapshot instead (the same pattern appears in the compact task).
Useful? React with 👍 / 👎.
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.
We're ok with this for now
Summary
collaboration_modetoTurnContextItemin rolloutsRationale
We already persist turn context data for resume logic. Capturing collaboration mode in the rollout gives us the mode context for each turn, enabling follow‑up work to diff mode instructions correctly on resume.
Changes
collaboration_modefield toTurnContextItem