Files
openclaw/extensions/codex/src/app-server/thread-lifecycle-errors.ts
T
Ayaan Zaidi 409fb7abca fix(telegram): enforce direct-message tool policies
Enforce configured Telegram direct-message tool policies across queued runs and native harnesses. Unsupported restricted harnesses now refuse visibly; turns without explicit policy keep existing tool access.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-09 19:32:30 +05:30

32 lines
1.1 KiB
TypeScript

import { formatErrorMessage } from "openclaw/plugin-sdk/agent-harness-runtime";
export class CodexThreadStartRequestError extends Error {
constructor(cause: unknown) {
super(formatErrorMessage(cause), { cause });
this.name = "CodexThreadStartRequestError";
}
}
export class CodexThreadBindingConflictError extends Error {
constructor(threadId: string, operation: string) {
super(`Codex thread binding changed while ${operation}: ${threadId}`);
this.name = "CodexThreadBindingConflictError";
}
}
export class CodexRestrictedToolSurfaceAttestationError extends Error {
constructor(cause: unknown) {
super("Codex restricted-tool-surface MCP attestation failed", { cause });
this.name = "CodexRestrictedToolSurfaceAttestationError";
}
}
export class CodexThreadBindingConflictAfterCleanupError extends CodexThreadBindingConflictError {}
export class CodexAdoptedThreadActiveError extends Error {
constructor() {
super("Codex session became active in another runner; wait for it to finish before continuing");
this.name = "CodexAdoptedThreadActiveError";
}
}