Files
openclaw/packages/agent-core/src/errors.ts
Ayaan Zaidi 486033b183 fix(agents): normalize compaction recovery tails
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.
2026-07-07 02:09:21 +00:00

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;
}
}