You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A provider failure currently reaches Lisp with a coarse envelope, and agent.core converts its :provider-error action into fatal fail. A workflow therefore cannot inspect the failure and choose whether to retry the same LLM alias, restart on another alias, or abort.
This is the recovery-contract dependency identified by #1240. It is not a dependency of model routing itself.
Private exception diagnostics are insufficient: workflow policy needs stable, bounded, public kind and reason values. Conversely, a transport failure must not be classified as a subject/model failure.
Proposed contract
Classify expected transport failures into stable public reasons while retaining bounded details and private diagnostics under their existing disclosure rules.
Make agent.core/run-outcome return a distinct provider outcome:
Keep agent.core/run-value, run-result-value, and agent.main fail-fast. Recovery is available only to workflows that deliberately call run-outcome.
Do not add a runtime recovery: retry | choose-alternate | abort axis. Stable kind + reason are facts; the disposition is workflow policy.
Do not promise transcript-preserving failover. Restarting with another alias starts another loop unless a separate feature later exposes resumable state.
When #1240 lands, every post-resolution LLM failure must carry the resolved installation alias (and public installation revision where appropriate), including when the caller omitted model and the manifest default resolved it.
At minimum, workflows must be able to distinguish:
transient transport/provider failure: retrying the same alias may work;
per-alias quota exhaustion: the same alias cannot run, but another may;
global LLM capability quota exhaustion: no selected alias can run;
invalid or unknown alias: correct the request; no provider attempt occurred.
A single retryable? boolean does not encode all three recovery dispositions, so callers act on the closed kind and reason vocabulary.
Compatibility
This changes run-outcome behavior for provider failures. It must not change the existing fail-fast behavior of agent.main or misclassify infrastructure failure as subject behavior.
Acceptance criteria
Stable public transport reasons are documented and tested at the Dispatcher/LLM boundary.
run-outcome returns :provider-failure with the complete bounded error.
run-value, run-result-value, and agent.main remain fail-fast.
Problem
A provider failure currently reaches Lisp with a coarse envelope, and
agent.coreconverts its:provider-erroraction into fatalfail. A workflow therefore cannot inspect the failure and choose whether to retry the same LLM alias, restart on another alias, or abort.This is the recovery-contract dependency identified by #1240. It is not a dependency of model routing itself.
Private exception diagnostics are insufficient: workflow policy needs stable, bounded, public
kindandreasonvalues. Conversely, a transport failure must not be classified as a subject/model failure.Proposed contract
agent.core/run-outcomereturn a distinct provider outcome:{:status :provider-failure :error error :model alias}agent.core/run-value,run-result-value, andagent.mainfail-fast. Recovery is available only to workflows that deliberately callrun-outcome.recovery: retry | choose-alternate | abortaxis. Stablekind+reasonare facts; the disposition is workflow policy.When #1240 lands, every post-resolution LLM failure must carry the resolved installation alias (and public installation revision where appropriate), including when the caller omitted
modeland the manifest default resolved it.Failure distinctions required by #1240
At minimum, workflows must be able to distinguish:
A single
retryable?boolean does not encode all three recovery dispositions, so callers act on the closedkindandreasonvocabulary.Compatibility
This changes
run-outcomebehavior for provider failures. It must not change the existing fail-fast behavior ofagent.mainor misclassify infrastructure failure as subject behavior.Acceptance criteria
run-outcomereturns:provider-failurewith the complete bounded error.run-value,run-result-value, andagent.mainremain fail-fast.Related