refactor(hooks): update delegate-task-retry naming consistency

Rename agent parameter to subagent_type for consistency with delegate-task tool changes.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
justsisyphus
2026-01-22 22:47:01 +09:00
parent 701caedde9
commit 39463a8c2f
2 changed files with 15 additions and 15 deletions
+5 -5
View File
@@ -13,9 +13,9 @@ export const DELEGATE_TASK_ERROR_PATTERNS: DelegateTaskErrorPattern[] = [
fixHint: "Add run_in_background=false (for delegation) or run_in_background=true (for parallel exploration)",
},
{
pattern: "skills",
errorType: "missing_skills",
fixHint: "Add skills=[] parameter (empty array if no skills needed)",
pattern: "load_skills",
errorType: "missing_load_skills",
fixHint: "Add load_skills=[] parameter (empty array if no skills needed). Note: Calling Skill tool does NOT populate this.",
},
{
pattern: "category OR subagent_type",
@@ -60,7 +60,7 @@ export interface DetectedError {
}
export function detectDelegateTaskError(output: string): DetectedError | null {
if (!output.includes("")) return null
if (!output.includes("[ERROR]") && !output.includes("Invalid arguments")) return null
for (const errorPattern of DELEGATE_TASK_ERROR_PATTERNS) {
if (output.includes(errorPattern.pattern)) {
@@ -110,7 +110,7 @@ delegate_task(
prompt="Detailed prompt...",
category="unspecified-low", // OR subagent_type="explore"
run_in_background=false,
skills=[]
load_skills=[]
)
\`\`\`
`