From a8f63d17ffeb18a3d3cd559c89a9cb20de3cb6c8 Mon Sep 17 00:00:00 2001 From: Levi Neely <141506390+lneely@users.noreply.github.com> Date: Sun, 17 May 2026 13:41:01 +0200 Subject: [PATCH] tools-cascade.md: simplify parallel example; clarify async consequence --- prompts/tools-cascade.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/prompts/tools-cascade.md b/prompts/tools-cascade.md index 7490220..555d1b3 100644 --- a/prompts/tools-cascade.md +++ b/prompts/tools-cascade.md @@ -11,13 +11,11 @@ Delegate mechanical subtasks to a cheaper/weaker model. Fire-and-forget: returns cascade: instruction="" [id=""] ``` -Parallel — use `{parallel: [...]}`: +Parallel — issue multiple cascade calls in the same step; they execute concurrently: ``` -execute_code: steps=[{parallel: [ - {code: "cascade 'Read /src/a.go and list all exported functions'"}, - {code: "cascade 'Read /src/b.go and list all exported functions'"}, - {code: "cascade 'Read /src/c.go and list all exported functions'"} -]}] +cascade 'Read /src/a.go and list all exported functions' +cascade 'Read /src/b.go and list all exported functions' +cascade 'Read /src/c.go and list all exported functions' ``` **Returns** (KV, one per line): @@ -41,6 +39,7 @@ You will receive this as your next queued turn. Correlate via the `[from=...]` h - **Instructions must be fully self-contained.** The worker has zero context beyond what you put in the instruction string. Include file paths, expected formats, relevant snippets — everything it needs. - **Never wait for results.** After calling cascade, continue your own work or end your turn. You will be woken when results arrive. +- **Results arrive asynchronously.** Because the callback is a queued turn, cascade is only appropriate for work whose result you do not need in the *current* turn. If you need the answer right now to proceed, do the work yourself. - **One task per call.** Do not bundle multiple unrelated tasks into one instruction. - **Parallelism is safe.** cascade is marked `ollie:parallel read` — multiple calls execute concurrently.