Skip to content

feat(claude-code): end every recalled-for turn with a notice, and lead the status line with its decision - #112

Merged
forrestlinfeng merged 5 commits into
mainfrom
claude/status-line-notice
Nov 25, 2026
Merged

forrestlinfeng merged 5 commits into
mainfrom
claude/status-line-notice

Conversation

@forrestlinfeng

Copy link
Copy Markdown
Contributor

Problem

v1.0.17 brought back the status line, but two things were still wrong in Claude Code:

  1. Most turns ended with no notice. The turn-end notice only appeared when a strategy was booked to the turn. These turns got none:

    • Recall found no match.
    • The recall landed after the model's only step, so it was never booked.
    • The recall was still running when the turn ended.

    Short Q&A turns usually fall into the last two cases.

  2. The status line cut off the strategy name. Claude Code already prints evolver-plugin before the line, and our own evolver · prefix plus (the Hub returned N) took up the rest. A narrow window showed evolver · injected "Implement and review ….

Change

  • End-of-turn notice for every turn that recalls. The relay keeps each turn's recall trace, and whether a model step carried what was injected. When a turn ends without the turn summary, the relay answers turn.complete with what the recall did:

    Case Notice
    No match Evolver · ○ no EvoMap strategy fits this prompt
    Hub returned candidates, none used Evolver · ○ none injected · Hub returned 2, none relevant or new
    Landed after the model's last step Evolver · ○ "Name" was recalled after the model's last step, so this turn did not use it
    Still running at turn end Evolver · ! recall had not finished when this turn ended, nothing injected
    Proxy did not answer Evolver · ! recall skipped · Evolver Proxy did not answer (/evolver-status)

    A turn that booked a strategy keeps its existing summary. Slash commands and task notifications don't recall, so they get no notice.

  • Shorter status line. The evolver · prefix is gone and each line starts with a mark: ✓ injected, ○ none, ! problem, ⟳ recalling. Names are cut at 32 characters with …. The Hub count only appears when nothing was injected.

    Example: evolver-plugin ✓ injected "Implement and review the change…"

Notes for review

  • No colour. $.ui.status, $.ui.toast and the turn.complete text are plain text in this Claude Code build. The only coloured surface on the desktop app is an AbovePrompt band, which is left for a follow-up if wanted.
  • Older hooks modules still work. An older module already shows any turn.complete text, so it gets the new notice without changes.
  • Other hosts are unchanged. Their turn summary (lib/turn-summary.js) and wording are untouched.

Testing

  • Added test/recall-status.test.js cases for the new wording, name cutting and the unreported-turn notice.
  • Added a relay test: a turn with no match ends with its notice, exactly once.
  • Updated relay and Claude Code module tests to the new wording.
  • Full npm test has 37 failures, and main has the same 37 on this machine: kimi, installer, acp and others. None are related to this change.
  • Not yet tried in a live Claude Code session. Loading the dev mod next to the installed 1.0.17 would send duplicate reuse reports.

🤖 Generated with Claude Code

…d the status line with its decision

A turn whose recall reported no strategy ended without a notice: no match, a recall that landed after the model's only
step, or one still running when the turn ended. The relay now keeps each recalled-for turn's trace and whether a model
step carried what it injected, and ends such a turn with what its recall did.

The status line drops its own "evolver ·" prefix, which the host already shows as the plugin's name, opens with a
mark (✓ ○ ! ⟳), and cuts a strategy name at 32 characters with an ellipsis, so the name fits beside the label.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@evomap-aiqa-bot

evomap-aiqa-bot Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Sentinel 已审核此变更,未发现已核验问题,但发现需要人工确认的风险。

另有 3 个需要人工确认的风险;黄色 advisory 不阻塞合并,建议开发 agent review advisory 评论并逐条确认。

开发 agent 查询详情: 调用 MCP 工具 sentinel_pr_review_context,传入 owner_repo="evomap/evolver-agent-plugin"、pr_number=112、head_sha="a306979e51ccc80519584a455e4c0f8ee576f181",并按条目追加 finding_id 或 finding_key。

