Merge pull request #2448 from code-yeongyu/fix/subagent-self-execute-v2

fix: prevent agents from duplicating delegated subagent work
This commit is contained in:
YeonGyu-Kim
2026-03-11 20:19:47 +09:00
committed by GitHub
19 changed files with 550 additions and 33 deletions
@@ -87,7 +87,6 @@ export function createBackgroundOutput(manager: BackgroundOutputManager, client:
const shouldBlock = args.block === true
const timeoutMs = Math.min(args.timeout ?? 60000, 600000)
const fullSession = args.full_session ?? true
let resolvedTask = task
@@ -123,6 +122,10 @@ export function createBackgroundOutput(manager: BackgroundOutputManager, client:
}
const isActive = isTaskActiveStatus(resolvedTask.status)
const fullSessionProvided = args.full_session !== undefined
const fullSession = fullSessionProvided
? (args.full_session ?? true)
: true
const includeThinking = isActive || (args.include_thinking ?? false)
const includeToolResults = isActive || (args.include_tool_results ?? false)