MCPcopy
hub / github.com/claude-code-best/claude-code / markAutonomyRunFailed

Function markAutonomyRunFailed

src/utils/autonomyRuns.ts:741–760  ·  view source on GitHub ↗
(
  runId: string,
  error: string,
  rootDir?: string,
  nowMs?: number,
)

Source from the content-addressed store, hash-verified

739}
740
741export async function markAutonomyRunFailed(
742 runId: string,
743 error: string,
744 rootDir?: string,
745 nowMs?: number,
746): Promise<AutonomyRunRecord | null> {
747 const endedAt = nowMs ?? Date.now()
748 const updated = await updateAutonomyRun(
749 runId,
750 current =>
751 isActiveAutonomyRunStatus(current.status)
752 ? failAutonomyRunRecord(current, error, endedAt)
753 : null,
754 rootDir,
755 )
756 if (updated) {
757 await syncFailedManagedFlowForRun(updated, rootDir ?? updated.rootDir)
758 }
759 return updated
760}
761
762export async function markAutonomyRunCancelled(
763 runId: string,

Callers 6

killInProcessTeammateFunction · 0.85
runInProcessTeammateFunction · 0.85
runHeadlessStreamingFunction · 0.85
useScheduledTasksFunction · 0.85

Calls 5

updateAutonomyRunFunction · 0.85
failAutonomyRunRecordFunction · 0.85
nowMethod · 0.80

Tested by

no test coverage detected