Skip to content

Commit b35072f

Browse files
committed
Fix messages that are sent
On each loop iteration, we need to get the latest messages slice Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
1 parent beee398 commit b35072f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

pkg/runtime/runtime.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ func (r *runtime) RunStream(ctx context.Context, sess *session.Session) <-chan E
228228
return
229229
}
230230
slog.Debug("Starting conversation loop iteration", "agent", a.Name())
231+
// Looping, get the updated messages from the session
232+
messages := sess.GetMessages(a)
231233
slog.Debug("Retrieved messages for processing", "agent", a.Name(), "message_count", len(messages))
232234

233235
// Retry loop for getting agent tools with OAuth handling

0 commit comments

Comments
 (0)