Codex CLI should announce when an updated version is available
What feature would you like to see?
The rate of updates to the codex CLI means that it can fall out of date quite quickly. It would be really nice if, when opening codex, it told me that there was a new version available.
It would also be nice if it was able to update itself as well (when I run a command to do so), but I realise that this might be more complicated as you would need to detect whether it was installed vis npm, brew, etc; and then update it appropriately.
As a workaround for that, it would even be useful if it just told me the upgrade command to run for npm or brew when showing that a new version is released. Bonus points if it detects which I used and shows me the appropriate command for my installation method.
Are you interested in implementing this feature?
Unfortunately I probably don't have capacity to work on it right now.
Additional information
See also:
- https://github.com/openai/codex/issues/1978
- https://github.com/openai/codex/issues/2639
- https://github.com/openai/codex/pull/2653
- > Thanks for sending this PR! However, the --upgrade option was intentionally removed and the help page is still outdated. The team will update the help page to inform the latest way to upgrade codex cli soon. Thanks again for your interest and time.
>
> _Originally posted by @seratch in https://github.com/openai/codex/issues/2653#issuecomment-3218553843_
9 Comments
I actually noticed this for the first time when I started codex today and was happy to get the notification!
<img width="453" height="268" alt="Image" src="https://github.com/user-attachments/assets/5fe192c7-e78c-48b3-947e-4f05103698b7" />
Not sure if that works the same on all platforms - I'm on macOS. I really like the idea of a single-command update, but this new feature is definitely a step in the right direction.
@someone-in-texas Interesting.. I thought I saw some commits recently alluding to a feature like that, but when I opened it this morning (knowing there was an update available) I didn't see it; maybe I was too quick to manually update.
Seems the update check was added in:
~/.codex/version.jsonlCARGO_PKG_VERSION\<latest_version, print a message at boot.And then more recently the banner was tweaked to be more visible in:
Looking at the relevant code for it, it seems it does already detect whether installed by
brewornpmand changes the command shown based on that as well:https://github.com/openai/codex/blob/4e9ad238649c71690cbb0402e110943223c16fcd/codex-rs/tui/src/lib.rs#L256-L301
Looking in my
~/.codexI don't see aversion.jsonl, but I do see aversion.json, and looking at the code, that seems to actually be the correct file:https://github.com/openai/codex/blob/4e9ad238649c71690cbb0402e110943223c16fcd/codex-rs/tui/src/updates.rs#L54-L59
It currently has the following:
The date is currently
'2025-08-28T02:07:56.052Z', so doing some quick maths:So I guess I just didn't see it this morning because it was within the 20hr window:
https://github.com/openai/codex/blob/4e9ad238649c71690cbb0402e110943223c16fcd/codex-rs/tui/src/updates.rs#L14-L30
While I understand the 20-hour window, I’d prefer to see an update straight away when I open the tool, or at least the first time each day in my timezone. The current approach isn’t far off a daily check anyway, it just drifts depending on when I last opened it. Switching to a 'once per local day' rule would make the behavior more predictable, and in practice wouldn’t increase load on the API: it still averages one request per day, with at most two in any 20-hour span.
So we could change the check to something like this:
Since the conversion from UTC to local time is handled in that check, we can continue storing the update check time in UTC, so wouldn't need to change this part:
https://github.com/openai/codex/blob/4e9ad238649c71690cbb0402e110943223c16fcd/codex-rs/tui/src/updates.rs#L66-L92
I agree - the "once per local day" idea makes a lot of sense. With the 20-hour window, there's always the chance it drifts and I end up missing a full workday's check, or getting a notification at an odd time. From a developer's perspective, having it tied to the start of each local day seems like it would make the behavior much more predictable and align better with a daily workflow. Really appreciate the detailed breakdown you shared!
It might be a bit more than most folks need, but it could be cool if the check frequency was configurable (within reason) in
config.toml. That way individual developers could tune it to their workflow, and organizations running Codex in a standardized environment would have the option to disable update notifications entirely and manage updates centrally instead.@someone-in-texas Happy to :) I figured I was looking for my own understanding, so may as well share what I found as context on the issue for everyone else's benefit too.
@someone-in-texas Yeah, that was my original thought as well, but then I started thinking that it might end up being too 'nit picky' of a configurable item and end up being more effort / complicate the code more than it's worth. That said, if the implementers were open to it, I wouldn't say no.
There should absolutely be a flag to enable/disable this. I'm running Codex off of a local git checkout, which makes the banner pointless, annoying, and intrusive:
✨⬆️ Update available! 0.0.0 -> 0.36.0.
Gee... thanks for letting me know. Look at me back here on 0.0.0.
People wanting to run a fixed version for whatever reason (who knows) may also appreciate a flag.
@fieldtensor Haven't personally tested this, but you could probably hack around that in the meantime by setting
last_checked_atin~/.codex/version.jsonto some date far in the future.As noted in the thread above, codex CLI now announces when a new version is available. Thanks again for the suggestion!
@etraut-openai Has the 20 hour window discussed above also been fixed to
Something more reasonable like 1 day?
If not; this probably shouldn't be closed?
@etraut-openai According to GitHub Codex (GPT-5), it's still an issue, so this shouldn't have been closed based on your reasoning in https://github.com/openai/codex/issues/2806#issuecomment-3458892095:
---
Edit: I just created a new issue for it specifically: