@@ -274,7 +274,7 @@ export async function executeAgentIteration(agentId: string): Promise<void> {
274274 // Log based on source
275275 if ( fromCache ) {
276276 Logger . info ( agentId , `Using cached response - no significant change detected` , {
277- logType : 'iteration-cached- response' ,
277+ logType : 'iteration-response' ,
278278 iterationId,
279279 content : { usingCache : true }
280280 } ) ;
@@ -290,12 +290,24 @@ export async function executeAgentIteration(agentId: string): Promise<void> {
290290 if ( isAgentLoopRunning ( agentId ) ) {
291291 recordingManager . handleEndOfLoop ( ) ;
292292 }
293- Logger . info ( agentId , `Iteration completed` , {
294- logType : 'iteration-end' ,
295- iterationId,
296- content : { success : true , cached : fromCache }
297- } ) ;
298- } catch ( postProcessError ) {
293+
294+ // Dispach to UI that we skipped the model call and completed iteration
295+ if ( fromCache ) {
296+ Logger . info ( agentId , `Iteration completed - no significant change detected` , {
297+ logType : 'iteration-skipped' ,
298+ iterationId,
299+ content : { success : true , cached : fromCache }
300+ } ) ;
301+ }
302+ // Dispach we completed with model call
303+ else {
304+ Logger . info ( agentId , `Iteration completed` , {
305+ logType : 'iteration-end' ,
306+ iterationId,
307+ content : { success : true , cached : fromCache }
308+ } ) ;
309+ }
310+ } catch ( postProcessError ) {
299311 Logger . error ( agentId , `Error in postProcess: ${ postProcessError } ` , { iterationId, error : postProcessError } ) ;
300312
301313 // Error path - still clean up but log failure
0 commit comments