From baff53319631e7160d700389e2ff0f5f5d95bb43 Mon Sep 17 00:00:00 2001 From: temp Date: Mon, 24 Aug 2026 18:42:06 +0800 Subject: [PATCH] fix: disable chat checkpoint resume --- config.example.yaml | 2 +- internal/config/config.go | 3 ++- internal/multiagent/eino_single_runner.go | 21 ++++++++++++--------- internal/multiagent/runner.go | 21 ++++++++++++--------- 4 files changed, 27 insertions(+), 20 deletions(-) diff --git a/config.example.yaml b/config.example.yaml index dd64d702..d0b5e293 100644 --- a/config.example.yaml +++ b/config.example.yaml @@ -304,7 +304,7 @@ multi_agent: plan_execute_executed_steps_budget_ratio: 0.2 # plan_execute 中 executed_steps 预算比例 plan_execute_max_step_result_runes: 4000 # plan_execute 每步结果最大字符数(超出截断) plan_execute_keep_last_steps: 8 # plan_execute 仅保留最近 N 步正文,早期步骤折叠为标题 - checkpoint_dir: data/eino-checkpoints # P0:进程崩溃/OOM 后同会话自动 ADK Resume;正常结束会删 .ckpt;与「中断并继续」(last_react_*) 是两套机制 + checkpoint_dir: "" # 聊天链路不再使用 ADK checkpoint;跨轮模型态统一走 conversations.last_react_*,便于排查 stale context model_retry_max_retries: 0 # Eino 原生 ChatModel retry;408/409/425/429/5xx/网络抖动/空流式输出会重试;0=默认 4(永久性 4xx 不重试) model_retry_max_backoff_sec: 0 # Eino 原生 ChatModel retry 单次退避上限秒数;0=默认 30 model_failover_channels: [] # Eino 原生 ChatModel failover;填写 ai.channels ID,例如 [qwen-plus];retry 耗尽后按顺序切换 diff --git a/internal/config/config.go b/internal/config/config.go index dab3297d..0a6453c8 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -298,7 +298,8 @@ type MultiAgentEinoMiddlewareConfig struct { PlanExecuteMaxStepResultRunes int `yaml:"plan_execute_max_step_result_runes,omitempty" json:"plan_execute_max_step_result_runes,omitempty"` // PlanExecuteKeepLastSteps keeps only the tail steps in prompt view (default 8). PlanExecuteKeepLastSteps int `yaml:"plan_execute_keep_last_steps,omitempty" json:"plan_execute_keep_last_steps,omitempty"` - // CheckpointDir when non-empty enables adk.Runner CheckPointStore (file-backed) for interrupt/resume persistence. + // CheckpointDir is retained for config compatibility. Chat agent runs do + // not consume it; cross-turn recovery is centralized in conversations.last_react_*. CheckpointDir string `yaml:"checkpoint_dir,omitempty" json:"checkpoint_dir,omitempty"` // DeepOutputKey passed to deep.Config OutputKey (session final text); empty = off. DeepOutputKey string `yaml:"deep_output_key,omitempty" json:"deep_output_key,omitempty"` diff --git a/internal/multiagent/eino_single_runner.go b/internal/multiagent/eino_single_runner.go index 623447f4..eb3eb445 100644 --- a/internal/multiagent/eino_single_runner.go +++ b/internal/multiagent/eino_single_runner.go @@ -203,15 +203,18 @@ func RunEinoSingleChatModelAgent( } return runEinoADKAgentLoop(ctx, &einoADKRunLoopArgs{ - OrchMode: "eino_single", - OrchestratorName: einoSingleAgentName, - ConversationID: conversationID, - Progress: progress, - Logger: logger, - SnapshotMCPIDs: snapshotMCPIDs, - StreamsMainAssistant: streamsMainAssistant, - EinoRoleTag: einoRoleTag, - CheckpointDir: ma.EinoMiddleware.CheckpointDir, + OrchMode: "eino_single", + OrchestratorName: einoSingleAgentName, + ConversationID: conversationID, + Progress: progress, + Logger: logger, + SnapshotMCPIDs: snapshotMCPIDs, + StreamsMainAssistant: streamsMainAssistant, + EinoRoleTag: einoRoleTag, + // Chat history recovery is intentionally centralized in last_react_*. + // ADK checkpoints are a second persisted model-state channel and make + // stale-context bugs hard to reason about across user turns. + CheckpointDir: "", RunRetryMaxAttempts: RunRetryMaxAttemptsFromConfig(&ma.EinoMiddleware), RunRetryMaxBackoffSec: int(einoRunRetryMaxBackoffFromConfig(&ma.EinoMiddleware).Seconds()), McpIDsMu: &mcpIDsMu, diff --git a/internal/multiagent/runner.go b/internal/multiagent/runner.go index 4e30d1c1..2016e5d3 100644 --- a/internal/multiagent/runner.go +++ b/internal/multiagent/runner.go @@ -614,15 +614,18 @@ func RunDeepAgent( } return runEinoADKAgentLoop(ctx, &einoADKRunLoopArgs{ - OrchMode: orchMode, - OrchestratorName: orchestratorName, - ConversationID: conversationID, - Progress: progress, - Logger: logger, - SnapshotMCPIDs: snapshotMCPIDs, - StreamsMainAssistant: streamsMainAssistant, - EinoRoleTag: einoRoleTag, - CheckpointDir: ma.EinoMiddleware.CheckpointDir, + OrchMode: orchMode, + OrchestratorName: orchestratorName, + ConversationID: conversationID, + Progress: progress, + Logger: logger, + SnapshotMCPIDs: snapshotMCPIDs, + StreamsMainAssistant: streamsMainAssistant, + EinoRoleTag: einoRoleTag, + // Chat history recovery is intentionally centralized in last_react_*. + // ADK checkpoints are a second persisted model-state channel and make + // stale-context bugs hard to reason about across user turns. + CheckpointDir: "", RunRetryMaxAttempts: RunRetryMaxAttemptsFromConfig(&ma.EinoMiddleware), RunRetryMaxBackoffSec: int(einoRunRetryMaxBackoffFromConfig(&ma.EinoMiddleware).Seconds()), McpIDsMu: &mcpIDsMu,