# Rate limited, then fine

Injected failure: 429 once, agent retries. First attempt is rate limited, the retry succeeds (should PASS).

Failure mode `rate_limited_then_ok` of the CommitLayer failure matrix, on all 8 workflows. Each run below is the sandbox's scripted agent acting on the sandbox's fake systems of record under the injected failure, an oracle reading those systems' databases, and the verdict of engine 1.0.0 from the systems of record alone. The accounts, orders and amounts are the sandbox's and describe no real customer. Last changed 2026-11-13.

| Workflow | Agent reported | Oracle (policy) | CommitLayer (outcome / policy) | Why |
|---|---|---|---|---|
| Refund a customer | success | PASS | PASS / PASS | all 4 expected effects observed within 10m; preconditions, limits and prohibitions respected |
| Cancel a subscription | success | PASS | PASS / PASS | all 3 expected effects observed within 10m; preconditions, limits and prohibitions respected |
| Change a shipping address | success | PASS | PASS / PASS | all 3 expected effects observed within 10m; preconditions, limits and prohibitions respected |
| Approve a discount | success | PASS | PASS / PASS | all 2 expected effects observed within 10m; preconditions, limits and prohibitions respected |
| Close a support case | success | PASS | PASS / PASS | all 3 expected effects observed within 10m; preconditions, limits and prohibitions respected |
| Send a payout | success | PASS | PASS / PASS | all 3 expected effects observed within 10m; preconditions, limits and prohibitions respected |
| Deploy a service | success | PASS | PASS / PASS | all 3 expected effects observed within 10m; preconditions, limits and prohibitions respected |
| Place a trade | success | PASS | PASS / PASS | all 3 expected effects observed within 10m; preconditions, limits and prohibitions respected |

## Refund a customer

Scenario `refund/rate_limited_then_ok`: 429 once, agent retries. First attempt is rate limited, the retry succeeds (should PASS).

### What the agent reported

The agent reported success. Its calls, and what it saw come back:

- `GET /tickets/tick_1`: 200
- `GET /orders/order_1001`: 200
- `POST /payments/refunds`: 429 (injected: error)
- `POST /payments/refunds`: 200
- `POST /orders/order_1001/status`: 200
- `POST /crm/notes`: 200
- `POST /tickets/notify`: 200

### What the systems of record showed

Records written after the action:

- payments `refund_created` on order_1001 (amount=180, currency=USD)
- orders `order_status_changed` on order_1001 (status=refunded)
- crm `note_added` on order_1001 (author=lab-agent, text=Refunded 180.0 USD per customer request)
- tickets `customer_notified` on order_1001 (channel=email)

The oracle, reading the databases directly: outcome PASS, policy PASS.

### The verdict and why

PASS — all 4 expected effects observed within 10m; preconditions, limits and prohibitions respected (outcome PASS, policy PASS).

### Three models on the same injected failure