由 Sentinel 审核 · 目标提交 a306979e51cc

@evomap-aiqa-bot

Copy link
Copy Markdown

Sentinel 保留了 3 个尚未确认的审核候选。这些黄色条目不阻塞合并;红色 P0/P1 与其他独立硬门禁不受影响。 单一猜测、缺少变更行证据或纯 checklist 的候选会统一降为 P3。
开发 agent:请 review 以下 advisory,并逐条给出“已验证无风险 / 已修复 / 转为后续事项”的结论;不要只做整体确认。

  • [P3] 回合状态仅以 turn_id 索引,会串扰不同会话 — 新增的 turnRecalls 用裸 turnId 作为全局 Map 键,而路由事件载荷同时包含 session_id。后一...(truncated) · lib/channels/relay/server.js · advisory_4846f101f9c7c9689a13f46b
  • [P3] 回忆已加入时仍可能在回合总结中被误报为未使用 — lates.joined() 要先 await entry.join(),成功后才执行 turns.joined(turnId);若 turn.complete 在这两...(truncated) · lib/channels/relay/server.js · advisory_984a2e92337f8a996ef9fadc
  • [P3] reset/clear 后可能缺少 in-flight completion 防护 — 状态链探针:reset/clear path touches async state but no abort/generation fence is visible for in-flight completion...(truncated) · lib/channels/relay/server.js · slice:whole_pr:state_chain_7a4c574b123449eb

需要完整证据时,可用行末 finding_key 查询 Sentinel PR review context。

由 Sentinel 审核 · 目标提交 a306979e51cc

…fter its join answers

Two sessions on one relay could share a turn id and overwrite each other's recall record. A turn that ended while its
strategy's join was still in flight was told the strategy went unused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@evomap-aiqa-bot

evomap-aiqa-bot Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Sentinel 已审核此变更,未发现已核验问题,但发现需要人工确认的风险。

另有 7 个需要人工确认的风险;黄色 advisory 不阻塞合并,建议开发 agent review advisory 评论并逐条确认。

开发 agent 查询详情: 调用 MCP 工具 sentinel_pr_review_context,传入 owner_repo="evomap/evolver-agent-plugin"、pr_number=112、head_sha="34cb684da122ab32049b69acb8708baa31a9844d",并按条目追加 finding_id 或 finding_key。

由 Sentinel 审核 · 目标提交 34cb684da122

@evomap-aiqa-bot

Copy link
Copy Markdown

