freshContextPerIteration property

bool freshContextPerIteration
getter/setter pair

Whether each re-invocation restarts from a clean context: the original input messages plus an aggregated feedback log, rather than the latest feedback appended to the prior conversation. Defaults to false.

This rebuilds the input messages each iteration and resets the session before each re-invocation. When the loop owns the session it creates a new one each iteration; when the caller supplies a session, the loop serializes it once at the start of the run and restores a fresh clone before each re-invocation (requiring the wrapped agent to support session serialization).

Implementation

bool freshContextPerIteration = false;