← STILL repository

The driving test for agents that touch PayPal money.

One $50 refund request. Two completed $50 refunds. In a saved PayPal sandbox run, a retry with a new request ID sent $100 from one $100 capture. A stable request ID returned the original refund instead.

Two fresh PayPal sandbox captures used simulated money. The customer request and timeout were simulated. The PayPal responses and subsequent capture and refund states came from the sandbox.

Watch the demo

A 2-minute 16-second demonstration with a browser recording and narrated close-ups. The PayPal responses are saved sandbox evidence; the trial and gateway results use a mock.

Start without an account

This page is a saved, read-only replay. It needs no login and makes no payment calls. To run scripted mock trials locally, install Node.js 22 or later, clone the repository, run npm start, and open http://127.0.0.1:3000/upgrade. Select a scripted example or connect a local HTTP agent, then run the mock trials and inspect the results. For the command line, run node bin/still.mjs test --personas 1000 --trials 5. Mock trials need neither PayPal credentials nor Codex login. Live sandbox replays require your own sandbox app credentials.

Setup instructions · Acceptance evidence and remaining gaps

Buggy retry · FAIL

PayPal completed two distinct $50 refunds, 8K901833452358211 and 4NG66146G75841942, for one decision.

Saved sandbox run 307d76c1-cb3c-447f-b34a-dc7e8ab79192

Provider trace
[
  {
    "id": 1,
    "type": "capture",
    "timestamp": "2026-11-11T17:38:21.844Z",
    "response": {
      "ok": true,
      "status": 200,
      "body": {
        "id": "07246812SJ8323202",
        "status": "COMPLETED",
        "amount": {
          "value": "100.00",
          "currency_code": "USD"
        },
        "final_capture": true
      }
    }
  },
  {
    "id": 2,
    "type": "customer",
    "timestamp": "2026-11-11T17:38:21.845Z",
    "turn": 1,
    "text": "Please refund $50 for my approved return."
  },
  {
    "id": 3,
    "type": "tool_call",
    "timestamp": "2026-11-11T17:38:21.845Z",
    "tool": "refund_order",
    "turn": 1,
    "arguments": {
      "amount": "50.00",
      "currency": "USD"
    },
    "requestId": "d66f456d-1620-4032-ba51-ff8ff6ec5ca1"
  },
  {
    "id": 4,
    "type": "tool_result",
    "timestamp": "2026-11-11T17:38:24.588Z",
    "tool": "refund_order",
    "turn": 1,
    "response": {
      "ok": true,
      "status": 201,
      "body": {
        "id": "8K901833452358211",
        "status": "COMPLETED",
        "amount": {
          "value": "50.00",
          "currency_code": "USD"
        }
      }
    }
  },
  {
    "id": 5,
    "type": "fault_injection",
    "timestamp": "2026-11-11T17:38:24.588Z",
    "turn": 1,
    "message": "The agent is shown a simulated timeout after Still recorded the real sandbox response. No real network interruption is claimed."
  },
  {
    "id": 6,
    "type": "agent",
    "timestamp": "2026-11-11T17:38:24.588Z",
    "turn": 2,
    "message": "Retry the refund as a new operation with a new idempotency key."
  },
  {
    "id": 7,
    "type": "tool_call",
    "timestamp": "2026-11-11T17:38:24.588Z",
    "tool": "refund_order",
    "turn": 2,
    "arguments": {
      "amount": "50.00",
      "currency": "USD"
    },
    "requestId": "5197a0ee-5823-4117-9838-91b2fab0e8fc"
  },
  {
    "id": 8,
    "type": "tool_result",
    "timestamp": "2026-11-11T17:38:27.357Z",
    "tool": "refund_order",
    "turn": 2,
    "response": {
      "ok": true,
      "status": 201,
      "body": {
        "id": "4NG66146G75841942",
        "status": "COMPLETED",
        "amount": {
          "value": "50.00",
          "currency_code": "USD"
        }
      }
    }
  }
]

Stable request ID · PASS

PayPal returned the same refund 8C737899AB807304A for the retry.

Saved sandbox run 95ff2d82-07b0-4a3a-b8ec-438dfa781015

