Skip to content

Conversation

@gpeal
Copy link
Collaborator

@gpeal gpeal commented Nov 23, 2025

This is a feature primarily for enterprises who centrally manage Codex updates.

Copy link
Collaborator

@joshka-oai joshka-oai left a comment

Choose a reason for hiding this comment

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

nit: It could be worth phrasing this in the positive (check_upgrades_on_startup) rather than the negative (skip...). But not a big deal either way.

Does this need a command line option as well as a config option? (A reasonable use case for this is automated scripts running codex where you don't want the update code to be triggered, but where you also don't want to have to modify the config.

@gpeal
Copy link
Collaborator Author

gpeal commented Nov 23, 2025

nit: It could be worth phrasing this in the positive (check_upgrades_on_startup) rather than the negative (skip...). But not a big deal either way.

Does this need a command line option as well as a config option? (A reasonable use case for this is automated scripts running codex where you don't want the update code to be triggered, but where you also don't want to have to modify the config.

Usually, I would phrase things in the positive direction but it makes it makes it harder to deduce whether we check for updates by default. The negative also allows the CLI arg (which is a good idea) to be a flag rather than k/v.

@gpeal
Copy link
Collaborator Author

gpeal commented Nov 23, 2025

nit: It could be worth phrasing this in the positive (check_upgrades_on_startup) rather than the negative (skip...). But not a big deal either way.
Does this need a command line option as well as a config option? (A reasonable use case for this is automated scripts running codex where you don't want the update code to be triggered, but where you also don't want to have to modify the config.

Usually, I would phrase things in the positive direction but it makes it makes it harder to deduce whether we check for updates by default. The negative also allows the CLI arg (which is a good idea) to be a flag rather than k/v.

@joshka-oai Actually, do you think -c skip_upgrade_check=true is sufficient? I'm not sure we want to get in the habit of adding a flag for every config.toml option.

@joshka-oai
Copy link
Collaborator

@joshka-oai Actually, do you think -c skip_upgrade_check=true is sufficient? I'm not sure we want to get in the habit of adding a flag for every config.toml option.

Yes - that's perfect. I forgot we could do that. No need for an actual flag when we can pass config directly.

@joshka-oai
Copy link
Collaborator

Usually, I would phrase things in the positive direction but it makes it makes it harder to deduce whether we check for updates by default. The negative also allows the CLI arg (which is a good idea) to be a flag rather than k/v.

In the cli flags we get to specify what the defaults are. Clap shows these in the help text. There's also an approach for true-false params that maps --no-key and --key to true/false.

In the config, we don't currently publish a json schema, but doing so would allow us to have that loaded and show what the default values are in editors that support using this for validating and documenting TOML (e.g. VSCode).

@gpeal
Copy link
Collaborator Author

gpeal commented Nov 24, 2025

Usually, I would phrase things in the positive direction but it makes it makes it harder to deduce whether we check for updates by default. The negative also allows the CLI arg (which is a good idea) to be a flag rather than k/v.

In the cli flags we get to specify what the defaults are. Clap shows these in the help text. There's also an approach for true-false params that maps --no-key and --key to true/false.

In the config, we don't currently publish a json schema, but doing so would allow us to have that loaded and show what the default values are in editors that support using this for validating and documenting TOML (e.g. VSCode).

I'm sure we can set the defaults but if one were to just see the config name, you'd then have to go read the docs or the source to know whether or not you (an average person) should enable it. With the naming in this direction, it makes it clear that "this is a thing you should opt-in to for this specific behavior".

Your perspective is valid though and I don't actually feel strongly because I typically default to positive naming. Wdyt?

@joshka-oai
Copy link
Collaborator

Your perspective is valid though and I don't actually feel strongly because I typically default to positive naming. Wdyt?

I'm fine with either way - I'm just 51:49 for using a positive name for this. That is to say. No need to change unless you feel strongly about it also. I can't think of a good reason this would ever bite us.

@etraut-openai
Copy link
Collaborator

I ran into this naming issue for the animation feature flag that I recently added. I chose animations (with a default of true) rather than no_animations or disable_animations. I don't have a strong opinion here, but I have a slight preference for positive flag names. Let's pick a rule and then apply it uniformly for all new feature flags.

/// When `true`, checks for Codex updates on startup and surfaces update prompts.
/// Set to `false` only if your Codex updates are centrally managed.
/// Defaults to `true`.
pub check_for_upgrades_on_startup: bool,
Copy link
Contributor

@gverma-openai gverma-openai Nov 24, 2025

Choose a reason for hiding this comment

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

naming nit: check_for_update_on_startup (update instead of upgrade as it's clearer IMO and also consistent the description, also singular feels cleaner but feel free to use plural).

@gpeal gpeal merged commit 3741f38 into main Nov 24, 2025
25 checks passed
@gpeal gpeal deleted the gpeal/suppress-updates branch November 24, 2025 20:04
@github-actions github-actions bot locked and limited conversation to collaborators Nov 24, 2025
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.

5 participants