diff --git a/src/main/agent-hooks/server.ts b/src/main/agent-hooks/server.ts index b4bad15907c..1230491ee63 100644 --- a/src/main/agent-hooks/server.ts +++ b/src/main/agent-hooks/server.ts @@ -1990,12 +1990,13 @@ export class AgentHookServer { const reconciledAt = stateChanged ? Math.max(Date.now(), enriched.receivedAt + 1) : enriched.receivedAt - this.state.lastStatusByPaneKey.set(paneKey, { + const reconciled: EnrichedAgentHookEventPayload = { ...enriched, receivedAt: reconciledAt, stateStartedAt: stateChanged ? reconciledAt : enriched.stateStartedAt, payload: { ...enriched.payload, state, subagents } - }) + } + this.state.lastStatusByPaneKey.set(paneKey, reconciled) } if (changedPanes > 0) { this.scheduleStatusPersist()