Mahal Systems

Overview › 7Orchestration › b.Bounding execution

Bounding execution

Bound execution and fail gracefully. 4 optimizations.

  1. i.

    Detect stalls and loops: warn, then stop early

    Track repeated identical actions (same tool, same arguments; same search query) and turns with no new information.

    Better qualityLower costFaster

    Tier 2 · reliability · changes control flow · any agent · 10 sources

  2. ii.

    Keep errors in context

    Return every failed action to the model as an error it can read (the call, the cause, a capped trace) instead of swallowing the exception, retrying silently, returning an empty result or deleting the failed attempt, and collapse each error once it is resolved.

    Better governanceMixed qualityMixed cost

    Tier 2 · reliability · changes control flow, context · any agent · 11 sources, 7 measured

  3. iii.

    Size run budgets so productive runs aren't cut off: turn caps, deadlines, command timeouts

    Set the turn or step cap, the wall-clock deadline and per-command timeouts from what runs that succeeded actually needed, not from framework defaults, so a run that is still making progress is not stopped short.

    Mixed costMixed performance

    Tier 2 · reliability · changes control flow · any agent · 4 sources

  4. iv.

    Track explicit progress: a task list with a status per item, re-injected each turn

    Give the agent a task-list tool (each item with a status, one in progress at a time), ask for the list on the first turn of non-trivial tasks, and re-inject the current list after the system prompt each turn instead of keeping old copies in history.

    Mixed qualityMixed costMixed performance

    Tier 3 · tuning · changes control flow, context · planning agents · 1 source, 1 measured

See also

  1. 2.b.i

    Make tool calls and tool results fail soft, and retry transient failures

    Keep a failed call from ending the run: validate tool calls and model responses, return tool errors to the agent as results, and retry only failures that are transient and safe to repeat.

    Tools › Avoiding misuse

    Better qualityHigher cost

    Tier 2 · reliability · changes tool surface, control flow · tool use agents · 9 sources, 4 measured

Before you go...

Build better agents, weekly

Our latest research, performance benchmarks, optimization strategies, and updates around AOT development.

One email a week, nothing else. Unsubscribe anytime.