Repository navigation
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6ed5560. Configure here.
| const windowTokens = Number(autoCompactWindow) | ||
| if (Number.isInteger(windowTokens) && windowTokens >= 100_000 && windowTokens <= 1_000_000) { | ||
| body.auto_compact_window = windowTokens | ||
| } |
There was a problem hiding this comment.
Inbound compact window not sanitized
Medium Severity
auto_compact_window is now a privileged job field, but inbound copies of it are never stripped. callerAutoCompactWindow only reads env, and prepareCliHopBody writes a validated value only when that env is in range. Otherwise officialMessagesBody still forwards a client-supplied top-level field, so it can override the panel/kernel default or reach the CLI with an unchecked number.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 6ed5560. Configure here.
6ed5560 to
c3ba720
Compare
c3ba720 to
3cc0203
Compare
默认跟随请求模型,调用方窗口经内部字段送到当前 job,面板值可热配置。
窗口在入站清理前提取,再经内部字段进入 native body。
窗口必须在 settings 删除前提取,再传给 native body。
Co-authored-by: ted <kuhlmangarry24@gmail.com>
Co-authored-by: ted <kuhlmangarry24@gmail.com>
3cc0203 to
aa08107
Compare


摘要
从已关闭的厨房水槽 #606 拆出的仅 auto_compact_window 变更(基于 main
670dd027)。routing.compatibility.auto_compact_window(100K–1M 或跟随模型)sanitizeInboundBody前提取CLAUDE_CODE_AUTO_COMPACT_WINDOW,经内部字段进入 CLI hop / native bodywriteKernelConfig写入 kernel 配置;清理后的 body 不再携带该 env明确不包含
CHANGELOG
「未发布」一条;未改 VERSION。
Note
Medium Risk
Changes inbound sanitization order and outbound CLI/kernel job shape for context-window sizing; bounded validation limits blast radius, but misconfiguration could affect compaction behavior for Claude Code hops.
Reviewed by Cursor Bugbot for commit 6ed5560. Configure here.