Skip to content

feat(claude-code): recall status line under the prompt, and an evidence-based turn summary - #111

Merged
forrestlinfeng merged 4 commits into
mainfrom
claude/claude-code-status-line
Nov 23, 2026
Merged

forrestlinfeng merged 4 commits into
mainfrom
claude/claude-code-status-line

fix(relay): a recall that finished always answers a status, so "did n…

660dd35
Select commit
Loading
Failed to load commit list.
EvoMap-AIQA-Bot / sentinel review completed Nov 23, 2026 in 3m 19s

sentinel advisory review

Repository: evomap/evolver-agent-plugin
PR: #111
Head: 660dd35555151d34d8a00735a76c3102c20ad457
Task: task_6efe3ca386f5db200c96913338c7db08
Status: verified_needs_manual_review
Blocking findings: 0
Non-blocking verified findings: 0
Yellow advisory: 8
Blocking clusters: 0
Unresolved review items: 8
Prior-head recheck obligations: 0
Invalid review item statuses: 0
Pending gate reconciliation: 0
Pending result publication: 0
Review/CI integrity blockers: 0
Lineage cutover ready: true
Agent context: /api/v1/sentinel/pr-review-context?head_sha=660dd35555151d34d8a00735a76c3102c20ad457&owner_repo=evomap%2Fevolver-agent-plugin&pr_number=111

