Law 08 · Reasoning & Planning

Branch When the First Step Matters

For decisions you can't take back, explore before you commit.

Diagram explaining Branch When the First Step Matters

The principle

Tree-of-Thoughts generalizes linear reasoning into a search: generate several candidate thoughts, self-evaluate, look ahead, and backtrack instead of being trapped left-to-right. This matters most where an early decision is pivotal — exactly the situations where an agent's first irreversible action determines everything downstream. Cheap, recoverable steps don't need it; pivotal ones do.

Why it happens

Linear reasoning is trapped left-to-right: once an early thought is generated it conditions everything after it, so a pivotal wrong first move poisons the entire downstream trajectory with no way back. Search-based reasoning breaks that trap by generating multiple candidate next steps, scoring them, and backtracking, which is why it pays off most exactly where an early decision is irreversible. Language Agent Tree Search (Zhou et al., 2023) extended this from pure reasoning to acting agents using Monte Carlo tree search with the model as its own value function, and the lookahead-plus-backtrack structure doubled ReAct's performance on a multi-hop QA benchmark and reached 92.7% pass@1 on a coding benchmark with GPT-4. The economics decide when to use it: branching costs extra tokens up front, trivial for a pivotal cutover decision but pure waste for a cheap reversible step, so you reserve deliberate search for the high-leverage first moves.

Watch for

In practice

A migration agent picks a database cutover strategy on its first instinct, big-bang swap, and everything downstream (backfill, rollback plan, dual-write window) is now locked to that pivotal early choice that turns out wrong. Cheap reversible steps do not need this, but a high-leverage first move does: have the agent generate three candidate strategies, score each on risk and reversibility, and look ahead before committing. The branching cost is trivial next to re-running a botched cutover.

Apply it

  1. Reserve branching for early actions that are high-leverage or hard to reverse, not cheap recoverable ones.
  2. Have the agent generate several candidate plans and score each on risk and reversibility before picking.
  3. Look ahead and allow backtracking on the pivotal step instead of committing to the first path.

The takeaway

When an early action is high-leverage or irreversible, have the agent generate and score several candidate plans before picking one — don't commit to the first path.

Sources and further reading

Related laws

Read every law in the digital edition Back to all 50 laws