Autonomous coding agent platform · Agentic platform
An autonomous coding agent platform cut runaway loop spend from $4,800 a month to under $600 while trips went up.
Background agents that fix failing builds and resolve merge conflicts were looping on unresolvable tasks. All four PALM SOUQ heuristics now run in the request path and each trip costs single-digit dollars.
- Revenue
- $109,500
- LLM spend
- $58,900
- Gross margin
- 40.4%
- Incidents > $500
- 0
($109,500 - $58,900 LLM - $6,400 other COGS) / $109,500 = 40.4%
+10.8 points vs baseline
3,650 seats. 74 trips, $532.80 in total. No run above its $25 envelope without approval.
Gross margin
29.6% to 40.4%
Day 30: 36.9%
Monthly LLM spend
$61,500 to $58,900
down $2,600
Runaway incidents > $500
4 to 0
per month, baseline to Day 90
The challenge
The platform runs background agents that pick up failing CI runs and merge conflicts. Each step re-sends the repository context, around 150k input tokens, to Claude Sonnet 4.5.
When a conflict cannot be resolved automatically, the agent edits, runs the tests, fails, reverts and tries again. Before PALM SOUQ these loops were found by engineers reading the provider dashboard the next morning.
Max-step limits in the agent runner existed but were set to 2,500 steps so that long refactors could finish. That limit was the loop's ceiling, not a guard.
What was configured
The policy, as deployed.
- 01
All four loop heuristics
Cyclical tool thrashing, token velocity surge (50k tokens/s over a 10 s window), semantic echo detection on repeated edit plans, and a recursion depth cap for spawned sub-agents.
- 02
Per-run budget envelope
Each agent run carries X-PalmSouq-Feature set to the run ID. A run gets a $25 envelope; exceeding it pauses the run and asks the developer to approve more budget.
- 03
Seat-tier quotas
Free and team seats have daily allowances with a soft warning at 80%, so heavy seats see an upgrade prompt instead of a silent bill.
breaker "merge-conflict-loop" {
heuristic = "cyclical_tool_thrashing"
identical_calls = 15
window = "10m"
action = "halt"
}
breaker "velocity" {
heuristic = "token_velocity_surge"
threshold = "50k tokens/s"
window = "10s"
}
envelope "agent-run" {
key = header("X-PalmSouq-Feature")
budget_usd = 25
on_exceed = "pause_and_ask"
}- Cost per call
- 150k input x $3/M + 2k output x $15/M = $0.48
- Calls before the step limit stopped it
- 2,500 calls in 45 minutes
- Cost without a breaker
- 2,500 x $0.48 = $1,200
- Day 90 trips in the month
- 74 x $7.20 = $532.80
- Cost with the breaker at 15 identical calls
- 15 x $0.48 = $7.20
Same arithmetic as the coding loop worked example on the circuit breaker page. Claude Sonnet 4.5 list prices from the PALM SOUQ price table.
Results, snapshot by snapshot
| Revenue | LLM | GM | |
|---|---|---|---|
| Baseline | $96,000 | $61,500 | 29.6% |
| Day 30 | $100,500 | $57,200 | 36.9% |
| Day 90 | $109,500 | $58,900 | 40.4% |
Other COGS: Baseline $6,100, Day 30 $6,200, Day 90 $6,400. GM = (revenue - LLM - other COGS) / revenue.
“One-line drop-in, no latency we could measure, and the circuit breaker stopped tool thrashing completely.”
What the team would tell you.
- More trips is a good sign. Each trip is a loop that used to run to the step limit.
- Budget envelopes per run turned an engineering incident into a product decision the developer makes.
- The recursion cap caught a sub-agent spawning pattern nobody had seen in testing.
More customer stories
Don't wait for a surprise $10,000 OpenAI invoice.
Route your agent traffic through PALM SOUQ in 2 minutes. Change one base URL, pass a tenant header, and every token is attributed and governed.
14-day free production trial · 100k requests included · no card required