Skip to content

Conversation

@charley-oai
Copy link
Collaborator

Summary

This threads collaboration_mode_kind from TurnContext into client-visible turn events so TUI/VSCE can render plan/exec modes without relying on plan items.

What changed

  • Added collaboration_mode_kind: ModeKind to TurnStartedEvent.
  • Populated it from TurnContext at core turn entry points.
  • Carried it through app-server turn surfaces:
    • Turn.collaboration_mode_kind: Option<ModeKind>
    • Stored on turn start and emitted on turn completion/interruption.
  • Updated affected protocol + unit tests.

Why

Clients already observe turn lifecycle events. Surfacing the collaboration mode kind there is the simplest, most stable way to let clients special-case rendering for plan mode.

@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: e69ad4f446

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

items: Vec::new(),
error: None,
status: TurnStatus::Completed,
collaboration_mode_kind: None,
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 Preserve collaboration mode when rebuilding turn history

In ThreadHistoryBuilder, the new collaboration_mode_kind field is initialized to None but never updated anywhere in this file (repo-wide search in this file shows no assignments beyond this initializer). As a result, turn history reconstructed from stored events will always report collaboration_mode_kind: null even when the recorded turn.started event included a concrete mode. This makes the new client-visible signal disappear after reconnects/history fetches, which undermines the feature outside of the live stream.

Useful? React with 👍 / 👎.

@charley-oai charley-oai marked this pull request as draft January 25, 2026 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants