Agent costs are estimated, not known up front. Stub holds the estimate against the cap, then books the real cost when it lands and refunds the difference. A retried settlement can never double-charge the vendor, because the reservation can be settled exactly once under the database's concurrency control.
The estimated cost is held against the budget hierarchy in one transaction. The cap is enforced now, so held funds can't be spent twice.
Your agent makes the real paid call. The actual cost comes back, often lower than the estimate.
The reservation books the actual amount as a double-entry line and refunds the unused hold. Settling again is a no-op.
Reserve an estimate, then settle for the actual cost or release it.