diff --git a/core/kernel/src/main/kotlin/com/correx/core/kernel/orchestration/SessionOrchestratorExecution.kt b/core/kernel/src/main/kotlin/com/correx/core/kernel/orchestration/SessionOrchestratorExecution.kt index 24bf1694..fbc0e013 100644 --- a/core/kernel/src/main/kotlin/com/correx/core/kernel/orchestration/SessionOrchestratorExecution.kt +++ b/core/kernel/src/main/kotlin/com/correx/core/kernel/orchestration/SessionOrchestratorExecution.kt @@ -367,6 +367,7 @@ internal suspend fun SessionOrchestrator.executeStage( budget = TokenBudget(limit = stageConfig.tokenBudget), ) emitContextTruncationIfNeeded(sessionId, stageId, currentContext) + emitContextAssembled(sessionId, stageId, currentContext) toolRounds++ return runInference( sessionId, stageId, currentContext, stageConfig, config.stageTimeoutMs, responseFormat, effectives, @@ -546,6 +547,7 @@ internal suspend fun SessionOrchestrator.executeStage( budget = TokenBudget(limit = stageConfig.tokenBudget), ) emitContextTruncationIfNeeded(sessionId, stageId, currentContext) + emitContextAssembled(sessionId, stageId, currentContext) inferenceResult = runInference( sessionId, stageId, currentContext, stageConfig, config.stageTimeoutMs, responseFormat, effectives, ) @@ -579,6 +581,7 @@ internal suspend fun SessionOrchestrator.executeStage( entries = accumulatedEntries, budget = TokenBudget(limit = stageConfig.tokenBudget), ) + emitContextAssembled(sessionId, stageId, currentContext) inferenceResult = runInference( sessionId, stageId, currentContext, stageConfig, config.stageTimeoutMs, responseFormat, effectives, withTools = false,