mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-14 15:06:07 +00:00
Compaction failure and timeout recovery can no longer leave a session transcript assistant-last and wedged after restoring pre-compaction state. Transcript-continuation failures now carry a typed agent-core error code and no longer demote the active model through model fallback scoring. Surface: embedded agent runner compaction recovery, model fallback classification, packages/agent-core. Refs #100312. Includes regression coverage for #99943.
15 lines
490 B
TypeScript
15 lines
490 B
TypeScript
import type { AgentMessage } from "./types.js";
|
|
|
|
export const TRANSCRIPT_NOT_CONTINUABLE_ERROR_CODE = "openclaw_transcript_not_continuable";
|
|
|
|
export class TranscriptNotContinuableError extends Error {
|
|
public readonly code = TRANSCRIPT_NOT_CONTINUABLE_ERROR_CODE;
|
|
public readonly role: AgentMessage["role"];
|
|
|
|
constructor(role: AgentMessage["role"]) {
|
|
super(`Cannot continue from message role: ${role}`);
|
|
this.name = "TranscriptNotContinuableError";
|
|
this.role = role;
|
|
}
|
|
}
|