From the [benchmark](https://commitlayer.ai/benchmark), where a model drove the agent instead of a script. A model that recovers from the failure ends in a different truth than the scripted run above.

| Model | Agent reported | Trace-only judge | Truth | CommitLayer |
|---|---|---|---|---|
| Anthropic | success | PASS | PASS | PASS |
| OpenAI | success | PASS | PASS | PASS |
| Google | success | FAIL | PASS | PASS |

## Cancel a subscription

Scenario `cancel/rate_limited_then_ok`: 429 once, agent retries. First attempt is rate limited, the retry succeeds (should PASS).

### What the agent reported

The agent reported success. Its calls, and what it saw come back:

- `GET /crm/subscriptions/sub_1`: 200
- `POST /crm/subscriptions/sub_1/cancel`: 429 (injected: error)
- `POST /crm/subscriptions/sub_1/cancel`: 200
- `POST /payments/billing/stop`: 200
- `POST /tickets/notify`: 200

### What the systems of record showed

Records written after the action:

- crm `subscription_cancelled` on sub_1 (plan=pro)
- payments `billing_stopped` on sub_1
- tickets `customer_notified` on sub_1 (channel=email)

The oracle, reading the databases directly: outcome PASS, policy PASS.

### The verdict and why

PASS — all 3 expected effects observed within 10m; preconditions, limits and prohibitions respected (outcome PASS, policy PASS).

### Three models on the same injected failure

From the [benchmark](https://commitlayer.ai/benchmark), where a model drove the agent instead of a script. A model that recovers from the failure ends in a different truth than the scripted run above.

| Model | Agent reported | Trace-only judge | Truth | CommitLayer |
|---|---|---|---|---|
| Anthropic | success | PASS | PASS | PASS |
| OpenAI | success | FAIL | PASS | PASS |
| Google | success | PASS | PASS | PASS |

## Change a shipping address

Scenario `address/rate_limited_then_ok`: 429 once, agent retries. First attempt is rate limited, the retry succeeds (should PASS).

### What the agent reported

The agent reported success. Its calls, and what it saw come back:

- `GET /orders/order_1001`: 200
- `POST /orders/order_1001/address`: 429 (injected: error)
- `POST /orders/order_1001/address`: 200
- `POST /crm/notes`: 200
- `POST /tickets/notify`: 200

### What the systems of record showed

Records written after the action:

- orders `address_updated` on order_1001 (address=22 New Street, Lyon)
- crm `note_added` on order_1001 (author=lab-agent, text=Shipping address changed to 22 New Street, Lyon)
- tickets `customer_notified` on order_1001 (channel=email)

The oracle, reading the databases directly: outcome PASS, policy PASS.

### The verdict and why

PASS — all 3 expected effects observed within 10m; preconditions, limits and prohibitions respected (outcome PASS, policy PASS).

### Three models on the same injected failure

From the [benchmark](https://commitlayer.ai/benchmark), where a model drove the agent instead of a script. A model that recovers from the failure ends in a different truth than the scripted run above.

| Model | Agent reported | Trace-only judge | Truth | CommitLayer |
|---|---|---|---|---|
| Anthropic | success | PASS | PASS | PASS |
| OpenAI | success | FAIL | PASS | PASS |
| Google | success | PASS | PASS | PASS |

## Approve a discount

Scenario `discount/rate_limited_then_ok`: 429 once, agent retries. First attempt is rate limited, the retry succeeds (should PASS).

### What the agent reported

The agent reported success. Its calls, and what it saw come back:

- `GET /orders/order_1004`: 200
- `POST /orders/order_1004/discount`: 429 (injected: error)
- `POST /orders/order_1004/discount`: 200
- `POST /crm/notes`: 200

### What the systems of record showed

Records written after the action:

- orders `discount_applied` on order_1004 (percent=15)
- crm `note_added` on order_1004 (author=lab-agent, text=Discount 15.0% approved)

The oracle, reading the databases directly: outcome PASS, policy PASS.

### The verdict and why

PASS — all 2 expected effects observed within 10m; preconditions, limits and prohibitions respected (outcome PASS, policy PASS).

### Three models on the same injected failure

From the [benchmark](https://commitlayer.ai/benchmark), where a model drove the agent instead of a script. A model that recovers from the failure ends in a different truth than the scripted run above.

| Model | Agent reported | Trace-only judge | Truth | CommitLayer |
|---|---|---|---|---|
| Anthropic | success | PASS | PASS | PASS |
| OpenAI | success | PASS | PASS | PASS |
| Google | success | PASS | PASS | PASS |

## Close a support case

Scenario `close/rate_limited_then_ok`: 429 once, agent retries. First attempt is rate limited, the retry succeeds (should PASS).

### What the agent reported

The agent reported success. Its calls, and what it saw come back:

- `GET /tickets/tick_1`: 200
- `POST /tickets/tick_1/close`: 429 (injected: error)
- `POST /tickets/tick_1/close`: 200
- `POST /crm/notes`: 200
- `POST /tickets/notify`: 200

### What the systems of record showed

Records written after the action:

- tickets `ticket_closed` on tick_1 (order_id=order_1001)
- crm `note_added` on tick_1 (author=lab-agent, text=Case closed: answered)
- tickets `customer_notified` on tick_1 (channel=email, order_id=order_1001)

The oracle, reading the databases directly: outcome PASS, policy PASS.

### The verdict and why

PASS — all 3 expected effects observed within 10m; preconditions, limits and prohibitions respected (outcome PASS, policy PASS).

### Three models on the same injected failure

From the [benchmark](https://commitlayer.ai/benchmark), where a model drove the agent instead of a script. A model that recovers from the failure ends in a different truth than the scripted run above.

| Model | Agent reported | Trace-only judge | Truth | CommitLayer |
|---|---|---|---|---|
| Anthropic | success | PASS | PASS | PASS |
| OpenAI | success | FAIL | PASS | PASS |
| Google | success | PASS | PASS | PASS |

## Send a payout

Scenario `payout/rate_limited_then_ok`: 429 once, agent retries. First attempt is rate limited, the retry succeeds (should PASS).

### What the agent reported

The agent reported success. Its calls, and what it saw come back:

- `GET /ledger/accounts/acc_1`: 200
- `POST /payments/payouts`: 429 (injected: error)
- `POST /payments/payouts`: 200
- `POST /ledger/accounts/acc_1/post`: 200
- `POST /crm/notes`: 200

### What the systems of record showed

Records written after the action:

- payments `payout_created` on acc_1 (amount=900, currency=USD, payout_id=po_acc_1_1)
- ledger `ledger_posted` on acc_1 (amount=900, balance=9100)
- crm `note_added` on acc_1 (author=lab-agent, text=Payout of 900.0 USD sent)

The oracle, reading the databases directly: outcome PASS, policy PASS.

### The verdict and why

PASS — all 3 expected effects observed within 10m; preconditions, limits and prohibitions respected (outcome PASS, policy PASS).

## Deploy a service

Scenario `deploy/rate_limited_then_ok`: 429 once, agent retries. First attempt is rate limited, the retry succeeds (should PASS).

### What the agent reported

The agent reported success. Its calls, and what it saw come back:

- `GET /platform/services/svc_api`: 200
- `POST /platform/services/svc_api/deploy`: 429 (injected: error)
- `POST /platform/services/svc_api/deploy`: 200
- `POST /platform/services/svc_api/healthcheck`: 200
- `POST /crm/notes`: 200

### What the systems of record showed

Records written after the action:

- platform `deploy_created` on svc_api (version=1.5.0, environment=production)
- platform `health_check` on svc_api (status=healthy, version=1.5.0)
- crm `note_added` on svc_api (author=lab-agent, text=Deployed 1.5.0 to production)

The oracle, reading the databases directly: outcome PASS, policy PASS.

### The verdict and why

PASS — all 3 expected effects observed within 10m; preconditions, limits and prohibitions respected (outcome PASS, policy PASS).

## Place a trade

Scenario `trade/rate_limited_then_ok`: 429 once, agent retries. First attempt is rate limited, the retry succeeds (should PASS).

### What the agent reported

The agent reported success. Its calls, and what it saw come back:

- `GET /broker/products/TSLA-USD`: 200
- `POST /broker/orders`: 429 (injected: error)
- `POST /broker/orders`: 200
- `GET /broker/orders/ord_TSLA-USD_1`: 200
- `POST /crm/notes`: 200

### What the systems of record showed

Records written after the action:

- broker `order_created` on TSLA-USD (order_id=ord_TSLA-USD_1, side=BUY, quote_value=900, status=FILLED)
- broker `order_filled` on TSLA-USD (order_id=ord_TSLA-USD_1, side=BUY, filled_value=900, filled_size=3.4351145, average_filled_price=262)
- crm `note_added` on TSLA-USD (author=lab-agent, text=BUY 900.0 USD of TSLA-USD)

The oracle, reading the databases directly: outcome PASS, policy PASS.

### The verdict and why

PASS — all 3 expected effects observed within 10m; preconditions, limits and prohibitions respected (outcome PASS, policy PASS).

## Run it in the Failure Lab

The Failure Lab replays each run above: the agent's calls, the records the systems held and the verdict. No account is needed. The verdict comes from the production engine while you watch.

- [Refund a customer, Rate limited, then fine](https://commitlayer.ai/lab?workflow=refund&failure=rate_limited_then_ok)
- [Cancel a subscription, Rate limited, then fine](https://commitlayer.ai/lab?workflow=cancel&failure=rate_limited_then_ok)
- [Change a shipping address, Rate limited, then fine](https://commitlayer.ai/lab?workflow=address&failure=rate_limited_then_ok)
- [Approve a discount, Rate limited, then fine](https://commitlayer.ai/lab?workflow=discount&failure=rate_limited_then_ok)
- [Close a support case, Rate limited, then fine](https://commitlayer.ai/lab?workflow=close&failure=rate_limited_then_ok)
- [Send a payout, Rate limited, then fine](https://commitlayer.ai/lab?workflow=payout&failure=rate_limited_then_ok)
- [Deploy a service, Rate limited, then fine](https://commitlayer.ai/lab?workflow=deploy&failure=rate_limited_then_ok)
- [Place a trade, Rate limited, then fine](https://commitlayer.ai/lab?workflow=trade&failure=rate_limited_then_ok)

The sandbox in the app runs the exact scenario in your own workspace, as a verified action:

- [`refund/rate_limited_then_ok`](https://commitlayer.ai/login?intent=trial&tier=developer&next=%2Fapp%2Fsandbox%3Fscenario%3Drefund%2Frate_limited_then_ok)
- [`cancel/rate_limited_then_ok`](https://commitlayer.ai/login?intent=trial&tier=developer&next=%2Fapp%2Fsandbox%3Fscenario%3Dcancel%2Frate_limited_then_ok)
- [`address/rate_limited_then_ok`](https://commitlayer.ai/login?intent=trial&tier=developer&next=%2Fapp%2Fsandbox%3Fscenario%3Daddress%2Frate_limited_then_ok)
- [`discount/rate_limited_then_ok`](https://commitlayer.ai/login?intent=trial&tier=developer&next=%2Fapp%2Fsandbox%3Fscenario%3Ddiscount%2Frate_limited_then_ok)
- [`close/rate_limited_then_ok`](https://commitlayer.ai/login?intent=trial&tier=developer&next=%2Fapp%2Fsandbox%3Fscenario%3Dclose%2Frate_limited_then_ok)
- [`payout/rate_limited_then_ok`](https://commitlayer.ai/login?intent=trial&tier=developer&next=%2Fapp%2Fsandbox%3Fscenario%3Dpayout%2Frate_limited_then_ok)
- [`deploy/rate_limited_then_ok`](https://commitlayer.ai/login?intent=trial&tier=developer&next=%2Fapp%2Fsandbox%3Fscenario%3Ddeploy%2Frate_limited_then_ok)
- [`trade/rate_limited_then_ok`](https://commitlayer.ai/login?intent=trial&tier=developer&next=%2Fapp%2Fsandbox%3Fscenario%3Dtrade%2Frate_limited_then_ok)
