惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

IT之家
IT之家
博客园 - 聂微东
雷峰网
雷峰网
Microsoft Azure Blog
Microsoft Azure Blog
WordPress大学
WordPress大学
Hugging Face - Blog
Hugging Face - Blog
S
SegmentFault 最新的问题
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tailwind CSS Blog
博客园 - 三生石上(FineUI控件)
V
Visual Studio Blog
博客园 - 司徒正美
爱范儿
爱范儿
月光博客
月光博客
阮一峰的网络日志
阮一峰的网络日志
博客园_首页
博客园 - 【当耐特】
Jina AI
Jina AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
酷 壳 – CoolShell
酷 壳 – CoolShell
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
人人都是产品经理
人人都是产品经理
V
V2EX

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
Fix heartbeat runner failure copy (#82848) · openclaw/ope...
joshavant · 2026-05-17 · via Recent Commits to openclaw:main

@@ -87,6 +87,10 @@ import {

8787

} from "../tokens.js";

8888

import type { GetReplyOptions, ReplyPayload } from "../types.js";

8989

import { resolveRunAuthProfile } from "./agent-runner-auth-profile.js";

90+

import {

91+

GENERIC_EXTERNAL_RUN_FAILURE_TEXT,

92+

HEARTBEAT_EXTERNAL_RUN_FAILURE_TEXT,

93+

} from "./agent-runner-failure-copy.js";

9094

import {

9195

buildEmbeddedRunExecutionParams,

9296

resolveQueuedReplyRuntimeConfig,

@@ -480,8 +484,6 @@ function collapseRepeatedFailureDetail(message: string): string {

480484

const SAFE_MISSING_API_KEY_PROVIDERS = new Set(["anthropic", "google", "openai", "openai-codex"]);

481485

const EXTERNAL_RUN_FAILURE_DETAIL_MAX_CHARS = 900;

482486

const AGENT_FAILED_BEFORE_REPLY_TEXT = "Agent failed before reply:";

483-

const GENERIC_EXTERNAL_RUN_FAILURE_TEXT =

484-

"⚠️ Something went wrong while processing your request. Please try again, or use /new to start a fresh session.";

485487486488

type ExternalRunFailureReply = {

487489

text: string;

@@ -581,15 +583,9 @@ function formatForwardedExternalRunFailureText(message: string): string {

581583582584

function buildExternalRunFailureReply(

583585

message: string,

584-

options?: { includeDetails?: boolean },

586+

options?: { includeDetails?: boolean; isHeartbeat?: boolean },

585587

): ExternalRunFailureReply {

586588

const normalizedMessage = collapseRepeatedFailureDetail(message);

587-

if (isToolResultTurnMismatchError(normalizedMessage)) {

588-

return {

589-

text: "⚠️ Session history got out of sync. Please try again, or use /new to start a fresh session.",

590-

isGenericRunnerFailure: false,

591-

};

592-

}

593589

const missingApiKeyFailure = buildMissingApiKeyFailureText(normalizedMessage);

594590

if (missingApiKeyFailure) {

595591

return { text: missingApiKeyFailure, isGenericRunnerFailure: false };

@@ -608,6 +604,15 @@ function buildExternalRunFailureReply(

608604

isGenericRunnerFailure: false,

609605

};

610606

}

607+

if (options?.isHeartbeat) {

608+

return { text: HEARTBEAT_EXTERNAL_RUN_FAILURE_TEXT, isGenericRunnerFailure: false };

609+

}

610+

if (isToolResultTurnMismatchError(normalizedMessage)) {

611+

return {

612+

text: "⚠️ Session history got out of sync. Please try again, or use /new to start a fresh session.",

613+

isGenericRunnerFailure: false,

614+

};

615+

}

611616

const cliBackendTimeoutFailure = buildCliBackendTimeoutFailureText(normalizedMessage);

612617

if (cliBackendTimeoutFailure) {

613618

return { text: cliBackendTimeoutFailure, isGenericRunnerFailure: false };

@@ -2590,8 +2595,12 @@ export async function runAgentTurnWithFallback(params: {

25902595

!shouldSurfaceToControlUi

25912596

? buildExternalRunFailureReply(message, {

25922597

includeDetails: isVerboseFailureDetailEnabled(params.resolvedVerboseLevel),

2598+

isHeartbeat: params.isHeartbeat,

25932599

})

25942600

: undefined;

2601+

const genericFallbackText = params.isHeartbeat

2602+

? HEARTBEAT_EXTERNAL_RUN_FAILURE_TEXT

2603+

: GENERIC_EXTERNAL_RUN_FAILURE_TEXT;

25952604

const fallbackText = isBilling

25962605

? BILLING_ERROR_USER_MESSAGE

25972606

: isRateLimit && !isOverloadedErrorMessage(message)

@@ -2604,7 +2613,7 @@ export async function runAgentTurnWithFallback(params: {

26042613

? "⚠️ Message ordering conflict - please try again. If this persists, use /new to start a fresh session."

26052614

: shouldSurfaceToControlUi

26062615

? `⚠️ Agent failed before reply: ${trimmedMessage}.\nLogs: openclaw logs --follow`

2607-

: (externalRunFailureReply?.text ?? GENERIC_EXTERNAL_RUN_FAILURE_TEXT);

2616+

: (externalRunFailureReply?.text ?? genericFallbackText);

26082617

const userVisibleFallbackText = resolveExternalRunFailureTextForConversation({

26092618

text: fallbackText,

26102619

sessionCtx: params.sessionCtx,