#399·inkos

propose_action 提案被误判为执行失败: 工具结果文本中出现「异常/失败」即返回 502「确认动作执行失败」

作者: locolyric创建于 2026年9月25日更新于 2026年9月25日
标签bug

// these tools echo user/model content (or raw material) rather than pipeline status const CONTENT_ECHO_TOOLS = new Set([ "read", "ls", "grep", "use_skill", "ingest_material", "propose_action", ]);

function isLikelyFailedToolResult(exec: CollectedToolExec): boolean { if (exec.status === "error") return true; if (CONTENT_ECHO_TOOLS.has(exec.tool)) return false; const text = ${exec.error ?? ""}\n${exec.result ?? ""}.toLowerCase(); return /\bfailed\b|\berror\b|失败|异常|出错/.test(text); }

// production tools (e.g. script_create, storyboard_create, play_*, interactive_film_create) that are suppressed by suppressManualTextForTool keep their original text as a fallback