From 11abb48b0fef452eaec80d09e7663f567d62825f Mon Sep 17 00:00:00 2001 From: Dudu-0223 Date: Tue, 3 Nov 2026 15:19:35 +0800 Subject: [PATCH] fix(team): explain task ownership using returned agent names --- packages/team/tool-agent-team/README.md | 2 +- packages/team/tool-agent-team/README.zh.md | 2 +- packages/team/tool-agent-team/src/index.ts | 2 +- snapshots/sdk/team-session-mode/system-prompt.expected.md | 2 +- snapshots/session/team-session-mode/system-prompt.expected.md | 2 +- snapshots/session/team-targets/system-prompt.expected.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/team/tool-agent-team/README.md b/packages/team/tool-agent-team/README.md index f5b758b2ef..829eebece4 100644 --- a/packages/team/tool-agent-team/README.md +++ b/packages/team/tool-agent-team/README.md @@ -124,7 +124,7 @@ Every Team member's system prompt carries one `team:policy` section; the Lead an ##### Team policy ```markdown -Agent Teams is available in this session. Task owners are agent names from list_agents. The root can reassign tasks to itself or any continuable descendant; other agents claim ready tasks themselves. +Agent Teams is available in this session. Use the names returned by subagent, subagent_fork, or list_agents as owner when assigning or filtering shared tasks. The root can reassign tasks to itself or any continuable descendant; other agents claim ready tasks themselves. Split write work into disjoint scopes, record expected write scopes on shared tasks, and use task dependencies when work must be ordered. Write-scope overlap is advisory, not a lock. diff --git a/packages/team/tool-agent-team/README.zh.md b/packages/team/tool-agent-team/README.zh.md index b9f3596fb9..e42d18d536 100644 --- a/packages/team/tool-agent-team/README.zh.md +++ b/packages/team/tool-agent-team/README.zh.md @@ -124,7 +124,7 @@ kind: "package-reference" ##### Team 策略 ```markdown -Agent Teams is available in this session. Task owners are agent names from list_agents. The root can reassign tasks to itself or any continuable descendant; other agents claim ready tasks themselves. +Agent Teams is available in this session. Use the names returned by subagent, subagent_fork, or list_agents as owner when assigning or filtering shared tasks. The root can reassign tasks to itself or any continuable descendant; other agents claim ready tasks themselves. Split write work into disjoint scopes, record expected write scopes on shared tasks, and use task dependencies when work must be ordered. Write-scope overlap is advisory, not a lock. diff --git a/packages/team/tool-agent-team/src/index.ts b/packages/team/tool-agent-team/src/index.ts index 876f1aad0e..5e71082650 100644 --- a/packages/team/tool-agent-team/src/index.ts +++ b/packages/team/tool-agent-team/src/index.ts @@ -24,7 +24,7 @@ export const Config: z = z.object({}) const REMOVED_CONFIG_KEYS = ['interrupt', 'freshProvider', 'forkProvider'] as const /** Model-facing collaboration guidance shared by Lead and teammates. */ -const TEAM_POLICY = `Agent Teams is available in this session. Task owners are agent names from list_agents. The root can reassign tasks to itself or any continuable descendant; other agents claim ready tasks themselves. +const TEAM_POLICY = `Agent Teams is available in this session. Use the names returned by subagent, subagent_fork, or list_agents as owner when assigning or filtering shared tasks. The root can reassign tasks to itself or any continuable descendant; other agents claim ready tasks themselves. Split write work into disjoint scopes, record expected write scopes on shared tasks, and use task dependencies when work must be ordered. Write-scope overlap is advisory, not a lock. diff --git a/snapshots/sdk/team-session-mode/system-prompt.expected.md b/snapshots/sdk/team-session-mode/system-prompt.expected.md index dc114f4b03..81d034eb51 100644 --- a/snapshots/sdk/team-session-mode/system-prompt.expected.md +++ b/snapshots/sdk/team-session-mode/system-prompt.expected.md @@ -16,7 +16,7 @@ You are an AI agent powered by DeepSeek Harness. You are a coding agent powered by the deepseek-v4-flash model. -Agent Teams is available in this session. Task owners are agent names from list_agents. The root can reassign tasks to itself or any continuable descendant; other agents claim ready tasks themselves. +Agent Teams is available in this session. Use the names returned by subagent, subagent_fork, or list_agents as owner when assigning or filtering shared tasks. The root can reassign tasks to itself or any continuable descendant; other agents claim ready tasks themselves. Split write work into disjoint scopes, record expected write scopes on shared tasks, and use task dependencies when work must be ordered. Write-scope overlap is advisory, not a lock. diff --git a/snapshots/session/team-session-mode/system-prompt.expected.md b/snapshots/session/team-session-mode/system-prompt.expected.md index fd3a1dc270..67aeab00f0 100644 --- a/snapshots/session/team-session-mode/system-prompt.expected.md +++ b/snapshots/session/team-session-mode/system-prompt.expected.md @@ -22,7 +22,7 @@ You are a coding assistant powered by the deepseek-v4-flash model. Your bash too Verify your work by running the code or tests. Keep answers brief and factual. -Agent Teams is available in this session. Task owners are agent names from list_agents. The root can reassign tasks to itself or any continuable descendant; other agents claim ready tasks themselves. +Agent Teams is available in this session. Use the names returned by subagent, subagent_fork, or list_agents as owner when assigning or filtering shared tasks. The root can reassign tasks to itself or any continuable descendant; other agents claim ready tasks themselves. Split write work into disjoint scopes, record expected write scopes on shared tasks, and use task dependencies when work must be ordered. Write-scope overlap is advisory, not a lock. diff --git a/snapshots/session/team-targets/system-prompt.expected.md b/snapshots/session/team-targets/system-prompt.expected.md index a8cd10b76d..ff404b0460 100644 --- a/snapshots/session/team-targets/system-prompt.expected.md +++ b/snapshots/session/team-targets/system-prompt.expected.md @@ -5,7 +5,7 @@ You are a coding assistant powered by the deepseek-v4-flash model. Your bash too Verify your work by running the code or tests. Keep answers brief and factual. -Agent Teams is available in this session. Task owners are agent names from list_agents. The root can reassign tasks to itself or any continuable descendant; other agents claim ready tasks themselves. +Agent Teams is available in this session. Use the names returned by subagent, subagent_fork, or list_agents as owner when assigning or filtering shared tasks. The root can reassign tasks to itself or any continuable descendant; other agents claim ready tasks themselves. Split write work into disjoint scopes, record expected write scopes on shared tasks, and use task dependencies when work must be ordered. Write-scope overlap is advisory, not a lock.