Menu

Post image 1
Post image 2
Post image 3
1 / 3
0

Stateful Agent Replay: Deterministic Reruns From a Captured Trace

DEV Community·Gabriel Anhaia·25 days ago
#MbLxvFwr
#llm#observability#self#capture#replay#agent
Reading 0:00
15s threshold

Book: AI Agents Pocket Guide: Patterns for Building Autonomous Systems with LLMs Also by me: Thinking in Go (2-book series) — Complete Guide to Go Programming + Hexagonal Architecture in Go My project: Hermes IDE | GitHub — an IDE for developers who ship with Claude Code and other AI coding tools Me: xgabriel.com | GitHub A user reports that the agent did the wrong thing on Tuesday afternoon. You open the trace, you read the spans, and the offending step jumps out: the model called refund_order instead of cancel_subscription . You have the prompt, the tool schemas, the model id, the temperature. You run the same prompt against the same model and get back a different tool call. The bug is gone, and so is your chance of fixing it. This is the part of agent development the test-mocking docs do not cover. "Just mock the LLM" works for unit tests where you wrote both the prompt and the canned response.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More