2.1 KiB
2.1 KiB
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 月前稳定版 |
防升级措施(四层)
- CLI:
~/.codex/config.toml顶层check_for_update_on_startup = false - Sparkle(桌面 App):
defaults write com.openai.codex SUEnableAutomaticChecks -bool false - 文件锁:
chflags uchg锁定/Applications/Codex.app - hosts 阻断:
persistent.oaistatic.com、downloads.openai.com→0.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/TUI);靠 uchg 文件锁 防覆盖。 - 若需其它 5 月 App 构建,可换用
codex_full_reset_20260528同期备份或带.dmg的较新 pre-release(如 0.138.0-alpha.6)。
进度
- GitHub 下载 0.135.0 CLI
- 恢复 5 月 Codex.app
- config 关更新检查
- uchg 锁定
- 脚本 + 开发文档