Sharing API Simulations Across Coding Agent Sessions A developer experiment published by Postman shows how coding agents can reuse shared API simulations instead of rebuilding mocks per session: two Claude Code sessions worked against one workspace, with Agent A generating mocks for Inventory and Payments from their OpenAPI specifications and publishing four simulations — a baseline plus three failure variants (Inventory out-of-stock returning 409 Conflict, payment declined returning 402 Payment Required, and an 8-second delayed payment timeout) — and Agent B building a Node.js checkout service that called those mocks over HTTP on a single port with path routing. Agent B never read the Inventory or Payments source code, fetching and running the published simulation via the Postman CLI instead. The approach aims to stop teams from paying repeatedly for the same agent-side discovery of dependency behavior across every developer, repo and fresh session. Sharing API Simulations Across Coding Agent Sessions A coding agent working on a checkout endpoint needs to know more than the file it’s editing. It needs to understand how Inventory reserves stock, what Payments returns when a charge is declined, and what the right behavior is when either service goes quiet. Before it can verify anything, it also needs somewhere to make those calls. Multiply that by every developer, every repo, and every fresh agent session, and your team ends up paying for the same learning over and over. The agent reads dependency code, interprets the API contract, spins up a throwaway mock, and troubleshoots a local environment. Tokens burn. Time burns. And none of that work compounds for the next session. I’ve been experimenting with Postman simulations https://learning.postman.com/docs/design-apis/simulate-conditions as a way to make that knowledge reusable across agents. The idea is simple: the team that owns a service maintains a callable model of its API, including the failure cases consumers should handle. Any agent working on a dependent service can discover that simulation, run it locally, and start from shared ground instead of rediscovering the behavior from scratch. Here’s what that looked like in practice. The setup: two agents, one shared simulation I ran two Claude Code https://code.claude.com/docs/en/overview sessions against the same workspace. Agent A played the role of the dependency owner. It generated mocks https://learning.postman.com/docs/design-apis/mock-apis/overview/ for Inventory and Payments from their OpenAPI specifications https://spec.openapis.org/oas/latest.html , composed a baseline simulation, and then added three failure variants that consumers need to handle: - Inventory out-of-stock → 409 Conflict https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/409 - Payment declined → 402 Payment Required https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/402 - Payment timeout → an 8-second delayed response Agent A published all four simulations to a Postman workspace https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/overview/ so they’d be discoverable later. Agent B built a real Node.js https://nodejs.org/en/about checkout service that called those mocks over HTTP. To keep the local setup boring, we put both dependencies behind a single port with path routing: js // checkout service, calling the shared simulation const INVENTORY URL = 'http://localhost:4000/inventory/reservations'; const PAYMENTS URL = 'http://localhost:4000/payments/charges'; async function checkout order { const reservation = await fetch INVENTORY URL, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify { sku: order.sku, qty: order.qty } , } ; if reservation.status === 409 { return { status: 409, reason: 'out of stock' }; } const { reservation id } = await reservation.json ; const charge = await fetch PAYMENTS URL, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify { amount: order.amount, token: order.token } , signal: AbortSignal.timeout 3000 , } ; if charge.status === 402 { // compensate: release the reservation await fetch ${INVENTORY URL}/${reservation id} , { method: 'DELETE' } ; return { status: 402, reason: 'payment declined' }; } return { status: 201, reservation id }; } Agent B didn’t need to read Inventory or Payments source code. It fetched the simulation, ran it, and started coding against known behavior. Running the simulation locally The consumer side uses the Postman CLI https://learning.postman.com/docs/postman-cli/postman-cli-overview/ to pull and run a published simulation. The agent runs something like this: list simulations available in the workspace postman simulation list pick a simulation ID and run the baseline simulation on port 4000 postman simulation run