Sentinel 保留了 7 个尚未确认的审核候选。这些黄色条目不阻塞合并;红色 P0/P1 与其他独立硬门禁不受影响。 单一猜测、缺少变更行证据或纯 checklist 的候选会统一降为 P3。
开发 agent:请 review 以下 advisory,并逐条给出“已验证无风险 / 已修复 / 转为后续事项”的结论;不要只做整体确认。

  • [P3] 并发回合超过上限时,较早回合会丢失结束通知 — turnRecalls.started() 在记录数超过 MAX_LATE 时直接删除最早的回合状态。被删除回合到达 turn...(truncated) · lib/channels/relay/server.js·advisory_4c59e40ae0e7bc29ef6dd0b8`
  • [P3] 未完成的 join 会无限阻塞 turn.complete — /late/join 把无超时的 join Promise 写入 turn.joining;新增的 ended() 随后直接 await turn.joining...(truncated) · lib/channels/relay/server.js · advisory_fa82312b8b422841a67985de
  • [P3] 回合结束与策略加入并发时会误报“未使用” — ended() 在等待已登记的 joining Promise 前,立即从 turns 删除该回合;若 /late/join 在此后...(truncated) · lib/channels/relay/server.js · advisory_29221bea8ca5056f9321c7b3
  • [P3] 容量淘汰可能绕过较早回合的结束通知 — 并发活跃回合超过保留上限时,如果直接淘汰较早回合而未先完成、取消或转移其通知,状...(truncated) · lib/recall-status.js · advisory_b7b11d6fc4a861dab0c3e66d
  • [P3] 未完成的 join 可能阻断回合完成链路 — turn.complete 消费方若等待所有 join 完成,而 join 生产方没有超时、取消或异常清理路径,...(truncated) · lib/recall-status.js · advisory_7bce2a38c276df72e67b1872
  • [P3] 结束与 join 注册并发时可能错误标记为未使用 — 回合结束判定与策略 join 注册缺少明确的原子顺序或封闭状态。结束逻辑可能先读取“无 jo...(truncated) · lib/recall-status.js · advisory_5d207eaaaf918626fd715806
  • [P3] 运行时发布产物被排除,发布完整性未被验证 — 该变更文件被 size_report.skipped_files 排除,但风险域包含 release_integrity。若 dist 是实际打...(truncated) · hosts/claude-code/dist/hooks/register.ts · advisory_ca66dc428ce1367628830678

需要完整证据时,可用行末 finding_key 查询 Sentinel PR review context。

由 Sentinel 审核 · 目标提交 34cb684da122

…two seconds

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@forrestlinfeng

Copy link
Copy Markdown
Contributor Author

Sentinel advisories on 34cb684, and the earlier head:

Fixed

  • turn_id keyed without the session. Turns are now keyed by [session_id, turn_id]. There is a new relay test: two sessions sharing t1 each end with their own notice. It fails on the old code. (34cb684)
  • Join finishing after the turn ended. ended() now waits for an in-flight /late/join before writing the notice, so a strategy being joined is not reported as unused. (34cb684)
  • A join that never settles blocks turn.complete. The wait is now capped at 2 s (JOIN_WAIT_MS). After that the turn ends with the notice. (this commit)

Not reachable, no change

  • /late/join arriving after turn.complete for the same turn. The hooks module books in turn.step and awaits that /late/join before the step continues. turn.complete comes after the last step and first drops the turn's carried strategy. So for one turn, a join is always answered before its turn.complete is sent.
  • MAX_LATE (64) eviction drops an older turn's notice. One relay serves one Claude Code session, and only one main turn runs at a time. 64 open recalled-for turns can't happen. The cap is only a leak guard for turns that never end.
  • dist/hooks/register.ts skipped as a release artifact. It is source: Claude Code loads the TypeScript directly, and test/hosts/claude-code/module.test.js exercises it. This PR only changes one string in it.
  • Generic reset/clear state-chain probe. It names no path. The only clear is ended(), which reads and deletes its own turn's record.

@evomap-aiqa-bot

evomap-aiqa-bot Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Sentinel 已审核此变更,未发现已核验问题,但发现需要人工确认的风险。

另有 5 个需要人工确认的风险;黄色 advisory 不阻塞合并,建议开发 agent review advisory 评论并逐条确认。

开发 agent 查询详情: 调用 MCP 工具 sentinel_pr_review_context,传入 owner_repo="evomap/evolver-agent-plugin"、pr_number=112、head_sha="848abe308de1756c17244f7193a6a8762d51c557",并按条目追加 finding_id 或 finding_key。

由 Sentinel 审核 · 目标提交 848abe308de1

@evomap-aiqa-bot

Copy link
Copy Markdown

Sentinel 保留了 5 个尚未确认的审核候选。这些黄色条目不阻塞合并;红色 P0/P1 与其他独立硬门禁不受影响。 单一猜测、缺少变更行证据或纯 checklist 的候选会统一降为 P3。
开发 agent:请 review 以下 advisory,并逐条给出“已验证无风险 / 已修复 / 转为后续事项”的结论;不要只做整体确认。

  • [P3] join 超过 2 秒后仍成功,回合却已被总结为“未使用” — ended() 只等待 join 2 秒;超时后立即根据仍为 false 的 isJoined 生成“模型最后一步后才召...(truncated) · lib/channels/relay/server.js · advisory_ffa6f0ce4cf96b8ffb2055be
  • [P3] 回合结束与策略加入并发时可能显示错误的“未使用”总结 — ended() 读取并立即从 turns 删除回合记录;若 /late/join 在删除之后才到达,turns.joining() ...(truncated) · lib/channels/relay/server.js · advisory_27f1d79e4ff12de7ae3fb1eb
  • [P3] 并发回忆超过 64 个时较早回合丢失结束通知 — turnRecalls.started() 在 turns 超过 MAX_LATE 时直接删除最早回合;该回合随后执行 turn.complete...(truncated) · lib/channels/relay/server.js·advisory_71334b55d7cf82dcddf8f378`
  • [P3] 64 项容量淘汰会切断仍在运行回忆的结束通知 — 状态存储以固定 64 项容量淘汰较早回合,但淘汰条件似乎只依据顺序或数量,没有保护仍...(truncated) · lib/recall-status.js · advisory_75b512559407b513b6b7a95d
  • [P3] 加入超时与实际成功使用不同一状态,导致回合被错误总结为“未使用” — 状态汇总将“2 秒内未完成 join”当成最终未使用,但 join 操作在超时后仍可成功。超时控...(truncated) · lib/recall-status.js · advisory_225ae229be03d5e019f42282

