Recursive Action Selection
The recursive turn loop is the heart of Paddles. It gives a small model the ability to investigate a workspace iteratively instead of guessing from its training data.
The Loop
Each cycle follows a clear rhythm:
- Assemble interpretation context
- The model selects the next bounded action
- Controller validates against schema and budget
- Execute the action safely
- Append outputs into loop state
- Check: is evidence sufficient?
- If yes, render the final answer. If no, loop back.
The model drives direction. The controller ensures safety.
Action Vocabulary
The model expresses its intentions through a constrained action schema:
| Action | Purpose |
|---|---|
| answer | Render an answer now because evidence is sufficient |
| search | Find relevant files or content in the workspace |
| list_files | Discover candidate files by pattern |
| read | Read a specific file or artifact |
| inspect | Examine read-only workspace state |
| shell / diff / edit | Execute concrete workspace modifications |
| refine | Sharpen a search query based on prior results |
| branch | Split an investigation into parallel subqueries |
| stop | Request final rendering with current evidence |
These are not suggestions the model can ignore. Each action has a schema the controller validates before execution.
Search and Retrieval Contract
search and refine actions are the retrieval contract boundary:
searchstarts a bounded workspace query using the configured retrieval backend.refinereruns retrieval with a new query using the same retrieval contract and current loop context.
Both actions stream evidence through retrieval progress and summary events so the operator can observe query execution while the model keeps looping.
Key retrieval constraints are documented in Search and Retrieval.
Budget Enforcement
Every recursive turn session runs within a bounded budget:
- Step limit — maximum number of action-selection iterations
- Tool budget — maximum number of tool executions
- Evidence budget — maximum items in the evidence bundle
When any budget is exhausted, the loop stops and final rendering proceeds with whatever evidence has been gathered. This prevents runaway investigation while still allowing deep multi-step reasoning.
Steering-Signal-Guided Decisions
The model is not left alone once evidence starts to accumulate. The controller applies steering signals that bias the loop toward more intelligent moves.
| Signal | What it changes |
|---|---|
| Action bias | Adds a review note that biases edit-oriented turns toward likely file action instead of repeated broad retrieval |
| Premise challenge | Adds a review note when sources start to outweigh the original premise, so the model must refine, stop, or continue explicitly |
| Compaction cue | Keeps retained context small enough to stay actionable |
| Budget boundary | Terminates recursion when the hard caps are reached |
Two premise-challenge cases matter most:
- Quiet-step refinement If the loop has gathered evidence but several steps add nothing new, the controller refreshes interpretation context before asking the model again.
- Premise judgement
If the user says "CI is failing" but the gathered sources show only
success,cancelled, or an unconfirmedin_progressrun, repeatinggh run list --limit 20, then--limit 10, then--limit 5is not intelligent work. The controller should stop and make final rendering judge those sources directly.
Deterministic Edit Target Resolution
Edit-oriented turns now pass through a deterministic resolver before the loop
keeps broad-searching or attempts a workspace mutation. The resolver
self-discovers authored workspace paths, respects the repository .gitignore
boundary when present, and produces one of three explicit outcomes:
- Resolved — one authored path won the ranking and can move into
read,diff, or edit actions. - Ambiguous — multiple authored candidates remain viable, so the turn must narrow further instead of guessing.
- Missing — no safe authored target matched the hint, so the controller fails closed and replans instead of mutating the wrong file.
This is a convergence tool, not a full IDE intelligence layer. It does not depend on editor state and it does not promise complete semantic symbol resolution. Its purpose is narrower: keep edit-oriented turns inside safe, authored workspace paths and make misses explainable.
Compaction Planning Today
As the turn loop accumulates evidence across many steps, the working context can grow large. A compaction engine evaluates the retained evidence and produces a structured compaction plan.
That interface is shaped for recursive self-assessment, but the current adapters still rely mostly on bounded heuristics rather than a fully model-judged compaction pass.
Low-value artifacts are pruned from working context, but their content remains reachable through typed locators pointing to the transit tier. This keeps the active context tight without losing depth.
What To Read Next
- Context Tiers — how pruned content stays reachable through locators
- Steering Signals — how controller steering signals shape the loop
- Search and Retrieval — retrieval behavior, modes, and limits