feat(hooks): add sisyphus-task-retry hook for auto-correction
Helps non-Opus models recover from sisyphus_task call failures: - Detects common errors (missing params, mutual exclusion, unknown values) - Injects retry guidance with correct parameter format - Extracts available options from error messages - Disableable via config: disabledHooks: ['sisyphus-task-retry']
This commit is contained in:
+8
-2
@@ -26,6 +26,7 @@ import {
|
||||
createRalphLoopHook,
|
||||
createAutoSlashCommandHook,
|
||||
createEditErrorRecoveryHook,
|
||||
createSisyphusTaskRetryHook,
|
||||
createTaskResumeInfoHook,
|
||||
createStartWorkHook,
|
||||
createSisyphusOrchestratorHook,
|
||||
@@ -202,6 +203,10 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
|
||||
? createEditErrorRecoveryHook(ctx)
|
||||
: null;
|
||||
|
||||
const sisyphusTaskRetry = isHookEnabled("sisyphus-task-retry")
|
||||
? createSisyphusTaskRetryHook(ctx)
|
||||
: null;
|
||||
|
||||
const startWork = isHookEnabled("start-work")
|
||||
? createStartWorkHook(ctx)
|
||||
: null;
|
||||
@@ -554,8 +559,9 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
|
||||
await emptyTaskResponseDetector?.["tool.execute.after"](input, output);
|
||||
await agentUsageReminder?.["tool.execute.after"](input, output);
|
||||
await interactiveBashSession?.["tool.execute.after"](input, output);
|
||||
await editErrorRecovery?.["tool.execute.after"](input, output);
|
||||
await sisyphusOrchestrator?.["tool.execute.after"]?.(input, output);
|
||||
await editErrorRecovery?.["tool.execute.after"](input, output);
|
||||
await sisyphusTaskRetry?.["tool.execute.after"](input, output);
|
||||
await sisyphusOrchestrator?.["tool.execute.after"]?.(input, output);
|
||||
await taskResumeInfo["tool.execute.after"](input, output);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user