Repository navigation
The VS Code extension fixes #478 and #480 shipped separately in vscode-v0.5.2 (#486). Core v0.117.0 does not change the extension, which stays at version 0.5.2.
Fixes
record(the MCP stdio proxy) now exits when the agent closes its stdin. It first waits for the server's last replies and relays and traces them. Before,recordcould hang and drop replies. (#485)recordstops the server, ends the session and exits 143 on SIGTERM or 130 on SIGINT. Before, the server kept running and the session had no end time. (#485)recordreports a server that cannot start, records the error, ends the session and exits 127 when the command is not found, 126 when it cannot run, or 1. It no longer aborts with exit 134 when the server exits while the agent still holds stdin open. A deleted--parentsession no longer makesrecordlose its end time. (#485)recordnow stops the MCP server's child processes too, when it stops the server and when the server exits and leaves them running. On Windows every child is in a job object. On POSIX it is best effort and never signals unrelated processes. (#487)recordends the session cleanly in every case:session_endis always the last event, its counts match the trace, and nothing is written to the agent after it. Server output still not relayed 5 seconds after the server exits is cut short, and a write the agent does not take within 5 seconds is cancelled. Each is recorded as anerror, andsession_endgetsoutput_truncated. A reply that is cut short can be in the trace without reaching the agent. A SIGTERM or SIGINT before the server starts ends the session without starting it. (#487)autonow passes SIGTERM, SIGINT and SIGHUP on to the command and its whole process group, waits for them to exit, and removes its temporary hook directory. Before, SIGTERM or SIGHUP left the directory behind and the command running. Ctrl-C in a shell loop that runsautostill stops the loop. (#493)- CrewAI, OpenAI Agents and Strands runs are now each recorded as their own session, closed with session_end, duration and tool, LLM and error counts. Before, sessions never ended and later runs were added to the same session. Overlapping runs, including runs in other processes, no longer overwrite each other's session. (#492)
- Tool results and errors now link to their tool call in CrewAI, OpenAI Agents, Strands and LangChain. OpenAI Agents tool calls are recorded again on openai-agents 0.25 or later.
uninstrument_openai_agentsnow removes its patches. (#492) - Python SDK integrations (OpenAI, Anthropic, LiteLLM) record a model call ended by KeyboardInterrupt, SystemExit or task cancellation as a cancelled response, so its request is always closed. This covers streams too. (#488)
@trace_tooland@trace_llm_callnow traceasync deffunctions. They await the call and record its result, error and duration. Before, they recorded the coroutine object with a duration near 0 ms and missed errors raised inside it. (#479)start_session()now ends the thread's active session before it starts a new one. Before, the first session was left open with no end time. (#479)agent-strace importno longer duplicates events when the same Claude Code JSONL log is imported again. It now writes nothing, prints that the session is already imported, and exits 0. A log that fails part way no longer leaves a partial session. (#489)a2atree shows a sub-agent that one parent called more than once as a single node with a delegation count, instead of a false[cycle], and OTLP export no longer emits duplicate span IDs. Linking a sub-session sets its depth to its parent's depth plus one and no longer loses meta updates the sub-agent writes at the same time.record-httpkeeps a parent link and depth that another proxy wrote while it ran. (#491)token-budgetandwatch --max-context-pctnow measure how full the context window is on each request: that request's input tokens over the model's context limit. Before, they added up input tokens across all requests, so they alerted too early and stayed silent after compaction. Thewatchalert now fires each time fill rises past the threshold, for example again after compaction. Input tokens now includeprompt_tokens, nestedusageobjects and Anthropic cache read and write tokens. (#481)baseline checknow scores a session that never recorded an end time, such as a crashed agent or onewatchkilled, on the data recorded so far. Before, it passed as[OK]. For such a session, tool calls, LLM requests, duration and cost count only when above the baseline mean. (#482)retention cleanno longer deletes running sessions. A session with no end time, or one named by an active hook marker, is kept and does not count toward the limits until it has had no writes for 7 days. Deletion now holds the store write lock and also removes the session's checkpoint, approvals, dataset lines and hook state. (#484)retention clean --max-size-mbnow measures only the sessions it can delete. Before, other data such asdatasets/counted too, so it could delete every session.retention statusandcleanprint how many open sessions were kept. (#484)- One bad entry in
rbac.jsonno longer makes every permission check deny, and the nextrbac assignorrbac revokeno longer erases the other assignments. The bad entry is skipped with a warning and kept in the file. (#483) - An
rbac.jsonfile that cannot be parsed is never overwritten.rbac assign,rbac revokeandrbac listprint the error and exit 1, and permission checks still deny.config-watch snapshotkeeps existing snapshots the same way. (#483) audit-toolschecks each LLM endpoint in a .env file on its own, so an approved endpoint no longer hides an unapproved one in the same file. It also scans every env file a commit touched (for exampleconfig/prod.envand.env.local), not only the root.env. (#490)
Compatibility
recordhas new exit codes: 143 on SIGTERM, 130 on SIGINT, 127, 126 or 1 when the server cannot start, and 2 when no server command is given. (#485)- An inherited SIGCHLD=SIG_IGN is reset while
recordruns. If something else reaps the server,recordexits 255. On Windows, a server that cannot be put in a job object is not run. (#487) - On POSIX,
autoruns the command in its own process group. A SIGKILL sent to agent-strace no longer reaches the command, and processes that leave the group (setsid) are not signalled. Exit codes are 128 plus the signal when stopped by one. (#493) - CrewAI, OpenAI Agents and Strands: each framework run is a new session. An event that arrives after its run ended goes to the agent's current session, with
original_session_id. If it had aparent_id, that ID moves tooriginal_parent_id, and itsparent_idandduration_msare cleared. (#492) - OpenAI Agents tool arguments are on the
tool_resultorerrorevent, and thetool_callhas{}. (#492) - A second
start_session()on the same thread ends the active session. (#479) - To re-import a session with
import, delete its directory first. (#489) a2atree text changes: a shared node shows "shown above", and a cycle shows "[cycle] -> name". OTLP agent spans gain anagent.delegationsattribute. (#491)token-budgettext output adds aFillcolumn andCurrent,Peak,HeadroomandInput sentlines, and drops theCumulativecolumn and theEst. remainingline. (#481)- Python API:
RequestBudget.pct_usedandTokenBudgetReport.final_pctnow hold one request's fill instead of the running sum. New fields:RequestBudget.estimated,TokenBudgetReport.final_context_tokens,peak_context_tokens,peak_pctandpeak_request_index, andTokenBudgetWatcher.context_tokens. The watcher alert uses a colon where it had an em dash. (#481) baseline checkprints[UNSCORED]with a reason and exits 1 for a session it cannot measure, for example one with missing or unreadable metadata. It used to print[OK]and exit 0. (#482)retentionkeeps a session with no end time until it has had no writes for 7 days, and--max-size-mbcounts only the sessions it can delete. (#484)rbac assign,rbac revoke,rbac listandconfig-watch snapshotexit 1 when their file cannot be parsed.RBACStore.assignandRBACStore.revokeraise the newRBACFileError, andtake_snapshotraisesSnapshotFileError. Both subclassValueError. (#483)audit-toolsmay now report endpoints it missed before. (#490)
Known issues
- With LangGraph installed, instrumenting LangChain breaks every
StateGraphcompiled afterwards:invokeandstreamraiseAttributeError: 'function' object has no attribute 'triggers'. The node wrapper replaces LangGraph'sPregelNodeobjects with plain functions. v0.116.0 and earlier releases do the same. Until it is fixed, compile your graphs before you instrument LangChain. Tool and model calls in those graphs are still traced. Withagent_trace.auto, setAGENT_STRACE_AUTO_INSTRUMENTto a list withoutlangchain,langgraphordetect.