01 / ZERO-TRUST HEADER FLIGHT
Zero-Trust Header Mode
Your provider credential travels in x-upstream-key and is held in RAM while this request is forwarded.
[ GATEWAY SPECIFICATION // REV-2026 ]
A drop-in reverse proxy that catches infinite tool loops and enforces hard spend caps in volatile RAM. Sub-35ms overhead. Zero payload retention.
curl -I https://circuit-breaker-api.onrender.com/health12:08:41.018 POST /v1/chat/completions
12:08:41.021 window scan: prompt hash match 1/3
12:08:41.024 spend check: within configured cap
HTTP/2 200 · upstream response passed
Simulated trace · example values
Trust model // implementation details
Security claims should match the code. Inspect the header flight and verify the public sandbox directly from your terminal.
01 / ZERO-TRUST HEADER FLIGHT
Your provider credential travels in x-upstream-key and is held in RAM while this request is forwarded.
02 / ZERO-AUTH TERMINAL SANDBOX
We don't store your key—it exists only in RAM for this single request. Sandbox calls are capped at $5/hour and $20/day per server process; requests are forwarded to OpenAI using your credential.
curl -X POST https://circuit-breaker-api.onrender.com/v1/chat/completions \
-H "Authorization: Bearer cb_sandbox_test" \
-H "x-upstream-key: sk-proj-YOUR_OPENAI_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"Verify Shunt proxy"}]}'ARCHITECTURE // REQUEST PATH
01 / REQUEST FLOW
02 / LOOP STOP RESPONSE
{
"id": "chatcmpl-shunt-1791402483",
"object": "chat.completion",
"created": 1791402483,
"model": "gpt-4o-mini",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "[SHUNT ALERT]: Autonomous agent execution halted."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 14,
"completion_tokens": 0,
"total_tokens": 14
},
"circuit_breaker": {
"triggered": true,
"reason": "Prompt repetition threshold exceeded."
}
}03 / VOLATILE MEMORY
<15ms
memory execution target
04 / MICRO-DOLLAR ACCOUNTING
Requests are checked against hourly and daily account caps before they are sent upstream. The bars below illustrate cap windows, not live account utilization.
CAP THRESHOLD · USAGE NOT SHOWN
CAP THRESHOLD · USAGE NOT SHOWN
Performance figures are engineering targets and depend on deployment, network conditions, and request profile.
INTERACTIVE REQUEST SIMULATION
$ agent.run --task "insert order"
The agent repeats the same database write after an unchanged retry.
CLIENT CONFIGURATION
from openai import OpenAI
client = OpenAI(
base_url="https://circuit-breaker-api.onrender.com/v1",
api_key="cb_live_...",
)FAILURE ANALYSIS // ILLUSTRATIVE SCENARIO
An unhandled SQL error leaves an agent retrying the same tool call at 120 attempts per minute. In this example, the sliding deque recognizes the repeat at attempt three and interrupts the cycle before the remaining requests are sent.
The $680+ / 45-minute cost is a modeled scenario, not measured customer spend. Estimated avoided spend assumes $35 per intercepted incident.
01 · 00:00
SQL write fails
Agent receives retryable error.
02 · 00:01
Retry cadence begins
Unchanged tool plan repeats at 120/min.
03 · 00:02
Attempt #3 detected
Prompt fingerprint crosses repeat threshold.
04 · 00:02+
Loop halted
$680+ illustrative exposure avoided.

Built by Roan de Jager (@roandejager) in Norway.
I built Shunt after an autonomous agent got trapped in a recursive tool retry loop and burned through hundreds of dollars in API credits overnight. It's built in Python and FastAPI for sub-35ms raw performance with strict zero-payload retention.