Files
karuo-ai/01_卡资(金)/金仓_存储备份/Codex版本锁定/开发文档/Codex降级锁定_20260617.md
2026-07-19 00:21:46 +08:00

2.1 KiB
Raw Blame History

Codex 降级锁定2026-06-17

目标

从 GitHub 安装 2026 年 6 月以前 的 Codex并禁止自动升级。

已执行版本

组件 版本 来源
Codex.app 26.519.81530 本机 2026-05-28 备份
codex CLI 0.135.0 rust-v0.135.0
发布日期 2026-05-28 6 月前稳定版

防升级措施(四层)

  1. CLI~/.codex/config.toml 顶层 check_for_update_on_startup = false
  2. Sparkle桌面 Appdefaults write com.openai.codex SUEnableAutomaticChecks -bool false
  3. 文件锁chflags uchg 锁定 /Applications/Codex.app
  4. hosts 阻断persistent.oaistatic.comdownloads.openai.com0.0.0.0

一键启用:

bash "…/Codex版本锁定/脚本/codex_block_updates.sh" on

关闭(恢复可升级):

bash "…/Codex版本锁定/脚本/codex_block_updates.sh" off

一键重装脚本

bash "/Users/karuo/Documents/个人/卡若AI/01_卡资/金仓_存储备份/Codex版本锁定/脚本/codex_pin_version.sh"

换其它 5 月 tag

bash …/codex_pin_version.sh rust-v0.134.0

解锁升级

chflags -R nouchg /Applications/Codex.app
chflags nouchg /usr/local/bin/codex

备份位置

  • 降级前新版:~/Documents/卡若Ai的文件夹/1、金_资产存储/备份/系统/codex_pin_0.135.0/Codex.app.before_downgrade
  • GitHub 包:…/codex_pin_0.135.0/codex-aarch64-apple-darwin.tar.gz

注意

  • 从备份/GitHub 恢复的 App 可能弹 「已损坏」:执行 xattr -cr /Applications/Codex.app && codesign --force --deep --sign - /Applications/Codex.app(脚本已内置)。
  • 桌面 App 的「更新」按钮不受 check_for_update_on_startup 控制(仅 CLI/TUIuchg 文件锁 防覆盖。
  • 若需其它 5 月 App 构建,可换用 codex_full_reset_20260528 同期备份或带 .dmg 的较新 pre-release如 0.138.0-alpha.6)。

进度

  • GitHub 下载 0.135.0 CLI
  • 恢复 5 月 Codex.app
  • config 关更新检查
  • uchg 锁定
  • 脚本 + 开发文档