Plan first, then walk it — the scaffold trick

Most models blurt the first plausible move. A scaffolded agent builds a plan graph first, checks it, then executes. That single discipline lets a 9B model punch at 27B weight. Below, two agents race the same task graph: pink acts greedily step-by-step; lime spends time planning (watch the ghost paths), then walks the verified route.

REACT (greedy)
PLAN-THEN-ACT
drag orbit · scroll zoom

Run the duel

Ready. Each node is a step (tool call, subgoal). Dead-end nodes silently fail — the greedy agent only discovers them by stepping in; the planner probes ahead before moving.

What a scaffold is

The loop around the model: decompose the goal, pick tools, order steps, verify outputs, retry on failure. Traditionally humans hand-wire this (LangChain graphs, state machines). "Self-scaffolding" models learn to author their own step structure at inference time.

ReAct vs Plan-and-Execute

ReAct interleaves think → act → observe one step at a time — cheap but myopic; early mistakes compound. Plan-and-Execute drafts the whole route, critiques it, then executes with checkpoints. Research consistently shows planning helps most on long-horizon, multi-tool tasks.

Why small models win

Error rates multiply: a 95%-per-step agent has just 60% success over 10 steps (0.95¹⁰). Planning removes doomed branches before execution, so a smaller model with verification beats a larger one improvising — capability is loop-shaped, not just parameter-shaped.

Try it in your prompts

Before letting a model act, ask it to: 1) list steps with expected outputs, 2) mark risky steps and a fallback, 3) execute one step at a time, comparing actual vs expected, 4) replan on mismatch. That's a scaffold — no framework required.
Enjoy this tool? Build your own with Super