From d38fb29e054d87c41e9c9dffa50f27dbaf370be2 Mon Sep 17 00:00:00 2001 From: Siddharth Ganesan Date: Tue, 27 Jan 2026 11:21:42 -0800 Subject: [PATCH] Fix trace spans --- apps/sim/executor/execution/executor.ts | 4 +++- apps/sim/tools/rds/execute.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/sim/executor/execution/executor.ts b/apps/sim/executor/execution/executor.ts index cc2dcba4f..dd303217e 100644 --- a/apps/sim/executor/execution/executor.ts +++ b/apps/sim/executor/execution/executor.ts @@ -233,7 +233,9 @@ export class DAGExecutor { userId: this.contextExtensions.userId, isDeployedContext: this.contextExtensions.isDeployedContext, blockStates: state.getBlockStates(), - blockLogs: snapshotState?.blockLogs ?? [], + // For run-from-block, start with empty logs - we only want fresh execution logs for trace spans + // The snapshot's blockLogs are preserved separately for history + blockLogs: overrides?.runFromBlockContext ? [] : (snapshotState?.blockLogs ?? []), metadata: { ...this.contextExtensions.metadata, startTime: new Date().toISOString(), diff --git a/apps/sim/tools/rds/execute.ts b/apps/sim/tools/rds/execute.ts index 9a26ed3fe..b297a4838 100644 --- a/apps/sim/tools/rds/execute.ts +++ b/apps/sim/tools/rds/execute.ts @@ -1,4 +1,4 @@ - import type { RdsExecuteParams, RdsExecuteResponse } from '@/tools/rds/types' +import type { RdsExecuteParams, RdsExecuteResponse } from '@/tools/rds/types' import type { ToolConfig } from '@/tools/types' export const executeTool: ToolConfig = {