Skip to content

v0.117.0

Latest

Choose a tag to compare

@github-actions github-actions released this 19 Nov 11:58
c7867f0

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, record could hang and drop replies. (#485)
  • record stops 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)
  • record reports 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 --parent session no longer makes record lose its end time. (#485)
  • record now 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)
  • record ends the session cleanly in every case: session_end is 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 an error, and session_end gets output_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)
  • auto now 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 runs auto still 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_agents now 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_tool and @trace_llm_call now trace async def functions. 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 import no 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)
  • a2a tree 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-http keeps a parent link and depth that another proxy wrote while it ran. (#491)
  • token-budget and watch --max-context-pct now 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. The watch alert now fires each time fill rises past the threshold, for example again after compaction. Input tokens now include prompt_tokens, nested usage objects and Anthropic cache read and write tokens. (#481)
  • baseline check now scores a session that never recorded an end time, such as a crashed agent or one watch killed, 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 clean no 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-mb now measures only the sessions it can delete. Before, other data such as datasets/ counted too, so it could delete every session. retention status and clean print how many open sessions were kept. (#484)
  • One bad entry in rbac.json no longer makes every permission check deny, and the next rbac assign or rbac revoke no longer erases the other assignments. The bad entry is skipped with a warning and kept in the file. (#483)
  • An rbac.json file that cannot be parsed is never overwritten. rbac assign, rbac revoke and rbac list print the error and exit 1, and permission checks still deny. config-watch snapshot keeps existing snapshots the same way. (#483)
  • audit-tools checks 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 example config/prod.env and .env.local), not only the root .env. (#490)

Compatibility

  • record has 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 record runs. If something else reaps the server, record exits 255. On Windows, a server that cannot be put in a job object is not run. (#487)
  • On POSIX, auto runs 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 a parent_id, that ID moves to original_parent_id, and its parent_id and duration_ms are cleared. (#492)
  • OpenAI Agents tool arguments are on the tool_result or error event, and the tool_call has {}. (#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)
  • a2a tree text changes: a shared node shows "shown above", and a cycle shows "[cycle] -> name". OTLP agent spans gain an agent.delegations attribute. (#491)
  • token-budget text output adds a Fill column and Current, Peak, Headroom and Input sent lines, and drops the Cumulative column and the Est. remaining line. (#481)
  • Python API: RequestBudget.pct_used and TokenBudgetReport.final_pct now hold one request's fill instead of the running sum. New fields: RequestBudget.estimated, TokenBudgetReport.final_context_tokens, peak_context_tokens, peak_pct and peak_request_index, and TokenBudgetWatcher.context_tokens. The watcher alert uses a colon where it had an em dash. (#481)
  • baseline check prints [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)
  • retention keeps a session with no end time until it has had no writes for 7 days, and --max-size-mb counts only the sessions it can delete. (#484)
  • rbac assign, rbac revoke, rbac list and config-watch snapshot exit 1 when their file cannot be parsed. RBACStore.assign and RBACStore.revoke raise the new RBACFileError, and take_snapshot raises SnapshotFileError. Both subclass ValueError. (#483)
  • audit-tools may now report endpoints it missed before. (#490)

Known issues

  • With LangGraph installed, instrumenting LangChain breaks every StateGraph compiled afterwards: invoke and stream raise AttributeError: 'function' object has no attribute 'triggers'. The node wrapper replaces LangGraph's PregelNode objects 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. With agent_trace.auto, set AGENT_STRACE_AUTO_INSTRUMENT to a list without langchain, langgraph or detect.