PATTERN Cited by 1 source
Fresh-session agent iterations¶
Pattern¶
Create a new agent session for every work iteration and reconstruct its working context from explicit durable state: the current goal, selected peer traces, and artifacts. Do not carry an unbounded private conversation history across iterations. (Source: sources/2026-08-11-aws-scaling-patterns-for-self-organizing-multi-agent-clusters-with-kiro)
Problem¶
A persistent agent session can retain an early, narrow interpretation of the task after peers have found better information. That accumulated conversational history creates behavioral momentum: the agent continues optimizing its previous plan rather than re-evaluating the current shared environment. In a large independent-agent cluster, the effect is drift rather than useful continuity.
Mechanism¶
- Start a fresh session.
- Read the durable goal and a bounded peer/artifact view.
- Choose and perform one contribution.
- Persist the result and next intent in shared state.
- Discard the session history; repeat from the current external state.
The technique relies on the model's fundamental statelessness: conversational continuity is supplied by caller-provided context, so deliberately selecting the next context is a control surface. See concepts/agent-loop-stateless-llm.
Trade-offs¶
- Gain: reduces drift and makes the visible shared record the source of coordination truth.
- Gain: a crashed process loses no hidden coordination state needed by the next iteration.
- Cost: repeatedly loading context consumes tokens and can omit useful private reasoning.
- Cost: stale shared files become more dangerous, so runs need explicit archival or namespacing.
Seen in¶
- sources/2026-08-11-aws-scaling-patterns-for-self-organizing-multi-agent-clusters-with-kiro — every kiro-flock iteration starts a fresh Kiro CLI session; the source identifies this as the response to behavioral drift.