Skip to content

Conversation

@charley-oai
Copy link
Collaborator

@charley-oai charley-oai commented Jan 21, 2026

Summary

  • add optional collaboration_mode to TurnContextItem in rollouts
  • persist the current collaboration mode when recording turn context (sampling + compaction)

Rationale

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

  • protocol: add optional collaboration_mode field to TurnContextItem
  • core: persist collaboration mode alongside other turn context settings in rollouts

@charley-oai
Copy link
Collaborator Author

@codex review this

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

@charley-oai charley-oai force-pushed the add-collaboration-mode-to-turn-context-item branch from ad2d90f to 77c9673 Compare January 21, 2026 04:39
@charley-oai
Copy link
Collaborator Author

@codex review this

@chatgpt-codex-connector
Copy link
Contributor

Codex Review: Didn't find any major issues. 🎉

ℹ️ 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".

@charley-oai charley-oai force-pushed the add-collaboration-mode-to-turn-context-item branch from 84252b3 to 8b00125 Compare January 21, 2026 21:54
@charley-oai
Copy link
Collaborator Author

@codex review this

@charley-oai charley-oai marked this pull request as ready for review January 21, 2026 21:56
Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

Comment on lines 3108 to 3111
let collaboration_mode = {
let state = sess.state.lock().await;
state.session_configuration.collaboration_mode.clone()
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Copy link
Collaborator Author

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

@charley-oai charley-oai merged commit fe641f7 into main Jan 21, 2026
30 of 32 checks passed
@charley-oai charley-oai deleted the add-collaboration-mode-to-turn-context-item branch January 21, 2026 22:14
@github-actions github-actions bot locked and limited conversation to collaborators Jan 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants