Skip to content

feat: fork-agent-redesign — 新增 AgentTool fork 参数与 spec 设计文档#405

Merged
claude-code-best merged 1 commit intomainfrom
feature/fork-new-agent
May 3, 2026
Merged

feat: fork-agent-redesign — 新增 AgentTool fork 参数与 spec 设计文档#405
claude-code-best merged 1 commit intomainfrom
feature/fork-new-agent

Conversation

@claude-code-best
Copy link
Copy Markdown
Owner

@claude-code-best claude-code-best commented May 2, 2026

为 AgentTool 引入 fork 布尔参数,支持子代理从父对话上下文中 fork 出独立分支, 继承完整历史、系统提示和模型配置。重构 inputSchema 条件逻辑以适配 fork 模式。

Summary by CodeRabbit

Release Notes

  • New Features

    • Added optional fork parameter to the agent tool for explicit control over fork routing behavior.
  • Improvements

    • Changed fork activation to require explicit fork: true instead of implicit triggering; fork mode now depends on feature flag enablement and parameter state.
    • Updated agent prompt guidance to reflect new fork parameter semantics and model context inheritance.
  • Tests

    • Added test suite to verify fork-related prompt text and parameter handling.
  • Documentation

    • Added specification documents outlining fork agent redesign, verification checklist, and implementation plan.

为 AgentTool 引入 fork 布尔参数,支持子代理从父对话上下文中 fork 出独立分支,
继承完整历史、系统提示和模型配置。重构 inputSchema 条件逻辑以适配 fork 模式。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@mintlify
Copy link
Copy Markdown

mintlify Bot commented May 2, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
ccb-863780bf 🟢 Ready View Preview May 2, 2026, 3:46 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 2, 2026

📝 Walkthrough

Walkthrough

The PR redesigns fork agent invocation from implicit (triggered by omitting subagent_type when flag enabled) to explicit (triggered by fork: true parameter). The FORK_SUBAGENT feature flag now gates fork capability availability rather than driving implicit routing. Schema adds optional fork?: boolean, routing logic requires explicit fork === true && isForkSubagentEnabled(), prompt guidance is updated to remove implicit fork instructions and emphasize explicit parameter, and async/background behavior is decoupled from fork flag state.

Changes

Fork Agent Explicit Parameter Redesign

Layer / File(s) Summary
Data Shape / Schema
packages/builtin-tools/src/tools/AgentTool/AgentTool.tsx (lines 148–156, 200–208)
baseInputSchema gains optional fork: boolean field. Exported inputSchema conditionally omits fork and run_in_background via .omit() based on feature flags (isForkSubagentEnabled(), isBackgroundTasksDisabled).
Type Definitions
packages/builtin-tools/src/tools/AgentTool/AgentTool.tsx (lines 215–219, 327–333)
AgentToolInput type adds fork?: boolean; destructuring in call() parameter includes new field.
Core Routing Logic
packages/builtin-tools/src/tools/AgentTool/AgentTool.tsx (lines 415–420)
isForkPath now computed as strict condition fork === true && isForkSubagentEnabled(); effectiveType defaults to GENERAL_PURPOSE_AGENT.agentType instead of implicitly routing based on undefined subagent_type.
Async / Summarization Decoupling
packages/builtin-tools/src/tools/AgentTool/AgentTool.tsx (lines 697–715, 889–893)
Removed fork-flag-forced async (forceAsync) from shouldRunAsync computation; enableSummarization condition changed from including isForkSubagentEnabled() to using isCoordinator || isForkPath || getSdkAgentProgressSummariesEnabled().
Prompt Guidance Updates
packages/builtin-tools/src/tools/AgentTool/prompt.ts (lines 84–88, 99–106, 205, 253–259)
"When to fork" section replaced with delegation-focused directive including multi-file example; "Writing the prompt" adjusted for non-fork context behavior; AGENT_TOOL_NAME usage clarified with fork: true for history inheritance; "run_in_background" notes now gated by !isInProcessTeammate() only (no longer by !forkEnabled); terminology updated to "non-fork" vs. general agent invocation.
Prompt Text Verification Tests
packages/builtin-tools/src/tools/AgentTool/__tests__/prompt.test.ts (lines 1–69)
New Bun test suite validates fork-related prompt invariants: presence of fork: true in multiple locations, non-negated forkEnabled usage, absence of implicit-fork guidance, non-fork terminology, and fork example block correctness.
Build Feature Documentation
scripts/defines.ts (line 55)
DEFAULT_BUILD_FEATURES comment for FORK_SUBAGENT entry replaced with updated description of revised fork semantics.
Specification & Planning
spec/feature_20260502_F001_fork-agent-redesign/spec-*.md
New documentation files define feature redesign goals (explicit parameter vs. implicit flag), implementation plan (Tasks 0–3 covering schema, routing, prompt, and end-to-end verification), and human verification checklist with acceptance criteria and command-based assertions.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • KonghaYao

Poem

🐰 Explicit is better, we now declare,
With fork: true, no hidden snare!
The flag gates capability, not the route,
Async and background bear their own fruit,
A prompt redesigned, the spec set in stone—
The agent now speaks with clarity's tone!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main changes: adding a fork parameter to AgentTool and including specification design documents.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/fork-new-agent

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 39.28571% with 17 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...es/builtin-tools/src/tools/AgentTool/AgentTool.tsx 52.38% 10 Missing ⚠️
...ckages/builtin-tools/src/tools/AgentTool/prompt.ts 0.00% 7 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/builtin-tools/src/tools/AgentTool/AgentTool.tsx (1)

709-715: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Carry the new fork summarization rule into the sync→background path.

shouldRunAsync now allows forks to start in the foreground, but the later continuation at Lines 1093-1103 still enables onCacheSafeParams only when getSdkAgentProgressSummariesEnabled() is true. A long-running fork that gets backgrounded after launch will therefore miss summaries unless the SDK flag is on.

Suggested follow-up
-                        onCacheSafeParams: getSdkAgentProgressSummariesEnabled()
+                        onCacheSafeParams:
+                          isCoordinator || isForkPath || getSdkAgentProgressSummariesEnabled()
                           ? (params: CacheSafeParams) => {
                               const { stop } = startAgentSummarization(
                                 backgroundedTaskId,

Also applies to: 892-893

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/builtin-tools/src/tools/AgentTool/AgentTool.tsx` around lines 709 -
715, The continuation path that moves a run from sync→background must apply the
same fork-summarization rule used when computing shouldRunAsync so forks that
start foreground then background still get onCacheSafeParams; update the
continuation logic that currently gates setting onCacheSafeParams behind
getSdkAgentProgressSummariesEnabled() to also enable it when the fork condition
is met (reuse the same predicate used for shouldRunAsync or check the
fork/wasForked flag used for forking), and make the same change at the other
occurrence (the block referenced around the other continuation). Ensure you
reference and reuse the symbols shouldRunAsync, onCacheSafeParams, and
getSdkAgentProgressSummariesEnabled (or the fork flag) so the backgrounding path
and the initial decision share the same rule.
🧹 Nitpick comments (1)
packages/builtin-tools/src/tools/AgentTool/__tests__/prompt.test.ts (1)

2-7: ⚡ Quick win

Use Bun-native file APIs in this test.

This suite currently depends on Node compatibility layers just to read prompt.ts. In this repo, tests should stay on Bun-native APIs as well.

As per coding guidelines, "All imports must use Bun APIs for imports, builds, and execution — do not use Node.js APIs".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/builtin-tools/src/tools/AgentTool/__tests__/prompt.test.ts` around
lines 2 - 7, Replace the Node-specific file/path/url usage with Bun-native APIs:
remove dirname, fileURLToPath, join, and readFileSync plus the __dirname hack,
and instead resolve the module path with new URL('../prompt.ts',
import.meta.url) and read the file using Bun.file(...).text() (or
Bun.file(...).textSync() for a synchronous read). Update the symbol usages where
promptSource is set so it uses Bun.file(new URL('../prompt.ts',
import.meta.url)).text()/textSync() and delete references to readFileSync, join,
dirname, and fileURLToPath.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/builtin-tools/src/tools/AgentTool/__tests__/prompt.test.ts`:
- Around line 51-59: The test currently allows promptSource.match(...) to be
null so deletion of the run_in_background guidance would pass undetected; update
the test in the 'background task condition does not include !forkEnabled' case
to first assert that the regex match (bgCondition returned from
promptSource.match(/!isEnvTruthy.*isInProcessTeammate[\s\S]*?run_in_background/))
is not null (e.g., expect(bgCondition).toBeTruthy() or
expect(bgCondition).not.toBeNull()) before calling
expect(bgCondition[0]).not.toContain('!forkEnabled'); this ensures the presence
of the run_in_background block is enforced before checking it does not contain
'!forkEnabled'.

In `@packages/builtin-tools/src/tools/AgentTool/AgentTool.tsx`:
- Around line 415-420: The /fork command still relies on the old implicit fork
behavior, so update the AgentTool invocation in the fork command handler to
include fork: true in the options/payload so the routing logic (isForkPath
checks fork === true) takes the fork path; specifically, add fork: true
alongside or within the object that currently passes subagent_type/effectiveType
to AgentTool (the call site in the fork command), ensuring the payload contains
fork: true so AgentTool's isForkPath and effectiveType logic selects the fork
route.

In `@spec/feature_20260502_F001_fork-agent-redesign/spec-human-verify.md`:
- Around line 77-81: The current acceptance check uses grep -c 'omit' which
false-positives because the file AgentTool/prompt.ts legitimately contains other
"omit" text; update the check to search for the specific removed guidance
instead (e.g., use a regex like "omit.*subagent_type" or the exact phrase "omit
subagent_type") so the command targets the old implicit-fork guidance in
packages/builtin-tools/src/tools/AgentTool/prompt.ts rather than any occurrence
of "omit".

In `@spec/feature_20260502_F001_fork-agent-redesign/spec-plan.md`:
- Around line 257-259: The grep in the spec is too broad and will match other
legitimate uses of "omit", so update the verification to search for the specific
removed guidance instead of "omit" alone: change the check that references
prompt.ts to look for the regex "omit.*subagent_type" or the exact deleted
phrase (e.g., the original implicit-fork guidance string) to ensure only the
unwanted guidance is detected; locate the entry that currently runs grep -n
"omit" against prompt.ts and replace it with a targeted search for the precise
text.

---

Outside diff comments:
In `@packages/builtin-tools/src/tools/AgentTool/AgentTool.tsx`:
- Around line 709-715: The continuation path that moves a run from
sync→background must apply the same fork-summarization rule used when computing
shouldRunAsync so forks that start foreground then background still get
onCacheSafeParams; update the continuation logic that currently gates setting
onCacheSafeParams behind getSdkAgentProgressSummariesEnabled() to also enable it
when the fork condition is met (reuse the same predicate used for shouldRunAsync
or check the fork/wasForked flag used for forking), and make the same change at
the other occurrence (the block referenced around the other continuation).
Ensure you reference and reuse the symbols shouldRunAsync, onCacheSafeParams,
and getSdkAgentProgressSummariesEnabled (or the fork flag) so the backgrounding
path and the initial decision share the same rule.

---

Nitpick comments:
In `@packages/builtin-tools/src/tools/AgentTool/__tests__/prompt.test.ts`:
- Around line 2-7: Replace the Node-specific file/path/url usage with Bun-native
APIs: remove dirname, fileURLToPath, join, and readFileSync plus the __dirname
hack, and instead resolve the module path with new URL('../prompt.ts',
import.meta.url) and read the file using Bun.file(...).text() (or
Bun.file(...).textSync() for a synchronous read). Update the symbol usages where
promptSource is set so it uses Bun.file(new URL('../prompt.ts',
import.meta.url)).text()/textSync() and delete references to readFileSync, join,
dirname, and fileURLToPath.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8e68594e-25d5-446e-bfe9-353e19c98bac

📥 Commits

Reviewing files that changed from the base of the PR and between 86df024 and ba74e09.

📒 Files selected for processing (7)
  • packages/builtin-tools/src/tools/AgentTool/AgentTool.tsx
  • packages/builtin-tools/src/tools/AgentTool/__tests__/prompt.test.ts
  • packages/builtin-tools/src/tools/AgentTool/prompt.ts
  • scripts/defines.ts
  • spec/feature_20260502_F001_fork-agent-redesign/spec-design.md
  • spec/feature_20260502_F001_fork-agent-redesign/spec-human-verify.md
  • spec/feature_20260502_F001_fork-agent-redesign/spec-plan.md

Comment on lines +51 to +59
test('background task condition does not include !forkEnabled', () => {
// The condition for showing background task instructions should not exclude fork
const bgCondition = promptSource.match(
/!isEnvTruthy.*isInProcessTeammate[\s\S]*?run_in_background/,
)
if (bgCondition) {
expect(bgCondition[0]).not.toContain('!forkEnabled')
}
})
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fail if the background-note block disappears.

If promptSource.match(...) returns null, this test still passes, so deleting the run_in_background guidance entirely would not be caught. Assert the match exists before checking that it does not contain !forkEnabled.

Suggested fix
   test('background task condition does not include !forkEnabled', () => {
     // The condition for showing background task instructions should not exclude fork
     const bgCondition = promptSource.match(
       /!isEnvTruthy.*isInProcessTeammate[\s\S]*?run_in_background/,
     )
-    if (bgCondition) {
-      expect(bgCondition[0]).not.toContain('!forkEnabled')
-    }
+    expect(bgCondition).not.toBeNull()
+    expect(bgCondition![0]).not.toContain('!forkEnabled')
   })
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/builtin-tools/src/tools/AgentTool/__tests__/prompt.test.ts` around
lines 51 - 59, The test currently allows promptSource.match(...) to be null so
deletion of the run_in_background guidance would pass undetected; update the
test in the 'background task condition does not include !forkEnabled' case to
first assert that the regex match (bgCondition returned from
promptSource.match(/!isEnvTruthy.*isInProcessTeammate[\s\S]*?run_in_background/))
is not null (e.g., expect(bgCondition).toBeTruthy() or
expect(bgCondition).not.toBeNull()) before calling
expect(bgCondition[0]).not.toContain('!forkEnabled'); this ensures the presence
of the run_in_background block is enforced before checking it does not contain
'!forkEnabled'.

Comment on lines +415 to 420
// Fork routing: explicit `fork: true` parameter triggers the fork path
// (inherits parent context and model). Requires FORK_SUBAGENT flag.
// subagent_type is ignored when fork takes effect.
const isForkPath = fork === true && isForkSubagentEnabled();
const effectiveType = subagent_type ?? GENERAL_PURPOSE_AGENT.agentType;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# Check the routing logic in AgentTool.tsx around lines 415-420
cat -n packages/builtin-tools/src/tools/AgentTool/AgentTool.tsx | sed -n '405,430p'

Repository: claude-code-best/claude-code

Length of output: 1544


🏁 Script executed:

# Find and examine the fork.tsx caller
fd -t f fork.tsx | head -5

Repository: claude-code-best/claude-code

Length of output: 99


🏁 Script executed:

# Also check for any inputSchema definitions to understand the implicit behavior
rg -n "inputSchema|subagent_type" packages/builtin-tools/src/tools/AgentTool/AgentTool.tsx -A 2 -B 2 | head -100

Repository: claude-code-best/claude-code

Length of output: 2893


🏁 Script executed:

# Examine the AgentTool.call() invocation in fork.tsx
cat -n src/commands/fork/fork.tsx | sed -n '1,100p'

Repository: claude-code-best/claude-code

Length of output: 3289


🏁 Script executed:

# Look for the actual AgentTool.call() invocation
rg -n "AgentTool|call\(" src/commands/fork/fork.tsx -A 5 -B 5 | head -80

Repository: claude-code-best/claude-code

Length of output: 1801


Add fork: true to the fork command's AgentTool invocation.

The routing logic in AgentTool.tsx changed from implicit (omit subagent_type to trigger fork) to explicit (fork: true parameter). The /fork command in src/commands/fork/fork.tsx (lines 42–48) has not been updated and still relies on the old implicit behavior. Without fork: true, the fork command will spawn a general-purpose agent instead of a fork, silently producing incorrect behavior.

Required fix
 const input = {
   prompt: directive,
+  fork: true,
   run_in_background: true,
   description: `Fork: ${directive.slice(0, 30)}${directive.length > 30 ? '...' : ''}`,
 };
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/builtin-tools/src/tools/AgentTool/AgentTool.tsx` around lines 415 -
420, The /fork command still relies on the old implicit fork behavior, so update
the AgentTool invocation in the fork command handler to include fork: true in
the options/payload so the routing logic (isForkPath checks fork === true) takes
the fork path; specifically, add fork: true alongside or within the object that
currently passes subagent_type/effectiveType to AgentTool (the call site in the
fork command), ensuring the payload contains fork: true so AgentTool's
isForkPath and effectiveType logic selects the fork route.

Comment on lines +77 to +81
#### - [x] 3.1 不再包含 "omit subagent_type" 引导文本
- **来源:** spec-plan.md Task 2 / spec-design.md §prompt 调整
- **目的:** 确认隐式 fork 触发引导已移除
- **操作步骤:**
1. [A] `grep -c 'omit' packages/builtin-tools/src/tools/AgentTool/prompt.ts` → 期望精确: `0`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

The acceptance command will false-positive on If omitted.

packages/builtin-tools/src/tools/AgentTool/prompt.ts now legitimately contains If omitted, the general-purpose agent is used., so grep -c 'omit' no longer proves the old implicit-fork guidance is gone. Narrow this to omit.*subagent_type or the exact removed phrase.

Suggested edit
 #### - [x] 3.1 不再包含 "omit subagent_type" 引导文本
 - **来源:** spec-plan.md Task 2 / spec-design.md §prompt 调整
 - **目的:** 确认隐式 fork 触发引导已移除
 - **操作步骤:**
-  1. [A] `grep -c 'omit' packages/builtin-tools/src/tools/AgentTool/prompt.ts` → 期望精确: `0`
+  1. [A] `grep -c 'omit.*subagent_type' packages/builtin-tools/src/tools/AgentTool/prompt.ts` → 期望精确: `0`
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
#### - [x] 3.1 不再包含 "omit subagent_type" 引导文本
- **来源:** spec-plan.md Task 2 / spec-design.md §prompt 调整
- **目的:** 确认隐式 fork 触发引导已移除
- **操作步骤:**
1. [A] `grep -c 'omit' packages/builtin-tools/src/tools/AgentTool/prompt.ts` → 期望精确: `0`
#### - [x] 3.1 不再包含 "omit subagent_type" 引导文本
- **来源:** spec-plan.md Task 2 / spec-design.md §prompt 调整
- **目的:** 确认隐式 fork 触发引导已移除
- **操作步骤:**
1. [A] `grep -c 'omit.*subagent_type' packages/builtin-tools/src/tools/AgentTool/prompt.ts` → 期望精确: `0`
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@spec/feature_20260502_F001_fork-agent-redesign/spec-human-verify.md` around
lines 77 - 81, The current acceptance check uses grep -c 'omit' which
false-positives because the file AgentTool/prompt.ts legitimately contains other
"omit" text; update the check to search for the specific removed guidance
instead (e.g., use a regex like "omit.*subagent_type" or the exact phrase "omit
subagent_type") so the command targets the old implicit-fork guidance in
packages/builtin-tools/src/tools/AgentTool/prompt.ts rather than any occurrence
of "omit".

Comment on lines +257 to +259
- [x] 验证 prompt 中不再包含 "omit `subagent_type`" 引导文本
- `grep -n "omit" packages/builtin-tools/src/tools/AgentTool/prompt.ts`
- 预期: 无输出
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

This verification grep is too broad.

prompt.ts now contains If omitted, the general-purpose agent is used., so grep -n "omit" will still match even when the removed implicit-fork guidance is gone. Search for omit.*subagent_type or the exact deleted wording instead.

Suggested edit
-- [x] 验证 prompt 中不再包含 "omit `subagent_type`" 引导文本
-  - `grep -n "omit" packages/builtin-tools/src/tools/AgentTool/prompt.ts`
+- [x] 验证 prompt 中不再包含 "omit `subagent_type`" 引导文本
+  - `grep -n 'omit.*subagent_type' packages/builtin-tools/src/tools/AgentTool/prompt.ts`
   - 预期: 无输出
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- [x] 验证 prompt 中不再包含 "omit `subagent_type`" 引导文本
- `grep -n "omit" packages/builtin-tools/src/tools/AgentTool/prompt.ts`
- 预期: 无输出
- [x] 验证 prompt 中不再包含 "omit `subagent_type`" 引导文本
- `grep -n 'omit.*subagent_type' packages/builtin-tools/src/tools/AgentTool/prompt.ts`
- 预期: 无输出
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@spec/feature_20260502_F001_fork-agent-redesign/spec-plan.md` around lines 257
- 259, The grep in the spec is too broad and will match other legitimate uses of
"omit", so update the verification to search for the specific removed guidance
instead of "omit" alone: change the check that references prompt.ts to look for
the regex "omit.*subagent_type" or the exact deleted phrase (e.g., the original
implicit-fork guidance string) to ensure only the unwanted guidance is detected;
locate the entry that currently runs grep -n "omit" against prompt.ts and
replace it with a targeted search for the precise text.

@claude-code-best claude-code-best merged commit ba74e09 into main May 3, 2026
9 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.

2 participants