Skip to content

Fix exec inheritance of root shared flags#18630

Merged
etraut-openai merged 1 commit intomainfrom
etraut/fix-exec-root-shared-flags
Apr 20, 2026
Merged

Fix exec inheritance of root shared flags#18630
etraut-openai merged 1 commit intomainfrom
etraut/fix-exec-root-shared-flags

Conversation

@etraut-openai
Copy link
Copy Markdown
Collaborator

Addresses #18113

Problem: Shared flags provided before the exec subcommand were parsed by the root CLI but not inherited by the exec CLI, so exec sessions could run with stale or default sandbox and model configuration.

Solution: Move shared TUI and exec flags into a common option block and merge root selections into exec before dispatch, while preserving exec's global subcommand flag behavior.

Copy link
Copy Markdown
Contributor

@fcoury-oai fcoury-oai left a comment

Choose a reason for hiding this comment

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

The first issue about replicating the shared options for Review is not a blocked and can be either addressed as a follow-up PR or in this one if you prefer.

I think we should fix the other issue of conflicting permissions.

There are also some merge conflicts now on this PR. Once you take another pass and decide how to address those issues, I can do a final pass.

Comment thread codex-rs/cli/src/main.rs
Comment thread codex-rs/utils/cli/src/shared_options.rs
@etraut-openai etraut-openai force-pushed the etraut/fix-exec-root-shared-flags branch from 6527339 to e378372 Compare April 20, 2026 22:44
Copy link
Copy Markdown
Contributor

@fcoury-oai fcoury-oai left a comment

Choose a reason for hiding this comment

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

Only did a sanity check locally with exec and the good looks good. Approved.

@etraut-openai etraut-openai merged commit 0f1c9b8 into main Apr 20, 2026
25 checks passed
@etraut-openai etraut-openai deleted the etraut/fix-exec-root-shared-flags branch April 20, 2026 23:12
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 20, 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.

2 participants