Codex Lid Keeper v0.2.2 App Alpha — Completion Recovery / 结束恢复修复
Pre-releaseCodex Lid Keeper v0.2.2 App Alpha
English | 简体中文
We are looking for MacBook testers. Please use an open, hard,
well-ventilated desk and read the testing guide before trying closed-lid
operation.
English
What changed
This release closes a recovery gap between the two local activity sources.
If Codex writes a rollout task_complete marker but the matching Stop Hook
never arrives, Codex Lid Keeper now removes that exact stale Hook lease
immediately. Previously, the stale lease could keep closed-lid guarding active
until its hard timeout.
The cleanup key is the full session_id + turn_id, not just the session. A
late completion from an older turn therefore cannot cancel newer work in the
same Codex task. The main app applies the same evidence during live status
refresh, so the displayed count corrects itself without waiting for a daemon
write.
Why this matters
- missed, timed-out, or not-yet-trusted
StopHooks recover automatically; - sleep and brightness restoration are no longer delayed by that stale lease;
- newer work in the same session remains protected;
- rollout, Hook, and compatibility-log observations stay deduplicated.
Verification
48/48native Swift self-tests passed;- release binaries build with warnings treated as errors;
- isolated Hook configuration tests and dry-run lifecycle tests pass;
- the app remains source-built and ad-hoc signed.
Install or update
git clone https://github.com/Apex-Studio-He/codex-lid-keeper.git
cd codex-lid-keeper
./scripts/install.shFor an existing checkout:
git pull
./scripts/install.shThe standard macOS sudo prompt appears in Terminal. The app does not read or
store your administrator password. Existing app configuration is retained.
Please test
The most useful reports include:
- MacBook model and chip;
- macOS and Codex versions;
- AC-only or battery-enabled mode;
- whether one, two, and three concurrent tasks are counted correctly;
- whether the count falls immediately when each task ends;
- whether work continues after a supervised lid close;
- whether sleep policy and display brightness restore after the final task.
Use the
Alpha testing guide
and submit results through the
tester issue form.
Do not post prompts, transcripts, full Hook files, or unsanitized local paths.
Safety
This is experimental software using the undocumented macOS
pmset disablesleep setting. Never run a closed MacBook inside a bag, sleeve,
drawer, bed, sofa, or other enclosed space. Keep the first test supervised and
stop if the machine becomes unusually warm.
简体中文
这个版本仍在招募 MacBook 实机测试者。合盖测试前请先阅读测试指南,并把电脑
放在坚硬、开阔、通风良好的桌面上。
这次修了什么
这次补上了两条本地任务信号之间的一个恢复缺口:Codex 已经在 rollout 里写下
task_complete,但对应的 Stop Hook 因超时、尚未信任或其他原因没有送达时,
Codex Lid Keeper 现在会立刻清掉那一条残留租约。旧版本可能要等到硬超时后才
退出守护。
清理使用完整的 session_id + turn_id,不会只按会话粗略处理。因此旧 turn
迟到的结束信号,不会误伤同一会话里刚开始的新任务。主界面的实时状态也会马上
采用这条完成证据,不用等后台进程下一次写回。
你会得到什么
StopHook 偶尔漏送时可以自动恢复;- 不会因为一条陈旧租约拖延睡眠设置和亮度恢复;
- 同一会话里的新任务仍会继续受到守护;
- rollout、Hook 和兼容日志仍然会正确去重。
已完成的验证
48/48项 Swift 自测通过;- release 构建开启 warnings-as-errors 后通过;
- Hook 配置测试和隔离 dry-run 生命周期测试通过;
- App 仍然是本机源码构建和 ad-hoc 签名。
安装或更新
首次安装:
git clone https://github.com/Apex-Studio-He/codex-lid-keeper.git
cd codex-lid-keeper
./scripts/install.sh已有仓库:
git pull
./scripts/install.sh管理员密码仍由 macOS 在终端里通过标准 sudo 流程询问,App 不会读取或保存
密码。更新不会清空现有配置。
希望你帮忙测试
反馈里最好包含:
- MacBook 型号和芯片;
- macOS 与 Codex 版本;
- 使用“仅接电”还是“允许电池”模式;
- 1、2、3 个并发任务的数量是否准确;
- 每个任务结束后,数量是否及时减少;
- 人在旁边观察时,合盖后任务是否继续;
- 最后一个任务结束后,睡眠设置和屏幕亮度是否恢复。
请先阅读
Alpha 测试指南,
再通过
测试反馈表
提交结果。不要上传提示词、对话内容、完整 Hook 文件或没有处理过的本机路径。
安全提醒
这是实验性软件,依赖 macOS 没有公开文档的 pmset disablesleep。不要把合盖
运行中的 MacBook 放进背包、内胆包、抽屉、床铺、沙发或其他不通风的空间。
第一次测试请全程观察,机器异常发热时立即停止。