diff --git a/src/agents/sisyphus.ts b/src/agents/sisyphus.ts index 605cf70e..b7c30286 100644 --- a/src/agents/sisyphus.ts +++ b/src/agents/sisyphus.ts @@ -265,8 +265,18 @@ result = task(...) // Never wait synchronously for explore/librarian 3. When results needed: \`background_output(task_id="...")\` 4. BEFORE final answer: \`background_cancel(all=true)\` -### Resume Previous Agent: -Pass \`resume=task_id\` to continue previous agent with full context preserved. Useful for follow-up questions or multi-turn exploration. +### Resume Previous Agent (CRITICAL for efficiency): +Pass \`resume=session_id\` to continue previous agent with FULL CONTEXT PRESERVED. + +**ALWAYS use resume when:** +- Previous task failed → \`resume=session_id, prompt="fix: [specific error]"\` +- Need follow-up on result → \`resume=session_id, prompt="also check [additional query]"\` +- Multi-turn with same agent → resume instead of new task (saves tokens!) + +**Example:** +\`\`\` +sisyphus_task(resume="ses_abc123", prompt="The previous search missed X. Also look for Y.") +\`\`\` ### Search Stop Conditions diff --git a/src/tools/call-omo-agent/constants.ts b/src/tools/call-omo-agent/constants.ts index 8570669f..21d0c942 100644 --- a/src/tools/call-omo-agent/constants.ts +++ b/src/tools/call-omo-agent/constants.ts @@ -4,4 +4,4 @@ export const CALL_OMO_AGENT_DESCRIPTION = `Spawn explore/librarian agent. run_in Available: {agents} -Pass \`resume=task_id\` to continue previous agent with full context. Prompts MUST be in English. Use \`background_output\` for async results.` +Pass \`resume=session_id\` to continue previous agent with full context. Prompts MUST be in English. Use \`background_output\` for async results.` diff --git a/src/tools/sisyphus-task/constants.ts b/src/tools/sisyphus-task/constants.ts index c468cf7d..c5a5d8fc 100644 --- a/src/tools/sisyphus-task/constants.ts +++ b/src/tools/sisyphus-task/constants.ts @@ -243,7 +243,12 @@ MUTUALLY EXCLUSIVE: Provide EITHER category OR agent, not both (unless resuming) - category: Use predefined category (${BUILTIN_CATEGORIES}) → Spawns Sisyphus-Junior with category config - agent: Use specific agent directly (e.g., "oracle", "explore") - background: true=async (returns task_id), false=sync (waits for result). Default: false. Use background=true ONLY for parallel exploration with 5+ independent queries. -- resume: Task ID to resume - continues previous agent session with full context preserved +- resume: Session ID to resume (from previous task output). Continues agent with FULL CONTEXT PRESERVED - saves tokens, maintains continuity. - skills: Array of skill names to prepend to prompt (e.g., ["playwright", "frontend-ui-ux"]). Skills will be resolved and their content prepended with a separator. Empty array = no prepending. +**WHEN TO USE resume:** +- Task failed/incomplete → resume with "fix: [specific issue]" +- Need follow-up on previous result → resume with additional question +- Multi-turn conversation with same agent → always resume instead of new task + Prompts MUST be in English.`