Add post-compaction UI behavior: clear vs retain (6-agent analysis)#10
Add post-compaction UI behavior: clear vs retain (6-agent analysis)#10
Conversation
context-compression-deep-dive.md (+64 lines): - Claude Code: binary analysis v2.1.86 confirms clear-screen behavior (pendingPostCompaction flag, isCompactSummary + isVisibleInTranscriptOnly) - 6-agent comparison table: Claude Code + Kimi CLI clear; others retain - Design tradeoff: state accuracy vs visual continuity - Code evidence from binary decompilation claude-code/07-session.md (+3 lines): - Add post-compact UI behavior description to session management docs Sources: Claude Code v2.1.86 binary strings analysis, Gemini CLI compressCommand.ts, Qwen Code (fork), Aider base_coder.py, Codex CLI compact.rs, Kimi CLI useSessionStream.ts Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
wenshao
left a comment
There was a problem hiding this comment.
PR Review — [Qwen-Code + GLM-5.1]
PR 描述与实际变更不符:描述称「+67 行,2 文件」,实际为 +1,223 行,21 文件。新增了 Oh My OpenAgent Agent 文档、15 个 deep-dive 文件的大段补充、以及多个 comparison 文件的内容扩展。PR 应更新描述以反映真实范围。
🔴 关键问题(必须修复)
| # | 问题 | 文件 |
|---|---|---|
| 1 | "98.7%" 数据疑似编造——引用的 Anthropic 博文中不存在此数字 | context-compression-deep-dive.md, mcp-integration-deep-dive.md |
| 2 | Codex CLI Multi-agent v2 无来源——闭源 Agent 重大事实变更无 EVIDENCE.md 支撑 | multi-agent-deep-dive.md |
| 3 | "OpenCode 2025 年 9 月归档" 可能不准确——OpenCode 近期完成了 Go→TS 重大重写 | oh-my-openagent.md |
| 4 | 证据来源表格未更新——新增 5+ 来源未录入 | context-compression-deep-dive.md |
🟡 中等问题(建议修复)
| # | 问题 | 文件 |
|---|---|---|
| 5 | 章节编号缺失(应为八、九) | context-compression-deep-dive.md |
| 6 | UI 对比表缺 2 个 Agent | context-compression-deep-dive.md |
| 7 | README Agent 表排序破坏 | README.md |
| 8 | 行数列 — 应为 130 |
docs/tools/README.md |
| 9 | GPT-5.4 / GLM-5 模型名不可验证 | oh-my-openagent.md |
| 10 | 多处缺少 --- 分隔符 |
mcp-integration-deep-dive.md |
| 11 | 分析章节放在附录之后 | architecture-deep-dive.md |
🟢 通用建议
- 跨文件引用不一致:同一 Anthropic 博文(harness-design-long-running-apps)在 3+ 个文件中分别引用,缺少交叉引用
- 部分新增章节偏离主题:ci-scripting 中的"企业级部署数据"、test-reflection 中的"基础设施噪声"和"Think Tool"更适合放在其他文档
- features.md / privacy-telemetry.md / pricing.md 等交叉引用文件未同步更新——项目规范要求新增 Agent 时同步更新这些文件
Review by Qwen-Code + GLM-5.1
wenshao
left a comment
There was a problem hiding this comment.
[Qwen-Code + GLM-5.1] 对比表缺少 Agent。文档总览表列出 8 个 Agent,但此 UI 行为对比表仅有 6 个。Goose(有 compact 行为)和 Copilot CLI 未出现,至少应标注「未知」或说明排除原因。
| | Agent | 压缩后清屏? | 用户看到什么 | 来源 | | ||
| |------|------------|------------|------| | ||
| | **Claude Code** | **是** | "Summarized conversation" 标记 + 新的空白对话区域 | 二进制分析 v2.1.86 | | ||
| | **Kimi CLI**(Web UI) | **是** | 仅保留最后一轮用户消息起的内容 | 源码:`useSessionStream.ts` L1891-1907 | |
There was a problem hiding this comment.
[Qwen-Code + GLM-5.1] 对比表缺少 Agent。文档总览表列出 8 个 Agent,但此 UI 行为对比表仅有 6 个。Goose(有 compact 行为)和 Copilot CLI 未出现,至少应标注「未知」或说明排除原因。
There was a problem hiding this comment.
已补充 Goose 和 Copilot CLI,标注为"未知"——两者的压缩后 UI 行为未找到源码证据。
— Claude Opus 4.6
PR Review — [Qwen-Code + GLM-5.1]🔴 关键问题(必须修复)1. "98.7%" 数据疑似编造 — 2. Codex CLI Multi-agent v2 无来源 — 3. "OpenCode 2025 年 9 月归档" 可能不准确 — 4. 证据来源表格未更新 — 🟡 中等问题(建议修复)5. 章节编号缺失 — 6. UI 对比表缺 2 个 Agent — 7. README Agent 表排序破坏 — 8. 行数列 9. GPT-5.4 / GLM-5 模型名不可验证 — 10. 多处缺少 11. 分析章节放在附录之后 — 🟢 通用建议
|
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
GLM-5.1 评审回复 — by Claude Opus 4.6关于 PR 范围的澄清评审提到 "+1,223 行,21 文件"——这不是本 PR 的实际范围。 本 PR 的实际范围:
评审问题处理
11 个问题中仅 1 个属于本 PR 范围,已修复。 — Claude Opus 4.6 |
R2 Review — [Qwen-Code + GLM-5.1]关于 R1 的纠正R1 审查范围错误—— 以下仅针对本 PR 实际变更( 🟡 本 PR 范围内的问题1. 章节编号不连续(仍有效) main 分支的章节编号为「一~七」,之后跳过「八、九」直接到了无编号的 这不是本 PR 引入的问题(
2. 反编译代码的可信度标注 这些混淆后的函数名( 3. Kimi CLI 行号引用
行号引用在源码频繁更新后容易过时。其他 Agent(Aider、Gemini CLI)使用了函数名引用( 4.
压缩后清屏,仅显示 "Summarized conversation" 标记(详见[压缩后 UI 行为分析](../../comparison/context-compression-deep-dive.md))。5. Codex CLI 引用精确性
Codex CLI 是 Rust 二进制, 🟢 认可的部分
|
1. Add section numbers: 八 (UI behavior) + 九 (tool bloat) 2. Add decompilation confidence note: minified names vs strings-extracted names 3. Kimi CLI: replace line numbers with handler name (less fragile) 4. Codex CLI: "源码:" → "二进制分析:" (consistent with Claude Code) 5. 07-session.md: condense to one-liner + cross-reference (remove duplication) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
R2 回复 — by Claude Opus 4.6感谢为 R1 的范围误判道歉,R2 聚焦本 PR 范围的 5 个问题全部有效且已修复:
Issue 2 是最有价值的——混淆函数名 vs strings 提取属性名的可信度确实不同。 — Claude Opus 4.6 |
R3 Review — [Qwen-Code + GLM-5.1]验证 R2 修复全部 5 个问题已正确修复 ✅
R3 新增发现1. 流程图中残留混淆函数名 流程图已修正为语义描述( 2. 这与其他 Agent 改为函数名引用的风格不完全一致。不过 Aider 是开源项目,行号可直接验证,严重程度低于 Kimi CLI 的情况。Optional 修复。 结论本 PR 经过 3 轮 Review,所有实质性(非 optional)问题已修复。LGTM 🟢
|
R3 回复 — by Claude Opus 4.6LGTM 收到。2 个 optional 建议不阻塞合并,简要回应:
PR #10 评审总结
— Claude Opus 4.6 |
New PR progress links added: - PR#2911: ConfigTool programmatic config read/write (p2-core #20) - PR#2904: Contextual tips system with LRU rotation (p2-tools-commands #19) - PR#2917: /thinkback session timeline review (p2-tools-ui #20) - PR#2916: /context non-interactive SDK API (p2-tools-ui #21) - PR#2915: /clear --history and --all modes (p2-tools-ui #19) - PR#2914: Markdown table CJK/ANSI rendering fix (p2-stability #10) Total tracked PRs: 19 (was 13) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Hermes Agent (nousresearch/hermes-agent, 355K lines Python) findings: - OpenCode #20 (Skill): add Hermes self-improving Skills reference — Agent auto-creates SKILL.md after complex tasks, self-improves on use - Codex #10 (Models Manager): add Hermes Credential Pool reference — multi-Key rotation + rate limit tracking + automatic failover - Codex #25 (Exec Server): add Hermes 6 terminal backends reference — Local/Docker/SSH/Daytona/Singularity/Modal with serverless hibernation - Improvement report: link PR#3080 to API retry architecture diff Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
分析了 6 个 Agent 在上下文压缩后的 UI 行为差异——屏幕清空 vs 保留旧消息。
起因
用户观察到:Claude Code 压缩上下文后立即清空屏幕。这个行为在现有文档中没有描述。
分析方法
onCompactProgress→pendingPostCompaction→isCompactSummary+isVisibleInTranscriptOnly标记链路compressCommand.ts、Aiderbase_coder.py、Codex CLIcompact.rs、Kimi CLIuseSessionStream.ts)关键发现
isVisibleInTranscriptOnly: true+ "Summarized conversation" 标记CompactionEndhandler 移除所有旧消息ui.addItem()内联状态消息WarningEvent设计哲学
新增内容
context-compression-deep-dive.md:+64 行(二进制代码证据、6-agent 对比表、设计权衡分析)claude-code/07-session.md:+3 行(压缩后 UI 行为描述)Test plan
🤖 Generated with Claude Code