需要完整证据时,可用行末 finding_key 查询 Sentinel PR review context。

由 Sentinel 审核 · 目标提交 848abe308de1

… not unused

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@forrestlinfeng

Copy link
Copy Markdown
Contributor Author

Sentinel on 848abe3: a join that answers after the 2 s wait was still told as unused, although it may yet succeed. Fixed in 5c1e18c: such a turn now ends with ✓ injected …. The rest repeat items already answered in the comment above: the join-after-delete ordering, which the module rules out, and the 64-turn eviction, which needs 64 open turns in one session.

@evomap-aiqa-bot

evomap-aiqa-bot Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Sentinel 已审核此变更,未发现已核验问题,但发现需要人工确认的风险。

GitHub CI 未通过。 此状态来自当前 CI gate,不是 Sentinel finding;请以最新 CI attempt 的日志为准。

另有 3 个需要人工确认的风险;黄色 advisory 不阻塞合并,建议开发 agent review advisory 评论并逐条确认。

开发 agent 查询详情: 调用 MCP 工具 sentinel_pr_review_context,传入 owner_repo="evomap/evolver-agent-plugin"、pr_number=112、head_sha="5c1e18c1f28903220d133a84282d5e7445be9545",并按条目追加 finding_id 或 finding_key。

由 Sentinel 审核 · 目标提交 5c1e18c1f289

@evomap-aiqa-bot

Copy link
Copy Markdown

Sentinel 保留了 3 个尚未确认的审核候选。这些黄色条目不阻塞合并;红色 P0/P1 与其他独立硬门禁不受影响。 单一猜测、缺少变更行证据或纯 checklist 的候选会统一降为 P3。
开发 agent:请 review 以下 advisory,并逐条给出“已验证无风险 / 已修复 / 转为后续事项”的结论;不要只做整体确认。

  • [P2] join 超时后被乐观标记为已注入,后续失败仍生成成功总结 — ended() 等待 2 秒后无条件执行 turn.isJoined = true;这会把“仍未知”固化成“已加入”。原...(truncated) · lib/channels/relay/server.js · advisory_bdb3038073f1149b52374f6a
  • [P2] 重复 turn.start 会让旧任务修改新一代回合状态 — started() 对相同 turnKey 直接 Map.set() 覆盖旧记录,但旧 late 条目仍持有同一个 key。旧任...(truncated) · lib/channels/relay/server.js · advisory_9f02497898437365095a4db8
  • [P3] 超过 64 个未完成回合时会丢失结束通知 — turnRecalls.started() 以固定容量淘汰最早的回合状态;被淘汰回合随后执行 ended() 时查不到...(truncated) · lib/channels/relay/server.js · advisory_4b8f737e135d2db3eede6d42

