| 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. |