MCPcopy Create free account
hub / github.com/claude-code-best/claude-code / invokeBackend

Function invokeBackend

packages/workflow-engine/src/engine/hooks.ts:160–163  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

158 // this is a workflow configuration problem, not a transient backend failure; retrying is meaningless and would mask the bug.
159 const adapter = registry ? registry.resolve(params) : null
160 const invokeBackend = (): Promise<AgentRunResult> =>
161 adapter
162 ? adapter.run(params, adapterCtx!)
163 : ctx.ports.agentRunner.runAgentToResult(params, ctx.host)
164
165 // Auto-retry once on failure: dead (terminal API error after retries) or a non-abort throw
166 // both get one retry chance; WorkflowAbortedError (kill) is not retried — it is the user's intent.

Callers 1

agentFunction · 0.85

Calls 1

runMethod · 0.80

Tested by

no test coverage detected