[Bug]: v1.4.0 远程压缩失败,回退 v1.2.56 恢复正常(0 from 0 output items)

Author: DengWorksCreated Sep 30, 2026Updated Sep 30, 2026

影响范围

协议转换 / 代理

当前行为

升级到 Codex++ v1.4.0 后,通过 CPA 的 Responses API 使用长会话, 触发上下文自动压缩时出现以下错误,无法继续当前任务:

Error running remote compact task: Fatal error: remote compaction v2 expected exactly one compaction output item, got 0 from 0 output items

回退到 Codex++ v1.2.56 后问题消失。

预期行为

正常完成上下文压缩并继续会话。 压缩代理应返回 Codex 能识别的完整输出项事件。

复现步骤

  1. 在 Windows 上使用 Codex++ v1.4.0,配置 CPA Responses 中转。
  2. 使用长会话,直到触发自动压缩。
  3. 观察上述 remote compaction v2 错误。
  4. 回退到 v1.2.56,重启后问题消失。

日志 / 配置片段

bash
以下是本机日志的脱敏摘录,时间为北京时间:

2026-09-30 13:20:48 [Codex++]
helper.protocol_proxy_compaction_ok
method=POST path=/v1/responses status=200 OK

2026-09-30 13:20:48 [Codex]
Failed to run pre-sampling compact

环境:
- Codex Desktop:26.924.2738.0
- 内置 Codex CLI:0.158.0-alpha.2.1
- 模型:gpt-6-astra
- model_provider:openai
- 上游协议:responses
- 系统:Windows 11,Build 26200
- CPA 具体版本:暂未记录

相关线索:
v1.4.0 的 CompactionSseConverter::finish 仅发送 response.completed,
没有发送 response.output_item.added / response.output_item.done。
这与 #2341 的报告及 PR #2342 的修改方向一致。
本机尚未抓取完整压缩 SSE,以上判断依据为日志、回退结果和发布源码。

相关报告:https://github.com/BigPizzaV3/CodexPlusPlus/issues/2341
候选修复:https://github.com/BigPizzaV3/CodexPlusPlus/pull/2342

Codex++ 版本

v1.4.0

系统

Windows

提交前确认

  • 我已经脱敏了 API Key、Token、账号等敏感信息。
  • 我已经确认这是当前最新版仍然存在的问题。

Source: BigPizzaV3/CodexPlusPlus