Skip to content

Keep TUI runtime overrides scoped to each backend - #65410

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/fb2f348d47d150d8d4d8a9bb11d04f0507c1c650
Dec 3, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/fb2f348d47d150d8d4d8a9bb11d04f0507c1c650

Conversation

@copyberry

@copyberry copyberry Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Keep TUI runtime overrides scoped to each backend

Why

Switching backends could carry the outgoing backend's interactive settings
into the destination. For example, resuming a session could use a directory
selected with /cd on a different backend. Saved permission overrides could
also reapply settings that a retained local thread had already superseded.

What changed

Save the working directory, approval policy, approvals reviewer, and
permission profile overrides with each backend. Use the destination's
overrides when preparing a start or resume, and adopt them only after the
switch succeeds.

Reconcile saved overrides with the active local thread's permissions on
attachment and when thread settings updates arrive. Drop conflicting
overrides and refresh a confirmed named profile's permissions for the
resumed directory.

Testing

Extend backend handoff tests to cover failed switches and retries,
isolation of resume parameters, and the first turn after returning to a
retained thread with newer server settings.

## Why

Switching backends could carry the outgoing backend's interactive settings
into the destination. For example, resuming a session could use a directory
selected with `/cd` on a different backend. Saved permission overrides could
also reapply settings that a retained local thread had already superseded.

## What changed

Save the working directory, approval policy, approvals reviewer, and
permission profile overrides with each backend. Use the destination's
overrides when preparing a start or resume, and adopt them only after the
switch succeeds.

Reconcile saved overrides with the active local thread's permissions on
attachment and when thread settings updates arrive. Drop conflicting
overrides and refresh a confirmed named profile's permissions for the
resumed directory.

## Testing

Extend backend handoff tests to cover failed switches and retries,
isolation of resume parameters, and the first turn after returning to a
retained thread with newer server settings.

GitOrigin-RevId: fb2f348d47d150d8d4d8a9bb11d04f0507c1c650
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/fb2f348d47d150d8d4d8a9bb11d04f0507c1c650 branch from 1c0be13 to c4c02a3 Compare December 3, 2026 05:09
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-03T05:11:47.851174Z 1c0be13 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@copyberry
copyberry Bot merged commit c4c02a3 into main Dec 3, 2026
9 of 23 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/fb2f348d47d150d8d4d8a9bb11d04f0507c1c650 branch December 3, 2026 05:10

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

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: 1c0be13168

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

&mut config,
RuntimePolicyOverrideScope::ExplicitOnly,
settings.config.approvals_reviewer,
&settings.runtime,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Use destination overrides when selecting the startup reviewer

When starting a new conversation on a backend with a saved runtime reviewer override, this applies the destination reviewer to config, but the subsequent new_session_execution() still checks self.runtime_approvals_reviewer_override from the outgoing backend. If the outgoing backend has no reviewer override and no config layer explicitly sets approvals_reviewer, apply_configured_reviewer() selects Invocation(None), so thread/start omits the destination's saved reviewer and uses the server default instead. Pass the staged destination runtime overrides into startup-choice construction too, so returning to a backend preserves its interactive reviewer selection.

Useful? React with 👍 / 👎.

@Tranthanh98
Tranthanh98 deployed to issue-triage December 3, 2026 05:42 — with GitHub Actions Active

This branch was successfully deployed

1 active deployment
issue-triage — c4c02a3b Deployed Dec 3, 2026 by GGBondBlueWhale via Generate label suggestions #67615
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.

8 participants