需要完整证据时,可用行末 finding_key 查询 Sentinel PR review context。

由 Sentinel 审核 · 目标提交 5c1e18c1f289

…ng added, its outcome unknown

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@forrestlinfeng

Copy link
Copy Markdown
Contributor Author

Sentinel on 5c1e18c:

  • Timed-out join reported as injected. Agreed. After the 2 s wait, the join's outcome is unknown, so calling it injected was as wrong as calling it unused. Fixed in e5f33ab: such a turn now ends with ○ "name" was still being added when this turn ended. Covered by a new test.
  • Repeated turn.start for one turn key. Not changed. Claude Code gives every turn a fresh turnId, and the key also includes the session, so one key never starts twice.
  • 64-turn eviction. Not changed; already answered above. It needs 64 open turns in one session, and that session runs one main turn at a time.

@evomap-aiqa-bot

evomap-aiqa-bot Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Sentinel 已审核此变更,未发现已核验问题,但发现需要人工确认的风险。

另有 4 个需要人工确认的风险;黄色 advisory 不阻塞合并,建议开发 agent review advisory 评论并逐条确认。

开发 agent 查询详情: 调用 MCP 工具 sentinel_pr_review_context,传入 owner_repo="evomap/evolver-agent-plugin"、pr_number=112、head_sha="e5f33abd9abbdbc6a96ab2d57b9f36314d64c176",并按条目追加 finding_id 或 finding_key。

由 Sentinel 审核 · 目标提交 e5f33abd9abb

@evomap-aiqa-bot

Copy link
Copy Markdown

Sentinel 保留了 4 个尚未确认的审核候选。这些黄色条目不阻塞合并;红色 P0/P1 与其他独立硬门禁不受影响。 单一猜测、缺少变更行证据或纯 checklist 的候选会统一降为 P3。
开发 agent:请 review 以下 advisory,并逐条给出“已验证无风险 / 已修复 / 转为后续事项”的结论;不要只做整体确认。

  • [P2] Recall 与 join 失败被吞掉并映射为正常业务状态 — started() 在 traced 拒绝时只把 isSettled 设为 true,丢弃错误并保留 trace=null,最终由 rec...(truncated) · lib/channels/relay/server.js·advisory_f9414eddcfba5e8fe4efaa65`
  • [P2] 重复 turn.start 会让旧 recall 的 join 写入新一代回合 — started() 对相同 [session_id, turn_id] 直接 Map.set() 覆盖记录,但旧 late 条目只保存相同的 tu...(truncated) · lib/channels/relay/server.js·advisory_50d12ee4475c0794b23201e8`
  • [P3] 超过 64 个活跃回合时,较早回合永久丢失结束通知 — turnRecalls.started() 在记录数超过 MAX_LATE 时直接删除最早记录,没有确认该回合已经完成、...(truncated) · lib/channels/relay/server.js · advisory_fbd5c8913bfd5d99e9d77e8e
  • [P3] 缺少 session_id 时不同回合可共享并覆盖召回状态 — 新增的 turnKeyOf() 在 session_id 缺失时使用 null 组成键;因此所有缺少会话 ID、且 turn_id ...(truncated) · lib/channels/relay/server.js · advisory_bf5ae8e9fa436e62cfeb73c3

需要完整证据时,可用行末 finding_key 查询 Sentinel PR review context。

由 Sentinel 审核 · 目标提交 e5f33abd9abb

@forrestlinfeng

Copy link
Copy Markdown
Contributor Author

Sentinel on e5f33ab: 0 blocking, 0 verified. No code change for these advisories:

  • Missing session_id: the hooks module sends session_id with every event (sessionFields).
  • Repeated turn.start for one [session, turn] key: already answered above.
  • 64-turn eviction: already answered above.
  • A rejected trace or join ends as "no strategy injected" / "not used": the trace resolves after late and does not reject on its own. A rejected join booked nothing, so the strategy really was not used in that turn.

@forrestlinfeng
forrestlinfeng merged commit 2d883ed into main Nov 25, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant