Uh oh!
There was an error while loading. Please reload this page.
refactor: remove the ExploreAgent tool - #4176
Conversation
0651f25 to
585abb6CompareRemove the bounded scanner, its production registration and prompt wiring, and its dedicated transcript presentation. Keep Deep Research on the standard read-only tools and preserve old persisted results by folding them to ordinary historical text. Generated-by: Codex
Select the first non-empty historical result text and fold retired ExploreAgent RuntimeEvent results before model replay. Rename the remaining Deep Research session-profile test to remove stale tool naming. Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
585abb6 to
cec5150Compare
zhiiw
left a comment
There was a problem hiding this comment.
Reviewed at exact head cec51501 (verified unchanged at review time; all checks completed/success on this head, including test 24m and windows-latest).
Tool removal with a narrow persistence seam, verified rather than assumed:
- Zero production references remain: whole-tree search at this head finds
ExploreAgent/explore_agent/explore-agentonly in the two declared read-only seams — the persisted-result decoder intool-result-record-schema.tsand the RuntimeEvent replay projection inmodel-history.ts. No registration, callable tool, scanner, import of@maka/core/explore-agent, oragent-previewimport survives. - The compatibility boundary is exactly as advertised: the persisted decoder accepts historical
kind='explore_agent'only withmode='read_only'and a booleanok, selects the first non-empty of report/summary/message, and otherwise falls back to a generic text line — it deliberately discards the retired progress/evidence/candidate/match structures and returns plain{kind:'text'}, not a legacy result model. The canonical live validator no longer accepts the retired kind, so live decoding rejects it. Since the retired live validator always requiredmode='read_only', every record that could have been persisted satisfies the decoder's precondition. - Model replay uses the same projection: retired results in RuntimeEvent history are projected through the same decoder before shell-result normalization, so a historical conversation replays as the text the user saw.
- The
#3376intent mechanism is genuinely preserved: the removeddescribeToolIntentwas ExploreAgent-only (tool.name !== 'ExploreAgent'→undefined), and the generic channel — protocol-frameintent/argsPreview, the epoch-45 wire type, and the UI's live-turn projection honoringevent.intent— is untouched. The epoch-65 compatible declaration covers a comment-only wire-type edit. - Deep Research keeps its surface: the allowlist now explicitly admits Read/Glob/Grep/WebSearch/AskUserQuestion and rejects
ExploreAgent, and the session-start authority moved fromcore/explore-agenttocore/deep-researchwith the exports map renamed to match.
Executed on a real Windows machine at this head: clean forced rebuild, then the affected set — core schema/deep-research, runtime read-model, runtime-host composer 83/86 plus ai-sdk-backend / plan-mode / session-manager / UI tool-activity 417/417. The 3 failures are confined to deep-research-tools teardown (EBUSY unlinking temp SQLite fixtures; the failing test bodies and the implementation under test are untouched by this PR, and the hosted Windows runner passes the same file).
Automated review notice: This comment was posted by an automated review agent operated by zhiiw. It is not an independent human review and does not replace one.
简体中文
工具删除 + 窄持久化缝,全部核实而非假设:全树零生产引用(仅剩两个申报的只读解码缝);持久化解码器只收 mode='read_only' 且 ok 为布尔的历史记录,取 report/summary/message 第一个非空,否则通用文本回落——刻意丢弃旧的 progress/evidence/candidate 结构,返回纯 text,且旧活体验证器本就强制 mode='read_only',所以落库记录必满足前置;活体 canonical 解码拒绝该 kind。模型重放走同一投影。#3376 的通用 intent 机制确实保留——被删的 describeToolIntent 只对 ExploreAgent 生效,协议帧/epoch 45 线类型/UI live-turn 投影都没动。Deep Research allowlist 显式收标准工具、拒 ExploreAgent。本机真 Windows 干净重建后 83/86 + 417/417;3 个失败限 deep-research-tools 的 EBUSY 临时库拆除(失败测试体与被测实现本 PR 均未触碰,hosted Windows runner 同文件通过)。
hqhq1025
left a comment
There was a problem hiding this comment.
Reviewed exact head cec51501c7679141f27d217dc23a5dc7b3465334 against current main at 6fca2f51ef402591c92f60efbef8b7af88619c66. The ExploreAgent removal, persisted-result text folding, live canonical rejection, and remaining Deep Research tool surface are coherent. The blocking current-base integration issue is inline.
Verification: @maka/core 706/706 passed; @maka/runtime 3020/3033 passed with 13 skipped and no failures after applying the repository dependency patches; @maka/ui 276/276 passed; CLI transcript 107/107 passed. @maka/runtime-host built and passed 1358/1368 with 9 skipped; one unrelated host sandbox integration assertion failed in this container. The protocol failure below is deterministic on the conflict-free synthetic merge with current main.
Automated review notice: This comment was posted by an automated review agent operated by hqhq1025. It is not an independent human review and does not replace one.
| @@ -0,0 +1,8 @@ | |||
| { | |||
| "epoch": 65, | |||
There was a problem hiding this comment.
[P2] Refresh this declaration when updating the branch
main is now at epoch 67, while this declaration is pinned to the PR base epoch 65. A conflict-free synthetic merge of this head into current main (6fca2f51) makes protocol-epoch-check.mjs reject the declaration because its epoch no longer matches the merged head. This is a routine base-refresh issue rather than a user-impacting correctness blocker: rebase or merge current main, set this value to the resulting epoch (currently 67), and rerun CI before merge.
The reviewer reclassified the current-main epoch mismatch as non-blocking after maintainer guidance; superseded by a follow-up approval on the same exact head.
hqhq1025
left a comment
There was a problem hiding this comment.
Reviewed exact head cec51501c7679141f27d217dc23a5dc7b3465334. No P0/P1 issues found.
The removal is coherent across the production tool surface, prompts, exports, UI, and tests. Historical persisted explore_agent results are folded to text at persisted-read and RuntimeEvent replay boundaries, while canonical live decoding rejects the retired kind. Deep Research retains its standard read-only and durable research tools.
One non-blocking P2 is documented inline: the compatible-change declaration should be refreshed to the current protocol epoch when the branch is rebased onto current main.
Verification: @maka/core 706/706 passed; @maka/runtime 3020/3020 passed with 13 skipped; @maka/ui 276/276 passed; CLI transcript 107/107 passed. @maka/runtime-host built and passed 1358 tests with 9 skipped; one unrelated managed-sandbox integration assertion failed in this container. Hosted checks are green on this exact head.
Automated review notice: This comment was posted by an automated review agent operated by hqhq1025. It is not an independent human review and does not replace one.
M4n5ter
left a comment
There was a problem hiding this comment.
Reviewed exact head cec51501c7679141f27d217dc23a5dc7b3465334. No P0/P1 issues found.
The removal is a genuine simplification: the callable ExploreAgent authority, scanner, dedicated result model/UI, registration, prompt wiring, exports, and their tests are deleted without replacement. Deep Research keeps Read, Glob, Grep, WebSearch, AskUserQuestion, and its durable research tools; canonical live decoding rejects the retired result kind while persisted history is projected to ordinary text.
One non-blocking P2 is inline: the compatibility decoder omits the original persisted ExploreAgent result shape from before kind: 'explore_agent' was added, which can make those historical sessions unreadable. The existing unresolved P2 about refreshing the protocol-compatible declaration to the current epoch was independently confirmed and is not duplicated here.
Verification: all 7 hosted checks are green on this exact head. The conflict-free current-main merge result passed 691 affected core/runtime/runtime-host/CLI/UI/Desktop tests, the relevant package builds, Biome on 49 changed live files, ASF header audit, the Astryx inventory, and diff checking.
Automated review notice: This comment was posted by an automated review agent operated by M4n5ter. It is not an independent human review and does not replace one.
| persisted: PersistedValue<ToolResultContent>, | ||
| ): ToolResultContent { | ||
| const value = persisted as unknown; | ||
| if (isRecord(value) && value.kind === 'explore_agent') { |
There was a problem hiding this comment.
[P2] Preserve the original pre-kind result shape
This compatibility gate starts one version too late. Commit 90473669f introduced persisted ExploreAgent results as { ok, mode: 'read_only', objective, roots, queries, ... } without a kind; commit 42e73a2f added kind: 'explore_agent' about 3.5 hours later, and both commits are ancestors of main. Passing that original result through the current persisted-message decoder throws Invalid tool result content; the SQLite transcript reader converts this to StoredSessionMessageIncompatibleError, so an affected historical session becomes unreadable instead of being folded to text. The test named “earliest persisted shape” begins with the later kind-bearing version and cannot catch this. Please recognize the original shape only at persisted read boundaries using its stable mode, boolean ok, and narrow structural provenance, then fold it to text; canonical live decoding should remain strict.
Automated review notice: This comment was posted by an automated review agent operated by M4n5ter. It is not an independent human review and does not replace one.
jackwener
left a comment
There was a problem hiding this comment.
I reviewed this at cec51501c7679141f27d217dc23a5dc7b3465334. No P0 or P1. One P2, inline.
P2. Current main already ships Runtime Host compatibility epoch 67. This branch still has epoch 65, and packages/runtime-host/protocol-compatible-changes/session-catalog-deep-research-import.json names epoch 65. The merge-result epoch guard compares that declaration to the merge's epoch. After a merge into current main the epoch stays 67 (this PR does not touch protocol/index.ts), so a declaration that still says 65 is invalid. Rebase onto current main, read the epoch there, and make this declaration match that number. Do not guess the next integer.
What I checked
- ExploreAgent is gone from the live tool surface: Host composer, ToolRuntime, Deep Research allowlist, and prompt no longer register or mention it. I found no remaining production callers of
explore-agent-toolor@maka/core/explore-agent. - Persisted
kind='explore_agent'results still decode at stored-message boundaries. The decoder keepsmode='read_only'plus booleanok, then takes the first non-emptyreport/summary/message, elseInspected N files, else a generic fallback. Live canonical decode rejects the kind. RuntimeEvent model replay folds the same way before replay. - Deep Research still starts as
mode:deep_researchwith Read / Glob / Grep / WebSearch and the durabledeep_research_*tools. Session-start types moved with the file rename; the wire catalog import is a rename only. - Historical ExploreAgent UI cards, copy, and CSS are gone. Subagent results were not using that preview component. Generic tool-intent presentation remains; only the retired ExploreAgent examples were replaced.
Hosted test, audit, ubuntu-latest, macos-latest, windows-latest, windows_recovery, and label are green on this head. The text merge against current main is clean. This is a refactor; I am not merging it.
简体中文
我审的是 cec51501c7679141f27d217dc23a5dc7b3465334。没有 P0/P1。一条 P2,写在对应行上。
P2. 当前 main 的 Runtime Host 兼容 epoch 已经是 67。这条分支还停在 65,兼容声明文件也写着 65。合进现在的 main 之后 epoch 仍是 67(本 PR 没改 protocol/index.ts),声明对不上就会被 epoch 检查拒绝。请 rebase 到当前 main,读那里的 epoch,让声明和那个数字一致,不要猜下一个整数。
我核对过:live 工具面已经没有 ExploreAgent;历史 explore_agent 结果仍会折成普通文本;Deep Research 的只读工具和 durable 工具还在。这是重构,我不合入。
Automated review notice: This comment was posted by an automated review agent operated by WAWQAQ. It is not an independent human review and does not replace one.
| @@ -0,0 +1,8 @@ | |||
| { | |||
| "epoch": 65, | |||
There was a problem hiding this comment.
P2: this declaration names epoch 65. Current main is already at epoch 67. The merge-result epoch guard requires a newly added compatible-change file to match the merge's epoch. After merging into current main the epoch stays 67 because this PR does not edit protocol/index.ts, so a 65 declaration fails. Rebase onto current main, read the epoch there, and set this field to that number.
简体中文
P2:这份声明写的是 epoch 65。当前 main 已经是 67。合并结果上的 epoch 检查要求新加的兼容声明和合并后的 epoch 一致。本 PR 不改 protocol/index.ts,合进去之后仍是 67,写 65 会被拒。请 rebase 到当前 main,读那里的 epoch,把这个字段改成那个数字。
Automated review notice: This comment was posted by an automated review agent operated by WAWQAQ. It is not an independent human review and does not replace one.
Uh oh!
There was an error while loading. Please reload this page.
Update the compatible-change declaration added by #4176 to epoch 68, matching the current Runtime Host protocol epoch. This restores the merge-result protocol guard without changing the wire protocol or advancing the epoch. Generated-by: Codex
Summary
ExploreAgent was a hand-written bounded local scanner rather than an agent. Remove its callable tool, scanner implementation, Runtime Host registration, prompt wiring, dedicated progress and diagnostic presentation, preview UI, styles, tests, docs references, and exports. The change removes 3,155 lines and adds 409 lines across 57 files, for a net deletion of 2,746 lines.
Deep Research remains available. Its session-start authority now lives under the Deep Research module, and its tool boundary continues to allow Read, Glob, Grep, WebSearch, and the existing durable Deep Research tools. True subagents and generic provider tool-result presentation are unchanged. The generic tool-intent presentation from PR #3376 is preserved; only its retired ExploreAgent examples were replaced with standard-tool fixtures.
Compatibility boundary
Only already-persisted
kind='explore_agent'results remain readable. The persisted decoder establishes the stable historicalmode='read_only'and booleanokprovenance, selects the first usablereport,summary, ormessage, and otherwise emits a generic text fallback. It deliberately ignores the retired progress, evidence, candidate, and match structures instead of preserving a legacy result model. The earliest persisted shape, beforeprogressexisted, is covered.Canonical live decoding still rejects the retired kind. There is no production registration, callable tool, scanner, dedicated UI, specialized model, migration, write-back path, or new compatibility abstraction. RuntimeEvent model replay uses the same persisted text projection before replaying historical results.
Verification
Grepfixtures; Desktop Storybook typecheck, production build, and the 197-story render/play smoke passedgit diff --checkpassedAI use
Select exactly one:
Tool(s) and scope: Codex traced callers and persistence boundaries, authored the removal and regression tests, ran local verification, and coordinated independent internal reviews. All commits include
Generated-by: Codextrailers.Checklist
Does this PR entail a change in behavior?