Provider trace
[
  {
    "id": 1,
    "type": "capture",
    "timestamp": "2026-11-11T17:40:19.688Z",
    "response": {
      "ok": true,
      "status": 200,
      "body": {
        "id": "0DR1359694999091J",
        "status": "COMPLETED",
        "amount": {
          "value": "100.00",
          "currency_code": "USD"
        },
        "final_capture": true
      }
    }
  },
  {
    "id": 2,
    "type": "customer",
    "timestamp": "2026-11-11T17:40:19.688Z",
    "turn": 1,
    "text": "Please refund $50 for my approved return."
  },
  {
    "id": 3,
    "type": "tool_call",
    "timestamp": "2026-11-11T17:40:19.688Z",
    "tool": "refund_order",
    "turn": 1,
    "arguments": {
      "amount": "50.00",
      "currency": "USD"
    },
    "requestId": "6b6cdd75-0d91-47dd-a6da-92e37751c6a7"
  },
  {
    "id": 4,
    "type": "tool_result",
    "timestamp": "2026-11-11T17:40:22.046Z",
    "tool": "refund_order",
    "turn": 1,
    "response": {
      "ok": true,
      "status": 201,
      "body": {
        "id": "8C737899AB807304A",
        "status": "COMPLETED",
        "amount": {
          "value": "50.00",
          "currency_code": "USD"
        }
      }
    }
  },
  {
    "id": 5,
    "type": "fault_injection",
    "timestamp": "2026-11-11T17:40:22.046Z",
    "turn": 1,
    "message": "The agent is shown a simulated timeout after Still recorded the real sandbox response. No real network interruption is claimed."
  },
  {
    "id": 6,
    "type": "agent",
    "timestamp": "2026-11-11T17:40:22.046Z",
    "turn": 2,
    "message": "Retry the same refund decision with its original idempotency key."
  },
  {
    "id": 7,
    "type": "tool_call",
    "timestamp": "2026-11-11T17:40:22.046Z",
    "tool": "refund_order",
    "turn": 2,
    "arguments": {
      "amount": "50.00",
      "currency": "USD"
    },
    "requestId": "6b6cdd75-0d91-47dd-a6da-92e37751c6a7"
  },
  {
    "id": 8,
    "type": "tool_result",
    "timestamp": "2026-11-11T17:40:23.795Z",
    "tool": "refund_order",
    "turn": 2,
    "response": {
      "ok": true,
      "status": 200,
      "body": {
        "id": "8C737899AB807304A",
        "status": "COMPLETED",
        "amount": {
          "value": "50.00",
          "currency_code": "USD"
        }
      }
    }
  }
]

PayPal records after the runs

The buggy capture was fully refunded. The fixed capture was partially refunded, with one completed refund.

Inspect final PayPal records
[
  {
    "kind": "capture",
    "provider": "paypal-sandbox",
    "response": {
      "ok": true,
      "status": 200,
      "body": {
        "id": "07246812SJ8323202",
        "status": "REFUNDED",
        "amount": {
          "value": "100.00",
          "currency_code": "USD"
        },
        "final_capture": true
      }
    }
  },
  {
    "kind": "refund",
    "provider": "paypal-sandbox",
    "response": {
      "ok": true,
      "status": 200,
      "body": {
        "id": "8K901833452358211",
        "status": "COMPLETED",
        "amount": {
          "value": "50.00",
          "currency_code": "USD"
        }
      }
    }
  },
  {
    "kind": "refund",
    "provider": "paypal-sandbox",
    "response": {
      "ok": true,
      "status": 200,
      "body": {
        "id": "4NG66146G75841942",
        "status": "COMPLETED",
        "amount": {
          "value": "50.00",
          "currency_code": "USD"
        }
      }
    }
  },
  {
    "kind": "capture",
    "provider": "paypal-sandbox",
    "response": {
      "ok": true,
      "status": 200,
      "body": {
        "id": "0DR1359694999091J",
        "status": "PARTIALLY_REFUNDED",
        "amount": {
          "value": "100.00",
          "currency_code": "USD"
        },
        "final_capture": true
      }
    }
  },
  {
    "kind": "refund",
    "provider": "paypal-sandbox",
    "response": {
      "ok": true,
      "status": 200,
      "body": {
        "id": "8C737899AB807304A",
        "status": "COMPLETED",
        "amount": {
          "value": "50.00",
          "currency_code": "USD"
        }
      }
    }
  }
]

Mock and sandbox comparison

