gunk-dev/the-valley

bd-5cb2034-unbounded-loops-under-demand-pressure.md

source5a2078af8835main's published tip history
3.9 KiB · Rendered
1---
2type: bug
3id: bd-5cb2034
4status: open
5title: Standing demand pressure risks runaway agent dispatch loops without hard budget latches
6created: 2026-09-01
7source: knowledge base design review, 2026-09-01
8---
9
10# Demand pressure risks runaway dispatch loops without budget latches
11
12The system design introduces standing demand pressure as an anti-stall mechanism ([[ida-3145b7a]]).
13A scheduler controller continuously reconciles the outcome DAG, detecting stalled or unblocked
14frontier nodes and dispatching autonomous agents (klaus) to unblock them ([[ida-eac723e]]). When
15automated dispatch operates without strict global spending ceilings, decomposition recursion limits,
16and execution circuit breakers, standing demand pressure risks triggering runaway LLM token
17expenditure and severe semantic drift.
18
19## The failure modes of autonomous anti-stall
20
21Autonomous AI agents fail frequently and unpredictably. When an agent fails to complete an
22outcome—by producing unparseable diffs, failing test assertions, or introducing conflicting
23changes—standing demand pressure treats the failure as a stall condition to be actively reconciled.
24
25Without hard protective latches, this reconciliation loop creates two failure modes:
26
271. **Runaway retry storms and financial burn.** An agent run that fails verification or dies
28 unexpectedly loses its in-progress lease. The scheduler immediately marks the outcome as open on
29 the unblocked frontier and dispatches a fresh agent run. Under unattended operation, this loop
30 can execute continuously overnight, consuming hundreds of dollars in API credits on an unsolvable
31 task or a broken environment.
322. **Recursive decomposition and semantic drift.** When an agent attempts to resolve a complex
33 outcome by decomposing it into multiple sub-outcomes in the graph, the newly created nodes become
34 part of the frontier and trigger subsequent agent dispatches. If sub-agents further decompose
35 their assigned tasks without human architectural oversight, the outcome graph rapidly expands
36 with hallucinated or redundant work, drifting far from the operator's actual requirements.
37
38## Why this is acceptable today
39
40Agent runs are currently dispatched interactively by the human operator using explicit run-budget
41arguments. The autonomous background scheduler described in [[ida-eac723e]] and [[ida-3145b7a]] is
42still an exploratory design and has not been wired to automated loop daemons. The risk is an
43existential operational threat that must be resolved before automated dispatch is activated.
44
45## Directions, not decisions
46
47- **Global financial circuit breakers.** Enforce hard token and dollar spending ceilings (per hour
48 and per day) at the actuator boundary ([[ida-f1b39e8]]). When the ceiling is reached, all
49 automated dispatch halts until a human resets the latch.
50- **Strict retry caps and backoff.** Limit automated retry attempts per outcome to a small fixed
51 count (e.g., two attempts). Upon repeated failure, the outcome is marked as blocked on human
52 review rather than returned to the frontier.
53- **Decomposition approval gates.** Restrict autonomous agents from adding new blocking outcome
54 nodes to the graph without explicit human sign-off, or limit recursive decomposition depth to a
55 maximum of one level.
56- **Dead-letter outcomes.** Move persistently failing or cycling outcomes to an explicit dead-letter
57 queue, isolating them from standing demand pressure.
58
59## Related
60
61- Demand pressure: [[ida-3145b7a]]
62 ([ida-3145b7a-demand-pressure.md](../ideas/ida-3145b7a-demand-pressure.md))
63- Outcome DAG scheduler: [[ida-eac723e]]
64 ([ida-eac723e-outcome-dag.md](../ideas/ida-eac723e-outcome-dag.md))
65- Actuator effect boundary: [[ida-f1b39e8]]
66 ([ida-f1b39e8-outbound-effects-pass-through-an-actuator.md](../ideas/ida-f1b39e8-outbound-effects-pass-through-an-actuator.md))
67- Incident memory: [design/roadmap.md](../../design/roadmap.md#phase-7--feedback--incident-memory)