Overview
The local loop is:
- Plan a feature, task, research objective, or operating procedure.
- Execute it with the current harness and instructions.
- Observe delays, mistakes, unnecessary tool calls, failed approaches, and successful shortcuts.
- Ask how the same result could have been reached faster, with fewer steps, or with fewer tokens.
- Distill the answer into a short, reusable rule.
- Add the rule to the local instruction file.
- Apply the updated file on the next task.
For example, an agent may edit one file through many sequential calls even though it could have read the complete file and replaced it in one write. The durable lesson is not a record of every edit. It is a concise rule: when making widespread changes to one file, prefer one coherent rewrite over many serial edits when that is safe and appropriate.
A second recurring pattern is maintaining a log of what not to do. This functions like experiment notes. It records approaches that repeatedly fail, tools that should not be retried indefinitely, conditions under which a method breaks, and actions that waste context. By excluding known-bad regions of the solution space, the agent can focus future effort on the remaining possibilities.
The global loop operates at a slower cadence:
- Accumulate many local runs across several projects.
- Analyze conversation histories or project notes for repeated patterns.
- Identify failures or preferences that occur across workspaces rather than in one project.
- Distill them into short, high-information-density rules.
- Manually review for correctness, contradiction, and overgeneralization.
- Add only the highest-value rules to the global instruction layer.
Human review is essential at this stage because global rules affect every future project. Agentic steps also compound uncertainty. If three independent steps were each 90 percent reliable, the combined probability of all three being correct would be about 73 percent. A mistaken global rule can therefore spread a local misunderstanding across the entire workflow.