Skip to content

Conversation

@charley-oai
Copy link
Collaborator

@charley-oai charley-oai commented Feb 2, 2026

Summary

This PR simplifies collaboration modes to the visible set default | plan, while preserving backward compatibility for older partners that may still send legacy mode
names.

Specifically:

  • Renames the old Code behavior to Default.
  • Keeps Plan as-is.
  • Removes Custom mode behavior (fallbacks now resolve to Default).
  • Keeps PairProgramming and Execute internally for compatibility plumbing, while removing them from schema/API and UI visibility.
  • Adds legacy input aliasing so older clients can still send old mode names.

What Changed

  1. Mode enum and compatibility
  • ModeKind now uses Plan + Default as active/public modes.
  • ModeKind::Default deserialization accepts legacy values:
    • code
    • pair_programming
    • execute
    • custom
  • PairProgramming and Execute variants remain in code but are hidden from protocol/schema generation.
  • Custom variant is removed; previous custom fallbacks now map to Default.
  1. Collaboration presets and templates
  • Built-in presets now return only:
    • Plan
    • Default
  • Template rename:
    • core/templates/collaboration_mode/code.md -> default.md
  • execute.md and pair_programming.md remain on disk but are not surfaced in visible preset lists.
  1. TUI updates
  • Updated user-facing naming and prompts from “Code” to “Default”.
  • Updated mode-cycle and indicator behavior to reflect only visible Plan and Default.
  • Updated corresponding tests and snapshots.
  1. request_user_input behavior
  • request_user_input remains allowed only in Plan mode.
  • Rejection messaging now consistently treats non-plan modes as Default.
  1. Schemas
  • Regenerated config and app-server schemas.
  • Public schema types now advertise mode values as:
    • plan
    • default

Backward Compatibility Notes

  • Incoming legacy mode names (code, pair_programming, execute, custom) are accepted and coerced to default.
  • Outgoing/public schema surfaces intentionally expose only plan | default.
  • This allows tolerant ingestion of older partner payloads while standardizing new integrations on the reduced mode set.

Codex author

codex fork 019c1fae-693b-7840-b16e-9ad38ea0bd00

@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: 675868a725

ℹ️ 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
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: d298a6d112

ℹ️ 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
Copy link
Collaborator Author

@codex review this

@charley-oai charley-oai changed the title Reduce modes variant to just Default | Plan (for now) Cleanup modes variants Feb 3, 2026
@charley-oai charley-oai changed the title Cleanup modes variants Cleanup Collaboration Mode Variants Feb 3, 2026
@charley-oai charley-oai changed the title Cleanup Collaboration Mode Variants Cleanup collaboration mode variants Feb 3, 2026
@charley-oai
Copy link
Collaborator Author

@codex review this

@chatgpt-codex-connector
Copy link
Contributor

Codex Review: Didn't find any major issues. Can't wait for the next one!

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

],
"default": null,
"description": "Start the TUI in the specified collaboration mode (plan/execute/etc.). Defaults to unset."
"description": "Start the TUI in the specified collaboration mode (plan/default). Defaults to unset."
Copy link
Collaborator

Choose a reason for hiding this comment

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

Defaults to unset - is this still accurate?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

"Defaults to unset" is still technically accurate for the config field itself:

  • tui.experimental_mode is Option with #[serde(default)], so missing value deserializes to None (schema default: null).

But behavior-wise, None now means:

  • no explicit override selected by the user, and then
  • if collaboration modes are enabled, startup resolves to the Default preset (not Plan) via the runtime fallback.

Comment on lines 370 to 371
// TODO (aibrahim): Consolidate config.model and config.model_reasoning_effort into config.collaboration_mode
// to avoid extracting these fields separately and constructing CollaborationMode here.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just want to point out that we need to think hard about migration path forward if we need to do that. Currently we are not even tracking them.

Comment on lines -124 to 125
Steer,
/// Enable collaboration modes (Plan, Code, Pair Programming, Execute).
/// Enable collaboration modes (Plan, Default).
CollaborationModes,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we just remove this? I am not sure if we are going to turn this off at anytime in the future.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess we have to also remove the enable flag on app side as we do that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Makes sense, will do in followup PR

Copy link
Collaborator

@shijie-oai shijie-oai left a comment

Choose a reason for hiding this comment

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

Overall looks straight forward - one concern I do have (might be outdated info) is when we go from plan -> code, we also tell the model that we are exiting plan mode. want to make sure that behavior is not lost. Also let @aibrahim-oai take another look.

@charley-oai charley-oai merged commit d509df6 into main Feb 3, 2026
48 of 53 checks passed
@charley-oai charley-oai deleted the modes-code-cleanup branch February 3, 2026 17:23
@github-actions github-actions bot locked and limited conversation to collaborators Feb 3, 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