Monitoring OpenAI Agents SDK Apps Beyond the Playground
Default SDK traces show what ran, not whether it was right.

Production monitoring for LangGraph and OpenAI Agents SDK deployments needs three layers, namely workflow traces, operational metrics, and evaluations of agent behavior. The OpenAI Agents SDK provides useful tracing, but a completed run does not establish that the agent did the right work. To make production reliable, teams need to check those traces against the agent’s instructions, fix the defects they find, and back the fixes with regression checks.
What the OpenAI Agents SDK traces by default
The OpenAI Agents SDK automatically wraps each Runner.run(), run_sync(), and run_streamed() call in a trace. Its default instrumentation covers the agent loop, each model generation, function and tool calls, guardrails, handoffs, and audio transcription and speech where relevant.
Handoffs appear within a single connected tree, with timestamps and inspectable steps. Agent failures often unfold as a sequence. A tool call, a later routing decision, and a specialist’s response can therefore be examined in relation to one another. This step-level context is what makes the default trace useful for investigating causality.
The SDK makes these traces available in its tracing dashboard unless tracing is disabled through RunConfig, an environment variable, or a Zero Data Retention policy. OpenAI’s SDK documentation states that organizations using Zero Data Retention cannot use tracing at all. For other deployments, export normally happens automatically, though the dashboard may not show a trace immediately after a job finishes.
For Celery workers, background tasks, queue consumers, and cron-style jobs, the documentation recommends an explicit flush_traces() call when immediate delivery is required. The minimal sequence is to complete the runner call and then call flush_traces(). This addresses delivery timing. The documentation also says the call can be skipped when the default export latency is fast enough. A job finishing and its trace appearing in the dashboard are therefore separate events.
Where the SDK's built-in observability stops
A trace records what happened, but correctness requires a separate judgment. A run can complete with HTTP 200 and deliver a hallucinated answer while its error rate remains zero. The execution succeeded in an operational sense. It failed in the sense the user cares about, because the result was wrong.
The same boundary applies to tool use. The SDK records tool-call spans, but tracing calls is not equivalent to recording every decision that shaped the tool graph. The metadata for a decision can include the tool name, arguments hash, retry index, and parent decision ID. Without those attributes, tool-call drift and loop depth can go unmonitored even when each call is visible. A successful invocation says little about whether the agent should have made it.
The agent’s declared purpose supplies a standard against which its routing, tool selection, and handoff behavior can be judged. OpenAI’s production guidance emphasizes trace grading because workflow errors need not appear as poor final text. A fluent answer can conceal a wrong route. Evaluating only that answer discards the evidence needed to identify the workflow defect.
There is also a boundary between agent telemetry and the rest of the application. Without export, the SDK trace remains separate from API traces, worker traces, database spans, and cost dashboards. Engineers may have a detailed account of the agent run without the surrounding system context. Zero Data Retention compounds these limits because the built-in trace itself is unavailable.
How agents actually fail silently in production
Sentrial’s May 2026 analysis of agent logs found that the vast majority of failures were silent, with no crash, error code, or latency spike. Only a minority were tool-call failures that stopped the agent. Wu’s 2026 study, “When Errors Become Narratives,” examined silent failures in a personal-assistant agent runtime in continuous production since March 2026. These findings make successful execution an inadequate proxy for correct behavior. They do not, however, establish a universal failure rate for every deployment.
The MAST taxonomy, presented at NeurIPS 2025, offers a broader view of how multi-agent systems fail. It was built from over 1,600 annotated execution traces across seven frameworks. Disobeying task specifications and failing to recognize termination conditions were among its most prevalent patterns. Neither requires an infrastructure error to occur.
Tool-call drift is the first practical pattern. An agent may choose the wrong tool, provide malformed arguments to the right tool, or continue calling tools without converging. Handoff breakdown is a different defect at the transition between agents. Control passes to a specialist, but context, ownership, or responsibility for the reply is lost or corrupted. A connected trace makes that transition inspectable without establishing that the transfer was correct.
Specification disobedience completes this narrower set of production concerns. The agent can depart from the task’s requirements or fail to stop when its termination conditions have been met. Its status may still look entirely normal. The log analysis describes an especially revealing category, “Class D,” in which the LLM transforms an error into fluent, plausible narrative delivered to the user.
How to add production observability beyond the SDK trace
The practical response is to extend the SDK trace. A layered stack assigns different responsibilities to execution instrumentation, agent-native debugging and evaluation, and platform observability. Each layer answers a different operational question. The SDK shows the steps within a run, the agent-native layer helps teams compare runs, and the platform layer links what the agent does to the rest of the application.
LangSmith fills the agent-native role through searchable traces, evaluation workflows, dashboards, feedback logging, and run comparison. These tools make it easier to look into behavior that keeps recurring than to debug each run on its own. OpenTelemetry export addresses the cross-system role by joining agent telemetry with API, worker, and database traces, alerting pipelines, and cost dashboards. These are complementary functions.
OpenTelemetry’s GenAI semantic conventions cover events, metrics, model spans, agent spans, provider-specific conventions including OpenAI, and related conventions for MCP and the A2A protocol. This provides a standards-based route for agent telemetry. It also means teams have less need to rebuild the rest of the monitoring stack when agent tooling changes. For teams considering production monitoring across LangGraph and the Agents SDK, framework support alone is therefore an incomplete criterion. The stack must also support the investigation and evaluation workflows the deployment requires.
Average agent turns per session can reveal unbounded growth associated with a stuck loop, while handoff success rate can point toward prompt or routing problems. Token cost per run and p95 time-to-completion expose expense and slow completion. Tool-call success rate, retry rate, and final task completion rate complete the workflow view. Thresholds require deployment-specific judgment here because the supplied guidance does not establish transferable numeric limits.
Durable execution solves a related but separate problem. An agent needs a runtime that persists state, retries failures, and resumes interrupted work. Temporal’s integration with the OpenAI Agents SDK and its Python SDK became Generally Available on March 23, 2026. Its broader multi-framework release followed on October 30, 2026, including LangGraph and TypeScript support for the Agents SDK. A workflow engine provides execution continuity, while observability provides evidence about what that execution did. Neither function substitutes for behavioral evaluation.
Detecting behavioral failures the trace records but no alert catches
With instrumentation but no evaluation, a trace can be full of signs of failure that nobody looks at until a user complains. OpenAI’s production guidance treats trace grading as the main signal of workflow issues because output-only metrics can miss routing and tool-selection failures. The object of evaluation is therefore the decision sequence that produced the delivered answer. The grader needs to judge how the agent reached it.
In practice, teams should tag runs with stable identifiers so they can group and compare behavior across versions. Each decision span should also have metadata such as actor, reason, and confidence. Automated graders can then assess routing, tool selection, and handoff behavior using the instructions that declare the agent’s purpose as an evaluation criterion.
Ownership provides a concrete example of that criterion. The SDK distinguishes a handoff from calling an agent through agent.asTool(), and OpenAI’s guidance frames that distinction as an ownership decision. A specialist that should own the final answer should not be treated as a bounded helper, or vice versa. The resulting ownership path is visible in the trace. A grader can assess that path against the intended division of responsibility even when every invocation succeeds.
Production detection also requires grouping repeated failures into issues. An isolated tool-selection error offers a debugging case, while the same error across dozens of runs establishes a recurring defect to track. The aggregate changes the engineering response. Stable grouping allows a team to distinguish a repeated workflow problem from unrelated traces that happen to contain similar-looking outputs. This is where monitoring becomes more than opening individual runs after a complaint.
Guardrails validate inputs and outputs at run time, while trace-level grading examines the internal decisions that produced those outputs. Wu’s study found that the declarative governance layer had a 0% ex-ante prevention rate against silent failures. That result is specific to the guardrail implementation in the system studied. It nevertheless demonstrates the precise risk at issue, which is that a check can pass while the agent performs the wrong work.
Closing the loop from detected failure to shipped fix
A detected defect needs a route into the repair process. The emerging pattern sends trace evidence to coding agents and the channels the team already uses to communicate, so every fix can start without having to go through a separate observability console. Context should move with the issue. Otherwise, detection identifies a symptom while engineers still have to reconstruct the decision sequence that caused it. The trace is most useful when it grounds the patch.
The repair process should begin with the runs that demonstrate the defect and the specific spans where routing, tool selection, or handoff behavior went wrong. Teams can pass that context to a coding agent through MCP so the proposed change addresses an observed failure. Galileo’s MCP server supports integration between its evaluation and observability platform and AI-powered IDEs such as Cursor or VS Code with GitHub Copilot. This supplies a concrete connection between observability evidence and the coding environment. It does not remove the need to evaluate the fix.
Wu’s study found an 87% ex-post regression-blocking rate for the governance layer, contrasting with its lack of preventive success against the silent failures studied. Its strongest contribution came after the defect was known. That finding supports building online evaluations after each fix so the detected failure informs subsequent monitoring.
For teams building on the Agents SDK today, the actionable sequence is to retain the SDK’s execution trace, export it into the broader monitoring stack, grade its decisions against the agent’s instructions, and route recurring defects into a trace-grounded repair process. Each shipped fix should add evaluation coverage for the behavior that failed. This gives the trace a role beyond retrospective inspection. It becomes the evidence used to detect a defect, justify a change, and test whether the same failure returns.



