MCPcopy Index your code
hub / github.com/coder/mux / recordBackgroundWorkflowRunReference

Function recordBackgroundWorkflowRunReference

src/node/services/tools/toolUtils.ts:89–108  ·  view source on GitHub ↗
(
  config: ToolConfiguration,
  runId: string,
  createdAtMs: number
)

Source from the content-addressed store, hash-verified

87 * and the history scan fallback can still re-establish provenance for the current context epoch.
88 */
89export async function recordBackgroundWorkflowRunReference(
90 config: ToolConfiguration,
91 runId: string,
92 createdAtMs: number
93): Promise<void> {
94 const workspaceSessionDir = config.workspaceSessionDir;
95 if (workspaceSessionDir == null || workspaceSessionDir.length === 0) {
96 log.warn("Skipping agent workflow run reference without workspace session dir", { runId });
97 return;
98 }
99
100 try {
101 await recordAgentWorkflowRunReference({ workspaceSessionDir, runId, createdAtMs });
102 } catch (error: unknown) {
103 log.warn("Failed to record agent workflow run reference", {
104 runId,
105 error: getErrorMessage(error),
106 });
107 }
108}

Callers 2

createWorkflowResumeToolFunction · 0.90
createWorkflowRunToolFunction · 0.90

Calls 2

getErrorMessageFunction · 0.90

Tested by

no test coverage detected