﻿---
title: "check_for_update_on_startup 只管 CLI 启动提示，不是自动安装"
summary: "默认 true。写成 false 只关掉 CLI 启动时的更新检查。桌面应用和 IDE 不读这个键；企业关桌面更新要写 requirements.toml。"
category: config
level: starter
surfaces: [cli, app]
tags: ["check_for_update_on_startup", "in_app_updates", "更新"]
canonical: /tips/check-for-update-on-startup/
---

# check_for_update_on_startup 只管 CLI 启动提示，不是自动安装

默认 true。写成 false 只关掉 CLI 启动时的更新检查。桌面应用和 IDE 不读这个键；企业关桌面更新要写 requirements.toml。

更新检查刷屏、或更新由 IT 统一发版时，把键写在用户 config 顶层，任何 `[table]` 之前：

```toml
check_for_update_on_startup = false
```

官方默认是 `true`：启动时检查，并可能弹出 Update available。它**不是** `codex update` 的自动安装，也不是还没落地的 `auto_update` 提案。关掉之后，要更新仍自己跑 `codex update` 或重装包。

写进 `[tui]`、`[features]` 或 `[notice]` 会静默变成节内字段，配置能加载、提示还在。有人把它放到文件中部，看起来没生效；挪到文件最顶部就好了。

维护者写明：这个键只对 CLI / TUI 生效。ChatGPT 桌面应用标题栏的 Update、IDE 扩展的更新，都不受它约束。企业要关桌面内置更新，写托管 `requirements.toml`，不要写进 `config.toml`：

```toml
[features]
in_app_updates = false
```

改完让用户完全退出再打开桌面应用。策略生效后设置里应显示 Managed。这一项不管 Codex CLI、IDE 扩展、手机应用，也不拦 Microsoft Store / MDM 从外面装包。

## 来源

- [OpenAI · Configuration reference](https://developers.openai.com/codex/config-reference)
- [OpenAI · Manage app updates](https://learn.chatgpt.com/docs/enterprise/manage-app-updates)