Yellow advisory summary:

  • p2 同步完成的 recall 不会显示终态状态: path: Claude Code 的 turn.start 触发 recall,且 recall 在 /event 响应返回前已同步完成、没有生成 late 延迟结果。 | mechanism: /event 解构并丢弃了 traced。只有存在 late 时才返回 RECALLING_STATUS;同步完成时直接返回 answer,未将 traced 经 recallStatusOf 转换为终态 status。客户端因此没有可写入 $.ui.status 的“已注入/无匹配/Proxy 未响应”等终态。 | probe: 为 relay 的 channel.handle('turn.start', ...) 构造一个返回 { traced: Promise.resolve(trace) }、不含 late 的同步 recall 结果;调用 /event,再执行 Claude Code hook 的 startTurn。 | facts: channel.handle() 的返回值被解构为 const { late, traced, ...answer },traced 不会进入 answer。; 当前返回逻辑仅在 late 存在时加入 status: RECALLING_STATUS。; late 不存在时...(truncated)
  • p2 已结束 turn 的 late recall 仍会写入全局状态行: path: turn.start 返回 late → turn 在 recall 完成前结束 → 尚未开始下一 turn → addWhenLanded() 的 /late 请求完成或失败 | mechanism: statusTurnId 只在 startTurn() 中更新,从未在 turn complete、fail、cancel 等结束路径失效。只要没有新 turn 开始,已结束 turn 的回调仍满足 turnId === statusTurnId,并在 finally 中调用 $.ui.status(...)。 | probe: 让 turn.start 的 recall 超过即时等待阈值并返回 late;在 recall 完成前结束或取消 turn;不要启动下一 turn;随后让 /late 返回或让 relay 请求失败。 | facts: startTurn() 新增 statusTurnId = e.turnId。; addWhenLanded() 在 finally 中以 turnId === statusTurnId 作为唯一活动性判断。; 状态写入使用全局的 $.ui.status(...),不是按 turn 隔离的状态对象。 | uncertainty: 当前上下文未...(truncated)
  • p3 及时完成的 recall 会因 late 为空而崩溃: path: 用户提交普通 composer prompt / promptSubmitted / recalled / const traced = text ? late.then(...) : null | mechanism: late 在协议中是可选的,recall 在等待窗口内完成时可以没有 late。当前代码只判断 text,对可能为 null/undefined 的 late 直接调用 .then()。 | probe: ** | facts: 当前 diff 将原本直接返回的 late 改为 const traced = text ? late.then(() => lastTrace) : null。; hosts/README.md 的 Answer 契约明确将 late 标记为可选:late?。; 当前 diff 对 task-notification 仅通过 text 为空来避免调用;普通 typed prompt 仍会进入 .then()。; 现有返回结构仍然保留 late 的可选语义:...(late && { late })。 | uncertainty: 未获取 recalled 的完整 head 文件,无法从当前上下文确认 late 的所有构造分支;但 late? 契约和旧代码...(truncated)
  • p3 同步 recall 的终态状态被 relay 丢弃: path: Claude Code 提交 prompt → /event → channel.handle() 在等待窗口内同步完成 recall,返回 traced 但不返回 late | mechanism: /event 从结果中解构并移除 traced,但只有存在 late 时才返回 RECALLING_STATUS 并把 trace 存入 lateBook。同步完成时直接返回 answer,没有调用 recallStatusOf(traced),导致新增的 Answer.status 无法表达同步的 injected、skipped、unavailable 等终态。 | probe: 在 relay 测试中让 channel.handle() 返回 { append: 'strategy', traced: Promise.resolve({ outcome: 'injected', name: 'Redis retries' }) } 且不包含 late,随后 POST /event。 | facts: 当前路由是 const { late, traced, ...answer } = await channel.handle(...)。; status: RECALLING_STATUS 只出现在 late ? { ... } : answer 的异步分支。; recallStatusOf(traced) 仅在 /late 的 `la...(truncated)
  • p3 新增的召回状态文案未接入运行时响应: path: Claude Code 提交普通用户提示,触发策略召回且产生 onTrace 结果。 | mechanism: 新增的状态生成函数没有被运行时代码导入或调用;Claude profile 仅将原始 traced 对象附加到响应,未将其转换为宿主可展示的 status 文本。因此新增的“recalling”“injected”“no strategy fits”等状态不会由此 diff 投射到提示词下方。 | probe: 安装该 PR 的 Claude Code 插件后,发送一个能命中策略库的正常长度提示;在召回结束后观察提示词下方的 $.ui.status 状态。 | facts: lib/recall-status.js 新增并导出 RECALLING_STATUS、recallStatusOf、arrivedLateStatusOf。; 当前完整 diff 中没有任何 import 或调用这三个导出。; hosts/claude-code/profile.js:58 的新增实现仅返回 { ...answer, late, ...(traced && { traced }) }。; 该新增文件的...(truncated)
  • p3 无 late 能力的宿主提交普通提示时会访问 null.then: path: 不支持 late 的宿主调用 promptSubmitted,用户提交包含文本的普通提示,且 ports.settings.recall !== false | mechanism: 新代码用 text ? late.then(() => lastTrace) : null 创建 traced,但 late 对不支持延迟 recall 的宿主按现有契约可以是 null。只要提示文本非空,就会执行 null.then(...)。 | probe: ** | facts: hosts/README.md 明确声明 late? 是可选能力,部分宿主不提供 late。; lib/app/prompt.js 新增代码为 const traced = text ? late.then(() => lastTrace) : null;。; 同一函数仍返回 late 的可选值,未将其统一为必定存在的 Promise。; 新增测试只覆盖了 Claude Code 的 late recall 路径,没有覆盖 late === null 的宿主。 | uncertainty: 未在当前上下文中看到所有宿主 profile 对 keepLate 的最终配置,但 README 契约已确认该...(truncated)
  • p3 recall 终态由生产端生成,但 relay/响应链未消费: path: recall 在当前请求内同步或及时完成 → 生成终态状态 → relay 构造响应 → 终态被丢弃,未进入运行时输出。 | mechanism: lib/recall-status.js 新增终态文案,turn/recall 流程也能产生同步完成状态,但 relay 或运行时响应组装没有把该终态传递给用户。生产者和消费者对状态事件的契约不一致。 | probe: 触发一个无需进入 late 路径、可在当前 turn 内完成的 recall,检查 relay 返回内容及宿主最终响应。
  • p3 可选 late 能力被当作 Promise 使用,导致运行时崩溃: path: 无 late 能力的宿主提交普通提示;或 recall 在当前 turn 内及时完成,使流程没有 late Promise,随后进入统一的 .then 处理。 | mechanism: 提示处理链把宿主可选的 late 返回值直接用于 .then。当宿主不提供 late-recall 能力时,该值为 null,但调用方没有按宿主能力分支处理。 | probe: 使用未声明 late 能力的宿主提交普通提示;另一路径是在 recall 同步或及时完成时执行相同响应流程。

Large PR review:

  • Size class: large
  • Review mode: sliced
  • Slice count: 8
  • Sentinel split this PR into review slices. This check stays in progress until the sliced review is aggregated.

Sentinel desired check mode: non_blocking.
Required-check usage is configured in GitHub Branch Protection; Sentinel reports its effective status as unknown.

Details

sentinel found non-blocking yellow advisory or P2/P3 review items. This Check remains neutral, including in required repositories; red P0/P1 and independent hard gates are unaffected.