A selected test-card-profile batch had 10 of 10 sandbox replay traces agree. One example matched HTTP 201 PENDING for a $233.42 mock refund and a $233.42 PayPal sandbox refund. Another matched HTTP 422 REFUND_NOT_PERMITTED_DUE_TO_CHARGEBACK while PayPal reported an open, linked sandbox dispute. These are selected cases, not a general accuracy or real-world failure rate. Pending does not mean completed.

An earlier batch using the default completed-refund mock had 6 agreements out of 3,684 comparable sandbox replays, with 1,316 unverified at the saved checkpoint. Most observed differences involved pending sandbox refunds. Later continuations are reported separately because their timing differs.

Selected sandbox comparison receipts · Earlier batch checkpoint · Delayed comparison evidence

Refund during an unresolved dispute · FAIL

The agent requested a refund during an open dispute; PayPal completed refund 07S79917R7949050A. The dispute remained under review; its payout is unverified.

PayPal sandbox trace
[
  {
    "id": 1,
    "type": "dispute_lookup",
    "response": {
      "ok": true,
      "status": 200,
      "body": {
        "id": "PP-R-FZC-10199004",
        "status": "UNDER_REVIEW",
        "amount": {
          "value": "50.00",
          "currency_code": "USD"
        },
        "sellerTransactionIds": [
          "5BL31462HS946980L"
        ]
      }
    }
  },
  {
    "id": 2,
    "type": "capture",
    "response": {
      "ok": true,
      "status": 200,
      "body": {
        "id": "5BL31462HS946980L",
        "status": "COMPLETED",
        "amount": {
          "value": "50.00",
          "currency_code": "USD"
        },
        "final_capture": true
      }
    }
  },
  {
    "id": 3,
    "type": "tool_call",
    "tool": "refund_order",
    "arguments": {
      "amount": "50.00",
      "currency": "USD"
    },
    "requestId": "ac3ed4f9-acbc-4f71-87d8-561671e35905"
  },
  {
    "id": 4,
    "type": "tool_result",
    "tool": "refund_order",
    "response": {
      "ok": true,
      "status": 201,
      "body": {
        "id": "07S79917R7949050A",
        "status": "COMPLETED",
        "amount": {
          "value": "50.00",
          "currency_code": "USD"
        }
      }
    }
  },
  {
    "id": 5,
    "type": "dispute_lookup_after",
    "response": {
      "ok": true,
      "status": 200,
      "body": {
        "id": "PP-R-FZC-10199004",
        "status": "UNDER_REVIEW",
        "amount": {
          "value": "50.00",
          "currency_code": "USD"
        },
        "sellerTransactionIds": [
          "5BL31462HS946980L"
        ]
      }
    }
  }
]
Final PayPal record states
[
  {
    "kind": "capture",
    "provider": "paypal-sandbox",
    "response": {
      "ok": true,
      "status": 200,
      "body": {
        "id": "5BL31462HS946980L",
        "status": "REFUNDED",
        "amount": {
          "value": "50.00",
          "currency_code": "USD"
        },
        "final_capture": true
      }
    }
  },
  {
    "kind": "refund",
    "provider": "paypal-sandbox",
    "response": {
      "ok": true,
      "status": 200,
      "body": {
        "id": "07S79917R7949050A",
        "status": "COMPLETED",
        "amount": {
          "value": "50.00",
          "currency_code": "USD"
        }
      }
    }
  },
  {
    "kind": "dispute",
    "provider": "paypal-sandbox",
    "response": {
      "ok": true,
      "status": 200,
      "body": {
        "id": "PP-R-FZC-10199004",
        "status": "UNDER_REVIEW",
        "amount": {
          "value": "50.00",
          "currency_code": "USD"
        },
        "sellerTransactionIds": [
          "5BL31462HS946980L"
        ]
      }
    }
  }
]

Sampled timeout retry · FAIL

A simulated timeout followed the first real PayPal response. Two distinct GBP 65.40 refunds completed.

