fix: avoid blocking terminal trace reads

This commit is contained in:
lyon
2026-06-18 18:08:25 +08:00
parent 5604cd0f8a
commit e0c3b80c48
2 changed files with 138 additions and 3 deletions
+1 -3
View File
@@ -2564,9 +2564,7 @@ export async function handleCodeAgentTraceHttp(request, response, url, options)
agentRunResult = synced.result ?? agentRunResult;
}
if (isTraceCommandTerminalStatus(agentRunResult?.status)) {
await finalizeCodeAgentBillingUsage({ payload: agentRunResult, params: agentRunResult, options: requestOptions });
recordCodeAgentConversationFact(agentRunResult, requestOptions);
await recordCodeAgentSessionOwner({ payload: agentRunResult, params: agentRunResult, options: requestOptions, status: codeAgentOwnerStatusForResult(agentRunResult), preserveLastTraceId: true });
scheduleCodeAgentTerminalTurnStatusEffects({ payload: agentRunResult, params: agentRunResult, options: requestOptions, preserveLastTraceId: true });
}
} catch (error) {
refreshError = error;