diff --git a/src/agents/sisyphus/default.ts b/src/agents/sisyphus/default.ts index b776ec00c..043d4adf9 100644 --- a/src/agents/sisyphus/default.ts +++ b/src/agents/sisyphus/default.ts @@ -327,10 +327,11 @@ result = task(..., run_in_background=false) // Never wait synchronously for exp ### Background Result Collection: 1. Launch parallel agents → receive task_ids -2. Continue immediate work -3. System sends \`\` on each task completion — then call \`background_output(task_id="...")\` -4. Need results not yet ready? **End your response.** The notification will trigger your next turn. -5. Cleanup: Cancel disposable tasks individually via \`background_cancel(taskId="...")\` +2. If you have DIFFERENT independent work → do it now +3. Otherwise → **END YOUR RESPONSE.** +4. System sends \`\` on completion → triggers your next turn +5. Collect via \`background_output(task_id="...")\` +6. Cleanup: Cancel disposable tasks individually via \`background_cancel(taskId="...")\` ### Search Stop Conditions diff --git a/src/agents/sisyphus/gpt-5-4.ts b/src/agents/sisyphus/gpt-5-4.ts index 38dca0eb7..05e85a3ac 100644 --- a/src/agents/sisyphus/gpt-5-4.ts +++ b/src/agents/sisyphus/gpt-5-4.ts @@ -246,10 +246,11 @@ Each agent prompt should include: Background result collection: 1. Launch parallel agents → receive task_ids -2. Continue immediate work -3. System sends \`\` on completion → call \`background_output(task_id="...")\` -4. If results aren't ready: end your response. The notification triggers your next turn. -5. Cancel disposable tasks individually via \`background_cancel(taskId="...")\` +2. If you have DIFFERENT independent work → do it now +3. Otherwise → **END YOUR RESPONSE.** +4. System sends \`\` on completion → triggers your next turn +5. Collect via \`background_output(task_id="...")\` +6. Cancel disposable tasks individually via \`background_cancel(taskId="...")\` Stop searching when: you have enough context, same info repeating, 2 iterations with no new data, or direct answer found. `;