Adds targeted recovery guidance for failed delegation (task) calls by analyzing
tool output and appending a concise retry hint that preserves the existing model
conversation context.
index.ts re-exports:
createDelegateTaskRetryHookbuildRetryGuidancepatterns.ts defines the typed DelegateTaskErrorPattern contract and ordered
detection catalog (DELEGATE_TASK_ERROR_PATTERNS).detectDelegateTaskError(output):
buildRetryGuidance(errorInfo) maps each match to user-facing fix text,
optionally appending Available: suggestions parsed from tool output.hook.ts returns a tool.execute.after handler and mutates only string
outputs.{ tool, output } after task execution.task tools and non-string outputs.detectDelegateTaskError scans
configured patterns.output.output with correction
guidance and example task(...) usage.src/index.ts under tool.execute.after.{ tool: string } + { output: unknown })
to stay aligned with tool-callback shape and avoid side-effecting unrelated
callbacks.