Q: How can I collect traces when my plugin runs inside someone else’s harness?
If your plugin runs inside someone else’s harness (like Codex or Claude), you may only see part of the trace. For example, you can log calls to your MCP server, but those logs may not show what the user asked or how the agent used your tool’s response, which makes it hard to understand what went wrong.
It’s usually unrealistic to expect users to opt-in to “always-on” telemetry for a harness plugin. Instead, give users a way to report a problem and choose when to share context. For example, Codex’s feedback flow via /feedback lets users submit feedback and choose whether to include the current session. You can build a similar command for your plugin to let users send you the context needed to investigate a specific failure.
Most harnesses store session history on the local file system. For example, Codex stores session transcripts in $CODEX_HOME/sessions (the default is ~/.codex/sessions). This allows you to build plugins that can share the full context of any session from those files.
After collecting a sufficient number of user sessions, you can use error analysis to identify recurring failures and decide which evals to build.
Finally, keep collecting the tool-call logs you control, too. Even though isolated tool calls are only a partial record of a user session, it may aid in error discovery.
This article is part of our AI Evals FAQ, a collection of common questions (and answers) about LLM evaluation. View all FAQs or return to the homepage.