Repository navigation
No VS Code extension change since v0.121.1, so there is no new extension release.
Features
export <id> --include-subagentsexports a session and its subagents, asagent-strace treeshows them, as one trace in one payload. It works with--format otlpandotlp-genai, to a file or with--endpoint. Each subagent's root span sits under the span of the call that started it, or under the parent session's root span when that span is not exported. It is refused with one line for other formats,--anonymize,--scores,--metricsand--backend. (#562)export --format otlp-genaiwrites the conversation asgen_ai.input.messagesandgen_ai.output.messageson the root span, and each tool call's input and result asgen_ai.tool.call.argumentsandgen_ai.tool.call.resulton itsexecute_toolspan. The values follow the current OpenTelemetry GenAI message and tool-call schemas. The content, redaction and truncation are the same as before, and the old events and keys stay. (#562)- In
--format otlpandotlp-genai, a call whose event names an earlier one inretry_ofhas a span link to that call's span, withagent.strace.link.type=retry_of. (#562) export --endpoint(--format otlp,otlp-genaiortemporal) andwatch --stream-otlpcan send OTLP/HTTP protobuf with--protocol http/protobuf, which Phoenix requires. Without the flag, they followOTEL_EXPORTER_OTLP_TRACES_PROTOCOL, thenOTEL_EXPORTER_OTLP_PROTOCOL. The default stays JSON. (#565)- In
--format otlp-genai,chatspans from the OpenAI and Anthropic SDK integrations now carrygen_ai.response.id,gen_ai.response.model,server.addressandserver.port. The integrations record them from the response and from the client'sbase_url. Spans from other sources do not change. (#570) experiments/semconv-conformance/runs OpenTelemetry's GenAI conformance check (Weaver live-check) against--format otlp-genai. It is not part of the package. (#570)export --agent-id ID(formatsotlp-genai,otlpandtemporal) andwatch --stream-otlp --agent-id IDputgen_ai.agent.idon every span of the session, including subagent spans with--include-subagents.AGENT_STRACE_AGENT_IDis the fallback. Microsoft Foundry matches a registered external agent's traces by this attribute. (#586)
Fixes
- A command given the ID or ID prefix of a session whose
meta.jsonis corrupt now printsError: session <id> has a corrupt meta.json: <reason>and exits 1. Before, it saidSession not found, so a broken session looked like a missing one. A readable session that matches the same prefix still wins. (#557) replay --expand-subagents,replay --treeandstats --include-subagentsno longer fail withTypeErrorwhen a subagent'sstarted_atisnullor text. That subagent sorts last.treeno longer fails for anullone. (#562)- agent-strace now refuses a session whose events.ndjson holds a line that is not valid UTF-8 with its usual one-line refusal, instead of a UnicodeDecodeError traceback or the codec text. (#559)
importnow refuses a Codex rollout, a Copilot CLIevents.jsonl, or a file with no Claude Code transcript record. It printsCannot import <path>: <reason>and exits 1, and for Codex and Copilot it namesagent-strace setup --cli codexor--cli copilot. Before, such a file imported as an emptyclaude-codesession, and a Copilot file took the session IDevents. (#568)- In
--format otlpandotlp-genai, the session root span is now ERROR only when the session timed out or was terminated, its last model request failed, or a failed tool operation never recovered. Before, any session with an error had an ERROR root, so a session that retried and recovered exported as failed, and the root had noerror.type. (#567) costand the OTLP exports now use the model and token usage thatimportrecords for Claude Code transcripts.costreads the recorded tokens instead of estimating from event size. In--format otlpandotlp-genai, each imported model response becomes achat {model}span with its token usage, finish reason and response ID. The span starts at the model's last input, since the transcript has no request time, and carriesagent.strace.timing=inferred. (#569)- In
--format otlp-genai,gen_ai.tool.call.resultstays valid JSON. Before, it was cut at 500 characters, so a long JSON result became invalid JSON. A JSON result now keeps its structure within the same 500 characters, and agen_ai.tool.call.argumentsvalue that is not an object does the same within 1000. (#570) lintandassignmentnow report the right end event for a reasoning spiral when other events sit between the model calls. (#579)- Custom anonymize rules are no longer overwritten by keys in a later section of the rules file, such as
settings:. (#580) dashboardno longer counts a session as succeeded when itssession_endsays it timed out or was killed. (#581)- The web dashboard compare panel now shows the comparison you asked for last, even when an earlier comparison answers later. (#582)
replay --expand-subagentsnow shows every child session a tool call started, in start order, instead of only the last one. (#583)agent-strace diffnow numbers each phase by its place in each session, lists phases only one session has, and reports the first real difference, including an extra phase. (#585)- Hooks store a tool result that the agent sends as an object as compact JSON, not a Python
repr. This covers Claude Code's Bash and Read, and Codex, Gemini and Cursor objects. Bash output keepsinterruptedand any exit code.--format otlp-genainow exports these results as valid JSON ingen_ai.tool.call.result. (#576) - Shell command reading now runs in linear time, so long backslash-continued lines, repeated failing heredoc words or deeply nested groups no longer stall
reviewand the other commands that read recorded commands. (#588) optimize --llmnow reports a run of the same tool that lasts until the end of a session; before, only runs followed by a different tool were listed. (#587)- A resumed session that is still running no longer reads as ended: session status, the assignment no-output check and postmortem crash detection now ignore a
session_endthat a latersession_startreopened. (#590) - An operation that failed again after a successful retry now counts as unresolved, so the OTLP session root span reports the error instead of UNSET. (#589)
agent-strace lintno longer flags a resumed session that is still running as no-output. (#593)- The
evalgate'ssession_statusscorer now uses the session end rules of the OTLP root status, withkilledforterminated. Copilot'serrorandabortends arekilled, so is an int exit code too large for a float, and a session resumed after its lastsession_endreads as not ended.eval run <id>andeval ci <id>printSession not found: <id>for an ID that matches no session. (#575) - A CrewAI, OpenAI Agents SDK or Strands run whose stored
started_atis not a usable time now ends, with a total duration of 0, andimportskips adurationMsthat would make the total too large to store. (#574)
Compatibility
- An ID or prefix that matches only a corrupt session prints
Error: session <id> has a corrupt meta.json: <reason>and exits 1, notSession not found: <id>. This includeswatchandcompliance export. Before,share --assignmentsaidthe requested session was not foundandeval runsaidNo sessions found.(#557) replay <id> --diff <prefix>,record --parent <prefix>andrecord-http --parent <prefix>print the same line. Before, they ended in a traceback. (#557)reviewprints the line afterreview:and exits 2.pr-commentprints it afterpr-comment:and exits 1. (#557)cognitive-debt --session <prefix>exits 1 with its refusal line. Before, it printed an empty report. (#557)verify <prefix>names the corruptmeta.json.verify <full id>still verifies the chain. (#557)setup --verify --live --session <prefix>refuses a corrupt match the way it refuses the full ID. (#557)- The collector answers
GET /sessions/<prefix>andGET /sessions/<prefix>/eventswith 400, not 404. With--dashboard, the/api/sessions/<prefix>/*routes answer 400. A prefix that matches nothing still gets 404. (#557) - MCP tools return the message as a tool error,
{"error": "<message>"}withisError: true. Before, a tool saidsession not found, or<tool> failed: CorruptSessionMetaError: <message>. (#557) optimize <id>andexport <id> --backend langfuseprintSession not found: <id>when the ID matches nothing. Before, they printedNo sessions found.(#557)freezewith no ID and no readable session printsSession not found. Provide a session ID or record a session first.Before, it printedSession not found: None. (#557)TraceStore.find_sessioncan raiseCorruptSessionMetaError, which is aValueError. A lookup withtenant_idstill skips a corrupt session. (#557)- In
--format otlp, a failed tool call and a call with no result are nowtool/{tool}CLIENT spans (kind 3) withgen_ai.operation.name,gen_ai.tool.nameandgen_ai.tool.call.id, like a call that returned a result. Before, they were INTERNAL spans named{tool}. (#562) - An error span that does not name its tool takes its paired call's tool name instead of
error. (#562) - In
--format otlp, anerrortied to no tool call and with notool_name, such as a failed MCP server start or an HTTP proxy upstream failure, keeps its INTERNAL span namederror, as in 0.121.1. Only anerrorthat pairs with a call or has its owntool_namebecomes atool/{tool}span. (#573) - In
--format otlp, such anerrorwith atool_nameof""ornullis now namederror. Before, the span was named""ornull. (#573) export --format otlp-genaiadds the four content attributes.examples/otlp/genai-conformance.jsonis regenerated, with additions only. (#562)otlp-genaipayloads are larger, because the content attributes repeat text already in events and ininput.value/output.value: about +17% on three recorded sessions. Check collector payload limits. (#562)- Span links appear only when a trace sets
retry_of. agent-strace's hooks and imports do not set it. (#562) TraceStore.load_eventsraises UnreadableEventLineError ("line N of events.ndjson is not valid UTF-8") instead of UnicodeDecodeError. Both are ValueError. Commands that read such a session, includinglint,standup, andstatsandhealthwithout an ID, print the refusal they print for a line that is not valid JSON. Exit codes do not change: 1, and 2 forreviewandcompaction. (#559)health <id>printsError: cannot read session <id>: line N of events.ndjson is not valid UTF-8instead ofCould not read session <id>:and the codec text. It still exits 1. (#559)append_event,append_eventsandtag_sessionraise UnreadableEventLineError instead of UnicodeDecodeError, and still write nothing. They name the line that load_events names, whatever the line breaks. The hook still exits 0. Server ingest still answers 202 and counts the error.watch --tenant-idstill exits 1. A server meta update that sets a tenant still answers 400, now with the refusal. (#559)- The server's
GET /sessions/<id>/eventsanswers 400 with the refusal. Before, it closed the connection with no response. (#559) mcp-scan --watchskips such a line appended during the watch, and does not count it. Before, it stopped with a traceback. (#559)backfill-metastill skips such a session asunparseable_events. The detailnot UTF-8: invalid start bytebecomesline N: not valid UTF-8, and the first problem in file order is reported. (#559)- The storage format does not change. A file that decodes today gives the same events, refusals and line numbers. agent_trace.store adds two public helpers,
is_not_utf8andrefuse_lines_not_utf8. (#559) - With
OTEL_EXPORTER_OTLP_TRACES_PROTOCOLorOTEL_EXPORTER_OTLP_PROTOCOLset togrpc, or to any value other thanhttp/jsonorhttp/protobuf,export --endpointandwatch --stream-otlpnow refuse with one line and exit 1. Before, they ignored the variable and sent JSON. Pass--protocol http/jsonto send JSON as before. (#565) - With either variable set to
http/protobuf,export --endpointandwatch --stream-otlpnow send protobuf.--outputfiles stay JSON, and--protocolwithout--endpointis refused. (#565) - An endpoint that answers 415 gets a second line that names the other
--protocol. (#565) importexits 1 and writes nothing for a file it used to import as an empty session: a Codex rollout, a Copilot CLIevents.jsonl, or a JSONL file with no line of typeuser,assistant,systemorsummary, including an empty file. A transcript with unknown lines still imports. (#568)skills --from-claudecounts such files asskipped N unreadable, not as empty sessions. (#568)import_jsonlraisesNotClaudeTranscript, aValueError, for such files. (#568)- A session that failed and then recovered now has an UNSET root. To keep counting sessions with errors, filter on
agent.errors> 0. (#567) - An ERROR root carries
error.type:timeout,terminated, the failed request's error type, the type of the last failure that never recovered, or_OTHER. Each subagent root with--include-subagentsfollows the same rule. (#567) - The root gains six attributes, also in the otlp-genai
metadata.agent_straceobject:agent.strace.behavior.failed_operation_count,agent.strace.behavior.retry_count,agent.strace.behavior.recovered_operation_count,agent.strace.behavior.unresolved_failed_operation_count,agent.strace.session_statusandagent.strace.last_model_request_failed.examples/otlp/genai-conformance.jsonis regenerated, with additions only. (#567) watch --stream-otlproots stay UNSET, with no outcome attributes. (#567)- An
errorevent tied to no tool call and no model request, such as a proxy failure, keeps its ERROR span and still counts inagent.errors. On its own it no longer makes the root ERROR. (#567) - A
session_endwhosereason,stop_reasonortermination_reasoncontainserrororabort, as Copilot's do, is nowterminated, notcompleted. This changes the root status and the assignmentsession_statusscorer, so a criterion that expectedcompletedfor such a session now fails. (#567) cost,tree,timeline,replay,watchand the EU AI Act export show the recorded token counts for imported Claude Code sessions instead of the size estimate. (#569)importstores two new optional event fields,message_idandstop_reason. Sessions imported by earlier versions have neither, so their chat spans have nogen_ai.response.idor finish reasons. To get both, delete the session directory and import again. (#569)- Sessions imported before v0.108.0 repeat the usage on every line of a split message, so
costcounts it once per line. Import them again. (#569) - A Claude Code
<synthetic>API error message gets no span, so the rootagent.llm_requestscan be higher than the number ofchatspans. (#569) - The direct Langfuse export still ignores this recorded usage. (#569)
- In
--format otlp-genai, a tool result or a non-object tool argument that starts with{or[but does not parse, such as the Pythonreprthat hooks in 0.121.1 and earlier stored for an object result, is now a JSON string. Other text stays plain.output.valueandinput.valuedo not change. (#570) - The OpenAI and Anthropic SDK integrations store four new optional event fields:
response_id,response_model,server_addressandserver_port. Stored sessions stay readable, and classic--format otlpoutput does not change. (#570) dashboardsuccess counts and success rate can go down: a session whosesession_endrecords a timeout or a kill now counts as failed. (#581)difftext output changes when the two sessions have different phases: one-sided phases are listed and a phase at different places shows both numbers. Output for sessions with the same phases is unchanged. (#585)- Only the text of a hook-recorded
resultorerrorchanges. Sessions already recorded keep theirreprtext, and readers such as the test-runner summary parse both forms. A null tool response is now stored asnullinstead ofNone. The 1000- and 500-character limits are unchanged, and secrets are still redacted before the cut. (#576) - A session with a
session_startafter its lastsession_endnow reports session statusnot_recorded(OTLPagent.strace.session_status,dashboard), andpostmortemcan report it as crashed when its heartbeat is stale. (#590) - An operation whose outcomes are fail, ok, fail now reports
recovered_operation_count0 andunresolved_failed_operation_count1, and its session root span is ERROR. Before, the root was UNSET. (#589) gen_ai.agent.idis sent only when you give an ID; agent-strace never derives one. An empty--agent-id, or--agent-idwhere it has no effect, prints one line and exits 1. The attribute has Development status in the OpenTelemetry GenAI conventions. (#586)watch --agentused to abbreviate--agent-pid. With--agent-idadded it is ambiguous; use--agent-pidin full. (#586)evalgatesession_status: asession_endwhosereason,stop_reasonortermination_reasoncontainserrororabortis nowkilled. Before, it wascompletedwith exit code 0 or none, andtimeoutwith exit code 124. A criterion that expectscompletednow fails for Copilot'serrorandabortends, and a baseline saved by an earlier version can report a regression for such a session. (#575)evalgatesession_status: an intexit_codetoo large for a float is nowkilled. Before, the criterion failed with no score and the reasonint too large to convert to float. (#575)evalgatesession_status: a session that asession_startreopened after its lastsession_endis nowcompletedwhen its metadata hasended_at, elsekilled. Before, the scorer read thesession_endbefore the resume, so a baseline saved by an earlier version can report a regression. (#575)eval run <id>andeval ci <id>printSession not found: <id>to stderr when the ID or prefix matches no session. Before, they printedNo sessions found.The exit code is still 1. (#575)- A CrewAI, OpenAI Agents SDK or Strands run whose
started_atinmeta.jsonis not a usable time, or is later than the end, now ends withended_at, the counts and atotal_duration_msof 0. Before, the session stayed open, or stored NaN, an infinity, a total counted from 1970 or a negative total. Thesession_endevent does not change. (#574) importskips aturn_durationentry whosedurationMswould make the total too large to store. Before, the total could be Infinity or an int too large for a float. A valid run and a valid import store the same total as before. (#574)
Documentation
- docs/commands.md (the corrupt
meta.jsonparagraph andbackfill-meta), docs/server.md and docs/mcp.md describe the corruptmeta.jsonerror for an ID prefix. (#557) - docs/production.md documents the GenAI content attributes, retry links, classic tool spans and
--include-subagents. docs/commands.md lists the new flag and its refusals. (#562) - docs/production.md (Phoenix), docs/commands.md (
exportandwatchflags, endpoint table) and docs/integrations.md describe--protocol. ADR-0006 is amended to allow stdlib OTLP/HTTP protobuf; gRPC stays excluded. (#565) - docs/commands.md (
import) says import reads Claude Code transcripts only, how other agents' logs are recognised, and lists the new errors. (#568) - docs/production.md has a new "Session root status" section: the rule,
error.type, the new attributes, and how to keep counting sessions with errors. docs/telemetry-dev.md marks the recovered-session limit as Predicted. (#567) - docs/production.md has a new section, "Model responses imported from a transcript": the span, its attributes and the timing rule. docs/commands.md (
import,cost,export) is updated. (#569) - docs/production.md covers the JSON-string content encoding, that export sends recorded content by default, the keys outside the GenAI registry, the new
chatattributes and the conformance status.experiments/semconv-conformance/RESULTS.mdhas the counts:missing_attributeis sdk 148, session 230 and tree 228, sdk violations drop from 169 to 153, anderror_type_missing_on_erroris 0. The code and ADR-0011 now follow semconv-genai release v0.1.0 instead of commit e6658f1. (#570) - docs/commands.md describes how
post-toolandpost-tool-failurestore a tool's output. docs/production.md, docs/security.md and docs/capture-matrix.md are updated to match. (#576) - docs/integrations.md has a new Azure Monitor and Microsoft Foundry recipe: the collector config, registering the agent in Foundry with the ID, the send commands and what was verified.
experiments/azure-monitor/records what otelcol-contrib 0.165.0's Azure Monitor exporter sends for agent-strace traces: every span arrives withgen_ai.agent.id, arrays are dropped and values are cut at 8192 bytes. Application Insights and Foundry themselves were not tested. (#586) - docs/commands.md (
eval) gives thesession_statusrules, the three ways they differ from the root status rules, and theSession not foundline, and theeval cisynopsis shows its optional session ID. docs/production.md (Session root status) says theevalgate uses the same rules. (#575) - docs/production.md (Classic tool spans) and docs/commands.md (
export) say when anerroris a tool call. (#573) - docs/integrations.md (Sessions) says such a run still ends, with a total duration of 0. docs/commands.md (
import) says such adurationMsis skipped. (#574)