Skip to content

CASE / 02PYTHON / AGENT RUNTIME / FAILURE HANDLING

Permission to act needs
an outcome you can inspect.

In Ares, my independent Hermes downstream, I connected consumed per-call permits to the resulting tool outcome. The interesting part is what the runtime reports when execution or evidence recording fails.

THE CHANGE

Keep the permit and its outcome together.

Problem
A preflight approval says a call may proceed. It does not tell the operator whether dispatch returned, raised after a possible side effect, or succeeded while receipt recording failed.
Implementation
The dispatcher retains the settlement adapter returned by the consume-time boundary. After dispatch, it records the canonical permit reference, preflight receipt, outcome state, elapsed duration, and error type through that same adapter.
Design choice
Reusing the consume-time owner preserves the relationship between authorization and outcome. Looking up a new adapter afterward could separate the effect from the authority that admitted it.
Scope
PR #28 was merged in RecursiveIntell/Ares. This is a downstream change, not an upstream Hermes merge. The case concerns this historical revision and the declared regression paths.
Inspect merged Ares PR #28 ↗
FAILURE BEHAVIOR

Do not collapse uncertainty into success.

Dispatch returns
A normal result records an ok outcome. A returned tool error records an error outcome with tool_error classification.
Dispatch raises
The outcome is ambiguous. An exception alone does not prove that no side effect occurred, so it is unsafe to interpret it as an automatic retry signal.
Receipt fails
The caller receives ARES_EFFECT_RECEIPT_FAILED instead of a success result. This exposes missing evidence; it does not undo a side effect that already happened.
Permission denied
The denied call does not dispatch or record an outcome for an unconsumed permit.
Inspect the regression scenarios ↗
REPRODUCIBLE INSPECTION

Read the implementation beside its tests.

Revision
bae48e0afa7fe2183b6acf13b851b280805d63bf
Setup
Check out this revision of RecursiveIntell/Ares, then run uv sync --frozen --extra dev with a supported Python interpreter.
Test command
scripts/run_tests.sh tests/test_model_tools.py tests/test_ares_collaboration.py. The repository wrapper isolates test files and strips credential variables.
Evidence boundary
The dispatch regression tests use test doubles. They demonstrate the declared branches in the Python runtime; they do not establish live daemon durability, real external side effects, production adoption, or complete security.
Next proof gate
A real adapter integration run should capture a consumed permit and persisted outcome, then exercise receipt transport loss and restart recovery. That is a separate validation step.