Skip to content

fix: model-turn dummy insert after rollback strip + remote-compaction unsupported hint - #7

Merged
WardLu merged 1 commit into
mainfrom
codex/fix-model-turn-rollback-miss
Aug 5, 2026
Merged

fix: model-turn dummy insert after rollback strip + remote-compaction unsupported hint#7
WardLu merged 1 commit into
mainfrom
codex/fix-model-turn-rollback-miss

Conversation

@WardLu

@WardLu WardLu commented Aug 5, 2026

Copy link
Copy Markdown
Owner

修复

  • --fix-model-turn 现在基于移除 thread_rolled_back 后的 effective 历史定位最后一条消息,而不是用原始 JSONL 末尾;修复了末尾有未完成/回滚 turn 的 user 消息、但有效历史以 assistant 结尾时跳过 dummy insert 的问题。
  • 新增远程压缩 v2 错误检测(remote compaction v2 expected exactly one compaction output item),报告打印友好提示:关闭远程压缩或切换支持远程压缩的供应商/模型后重试并重启 Codex。
  • 新增 --disable-remote-compaction(需 --apply 和用户同意),写入 remote_compaction_v2 = false 到 config.toml 的 [features],带备份。
  • 补充回归测试与远程压缩/配置写入测试,11 个用例全部通过。

…ort remote-compaction unsupported

- --fix-model-turn now locates the last effective message after stripping
  thread_rolled_back events, instead of using the raw JSONL tail, so it
  appends the dummy user message when the effective history ends with an
  assistant/model turn even if an unfinished or rolled-back turn left a
  trailing user message.
- Diagnose Codex remote-compaction-v2 failures and print a user-friendly
  hint (disable remote compaction or switch provider/model).
- Add --disable-remote-compaction flag (backup + config.toml write, requires
  user approval and --apply).
- Add regression tests.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@WardLu
WardLu merged commit da5696e into main Aug 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant