query.ts 10-Step Loop

Description

Fully dissected per-iteration structure of the query.ts state-machine while-loop: 10 ordered steps from context compression through continue/exit decision, implemented as a state machine (not recursion) to avoid stack overflow on hundreds of tool calls.

Key claims

Relations

Sources

src-20260419-f46b0a2fccd9