Open source crash test for AI agents

Your agent said it worked. It didn’t.

CrossTrace replays real runs of your agent and breaks one model or tool call at a time, the way providers and networks really break. Then it shows what your agent did next.

$ pip install crosstrace
The model senta tool call, streamed
{"order_id": 42}
The stream brokehalf way through
{"order_id": 42}
The agent ranno error, exit code 0
get_order(order_id=4)Wrong action
2 / 3cut tool calls ran a tool with a wrong value on a stock LangGraph agent (the third was rejected)
5 / 5stalled streams left it hanging until the 60 s test limit (no read timeout set)
38 trialsabout two minutes, offline, from one recorded run
How it works

A proxy that breaks things on purpose.

Your agent only reads its model address from the environment, so its real SDK code and its real error handling run exactly as in production.

Your agent → CrossTrace → Model provider(only while recording)
01Record

Run your agent once. Every request and the provider’s exact response bytes are saved. Keys and headers never are.

02Replay

Offline and free. The run must replay exactly before any fault, or CrossTrace names the field to mask.

03Break

One call at a time: cut streams, stalls, resets, 429s, a lost tool reply. At the byte level, at every call.

04Judge

Did it retry, stop with an error, or carry on? For Python agents it also records which tool code really ran. Facts, not a model’s opinion.

The report

Every fault, every call. One exit code.

Tool calls

The tool ran. The reply was lost. The agent did it again.

For MCP servers over stdio or HTTP, CrossTrace loses the reply to one tool call and counts every write the agent makes afterwards. In a test run the real server is never called.

The agent calleda refund tool
refund(customer 42, 129.99)
The reply was lostthe tool had already run
Connection closed
The agent retriedright answer, exit code 0
refund ran 2 timesDuplicate
What it breaks

A verdict you can act on.

FaultWhat your agent seesVerdict that fails the build
stream_cut_cleanThe stream ends early with no final eventPARTIAL a cut answer printed as complete
tool_args_cutA tool call’s JSON cut halfwayWRONG_ACTION a tool really ran with a cut value
stream_stallConnection open, nothing arrivesHANG never finished in the budget
rate_limit, overloaded429 with Retry-After, or an overloaded APIIGNORED_RETRY_AFTERRETRY_STORM
lost_response (MCP)A tool ran, but its reply never arrivesDUPLICATE a write that ran twice

A verdict fails a build only when it rests on something measured. Where CrossTrace can only guess intent from a request’s shape, it shows the facts for review.

Checked on real frameworks

What four popular frameworks do when a call breaks.

FrameworkCut stream or tool callStalled response
LangGraphran tools with cut values (2 of 3)hangs
OpenAI Agents SDKraised an errorhangs
pydantic-airefused the cut call and told the model; printed a cut answer as completehangs
CrewAIprinted a cut answer as completehangs unless you set a timeout

Each recorded once on a real model, then replayed offline. Every timeout fix was run, not assumed.

Questions

The honest answers.

Does it need my API key?

Only to record the one healthy run. Replay is offline and free, and CI needs no key. An optional --live flag lets a real model answer an agent’s re-prompt with your own key; the agent never sees it.

Does it judge whether my agent’s answer is right?

No. It judges how your agent reacts to a failure: retry, stop with an error, or carry on. It uses no LLM judge, so the same trial gives the same verdict every time.

Will it work with my framework?

Any agent that reads OPENAI_BASE_URL or ANTHROPIC_BASE_URL, which the major SDKs and frameworks do. It does not yet cover agents with a hard-coded https address or that go through an HTTPS proxy.

Is it safe for tools that change things?

In a test run the real MCP server is never started or called, so a test can’t cause a side effect. A tool that ran twice is reported as a DUPLICATE. For proof against a real server, opt in with --real-tools and use a sandbox.

What does it cost?

Nothing. It’s MIT-licensed and runs on your machine and in your CI. It’s v0.1, built by one person, and wrong verdicts are the most useful thing you can report.

See what your agent does when the call breaks, before your users do.

$ pip install crosstrace

The example agent ships with a recording, so you can see the whole thing without a key.