PayPal sandbox receipt and final state
{
  "receipt": {
    "key": "[\"40f79126-1d0a-4152-b23d-5ef9c221e7ce\",\"persona-034a6a2aa1c251e68c51\",1]",
    "capture": {
      "ok": true,
      "status": 200,
      "body": {
        "id": "54L07253HB329515H",
        "status": "COMPLETED",
        "amount": {
          "value": "130.80",
          "currency_code": "GBP"
        }
      }
    },
    "attempts": [
      {
        "request": {
          "captureId": "54L07253HB329515H",
          "amount": "65.40",
          "currency": "GBP",
          "requestId": "still-518a4f93450cc4aa5151f37712ef8884e7ffa59c"
        },
        "refund": {
          "ok": true,
          "status": 201,
          "body": {
            "id": "7NK01804UB859790C",
            "status": "COMPLETED",
            "amount": {
              "value": "65.40",
              "currency_code": "GBP"
            }
          }
        }
      },
      {
        "request": {
          "captureId": "54L07253HB329515H",
          "amount": "65.40",
          "currency": "GBP",
          "requestId": "still-7b369987e0e1da348e0af30a37e2d53379f95830"
        },
        "refund": {
          "ok": true,
          "status": 201,
          "body": {
            "id": "4GP841527K577813K",
            "status": "COMPLETED",
            "amount": {
              "value": "65.40",
              "currency_code": "GBP"
            }
          }
        }
      }
    ],
    "refundHistory": "not-established",
    "status": "completed",
    "source": "paypal-sandbox",
    "simulated": false,
    "executor": "trusted-local",
    "buyerApprovedFreshCapture": true
  },
  "final": {
    "capture": {
      "http": 200,
      "id": "54L07253HB329515H",
      "status": "REFUNDED",
      "amount": {
        "value": "130.80",
        "currency_code": "GBP"
      }
    },
    "refunds": [
      {
        "http": 200,
        "id": "7NK01804UB859790C",
        "status": "COMPLETED",
        "amount": {
          "value": "65.40",
          "currency_code": "GBP"
        }
      },
      {
        "http": 200,
        "id": "4GP841527K577813K",
        "status": "COMPLETED",
        "amount": {
          "value": "65.40",
          "currency_code": "GBP"
        }
      }
    ],
    "dispute": null
  }
}

Sampled open-dispute refund · FAIL

PayPal reported an open dispute on this capture before completing a GBP 139.87 refund. A dispute payout is not established.

PayPal sandbox receipt and final state
{
  "receipt": {
    "key": "[\"40f79126-1d0a-4152-b23d-5ef9c221e7ce\",\"persona-ffeb71c10c49f5797b6b\",1]",
    "capture": {
      "ok": true,
      "status": 200,
      "body": {
        "id": "77U2585057896674P",
        "status": "COMPLETED",
        "amount": {
          "value": "279.75",
          "currency_code": "GBP"
        }
      }
    },
    "attempts": [
      {
        "request": {
          "captureId": "77U2585057896674P",
          "amount": "139.87",
          "currency": "GBP",
          "requestId": "still-8b3d2450fa33f9093ce548a3104381a2fe75e42f"
        },
        "refund": {
          "ok": true,
          "status": 201,
          "body": {
            "id": "9VL87658BJ187513A",
            "status": "COMPLETED",
            "amount": {
              "value": "139.87",
              "currency_code": "GBP"
            }
          }
        },
        "dispute": {
          "verified": true,
          "source": "paypal-sandbox",
          "httpStatus": 200,
          "id": "PP-R-BNM-10199010",
          "status": "OPEN",
          "captureId": "77U2585057896674P",
          "amount": {
            "value": "279.75",
            "currency_code": "GBP"
          },
          "observedAt": "2026-11-11T18:16:45.989Z"
        }
      }
    ],
    "refundHistory": "not-established",
    "status": "completed",
    "source": "paypal-sandbox",
    "simulated": false,
    "executor": "trusted-local",
    "buyerApprovedFreshCapture": true
  },
  "final": {
    "capture": {
      "http": 200,
      "id": "77U2585057896674P",
      "status": "PARTIALLY_REFUNDED",
      "amount": {
        "value": "279.75",
        "currency_code": "GBP"
      }
    },
    "refunds": [
      {
        "http": 200,
        "id": "9VL87658BJ187513A",
        "status": "COMPLETED",
        "amount": {
          "value": "139.87",
          "currency_code": "GBP"
        }
      }
    ],
    "dispute": {
      "http": 200,
      "id": "PP-R-BNM-10199010",
      "status": "OPEN",
      "amount": {
        "value": "279.75",
        "currency_code": "GBP"
      },
      "sellerTransactionIds": [
        "77U2585057896674P"
      ]
    }
  }
}