You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: Feature request: Add a forced full-compression mode capable of overriding the content protection mechanism | [Feature]: 功能请求:增加可覆盖内容保护机制的强制全量压缩模式 #324
changed the title [-][Feature]: 功能请求:增加可覆盖内容保护机制的强制全量压缩模式[/-][+][Feature]: Feature request: Add a forced full-compression mode capable of overriding the content protection mechanism | [Feature]: 功能请求:增加可覆盖内容保护机制的强制全量压缩模式[/+]on Oct 16, 2026
Activity
ranxianglei commentedon Sep 12, 2026
ework接单 评估是因为bug导致的这个请求还是真的存在
ranxianglei commentedon Sep 12, 2026
评估结论:不是 bug 导致的,保护机制按设计工作;但确实存在一个真实缺口(硬保护内容缺少 per-call override)。需求真实存在,但范围比 OP 描述的窄得多。
验证过程(代码级)
1. OP 的核心前提在默认配置下不成立
compress.protectedTools默认值是["skill", "compress"](lib/config.ts:211),其中compress无论任何配置都强制保护(lib/config.ts:220,530)。protectedTools(把大量工具加进去了);②模型没有执行压缩(模型行为问题)。这两种情况都需要配置/日志才能定性——如果是情况①②且发生在默认配置下,那是另一个 bug,请提供acp.jsonc配置和会话日志单独排查。2. 硬排除是 v1.10.0+ 的有意行为(Bug 39 修复),不是缺陷
lib/compress/range.ts:144-178—filterProtectedToolMessages→filterLastUserMessage→filterProtectedRecentMessages,整段全是保护内容时抛硬错误"All selected messages were filtered out..."(range.ts:176)。gc.maxOldGenSummaryLength: 3000chars)而丢失语义权威性,所以改为硬排除、原位保留。3. 真实的痛点在哪(需求存在的依据)
dangerous: trueper-call override(lib/compress/pipeline.ts:420checkProtectedRange),但 protected tools /protectedFilePatterns/protectUserMessages没有任何 per-call override。模型尝试压缩含保护内容的 range 时,行为是"静默跳过保护部分 + 只压缩其余",或直接抛错——从用户视角看就像"ACP 拒绝压缩了",这大概率是本请求的产生方式:设计边界摩擦,不是 bug。建议(如决定做)
不建议新增独立的"强制全量压缩"操作 + 新确认窗口,复用现有机制即可,改动面最小:
dangerous: true语义,使其同时 bypassfilterProtectedToolMessages(+protectedFilePatterns)——与 recent zone 同一模式。不放开 first/last user message 保留(结构性安全,承载当前指令)。compress.permission: "ask"覆盖(opencode 原生确认弹窗):permission: "ask"+dangerous: true组合后,得到的正是请求者要的流程(AI 请求 → 用户确认 → 执行)。不需要重造 opencode 权限系统,也不需要自实现 5 秒超时拒绝。endId到当前阶段之前 +preserveRecentMessages/Tokens保护区,无需新机制。一句话总结
逐路径核实了代码:该请求不是 bug 导致(硬排除是 v1.10.0 起的有意行为,且默认配置下普通工具输出本就可压缩);真实缺口是硬保护内容缺少 per-call override,建议实现方向为扩展
dangerous: true覆盖面 + 复用permission: "ask"授权流,是否开工及风险取舍 (a)/(b) 由 owner 拍板。[-][Feature]: 功能请求:增加可覆盖内容保护机制的强制全量压缩模式[/-][+][Feature]: Feature request: Add a forced full-compression mode capable of overriding the content protection mechanism | [Feature]: 功能请求:增加可覆盖内容保护机制的强制全量压缩模式[/+]