Repository navigation
feat: record agent steps from stream() - #27
TheGreatAxios wants to merge 3 commits into
Conversation
An empty step list is not an observed empty tool path, so ranSteps([]) fails unless a watched run actually used no tools.
|
Triage: Pass No changes needed from you. A maintainer will review this pull request. Stacked on #26: only this pull request's own changes were checked. |
TheGreatAxios
left a comment
There was a problem hiding this comment.
Review · Request changes
Records agent steps from stream(). An aborted turn’s tools land on the next case, and a policy-denied tool is invisible, so ranSteps([]) treats that deny as an observed empty tool path.
Findings
-
src/runs.ts:244—sendAgentcloses the stream and releaseswithAgentLockas soon as the in-flightsendpromise settles.@intx/agent0.5 rejects thatsendon abort while the reactor keeps emitting. The next case subscribes and records the latetool.start. A stub with that timing produced steps["tool:search"]on the following reply-only"lookup"case, which should have been["llm:stub"]. Becausesawis already true, the lookup reply is not synthesized. After a timeout, the next case inherits the aborted case’s tools and loses its own model step, soranSteps(["search"])can pass andranSteps([])can fail on a run that used no tools.bun test tmp/critique-tests/trajectory-holes.test.tsexited 1: expected["llm:stub"], received["tool:search"]. That probe was deleted. -
src/runs.ts:92— a policy deny emitstool.doneand nevertool.start(@intx/inference0.5beforeToolblock). The tool name is only oninference.tool_call.endand the assistanttool_callblock, and both are ignored. The recorded steps contain no tool, soranSteps([])passes on a turn that did callsearch, andranSteps(["search"])fails. The same probe expected tool names["search"]and received[].
Review · Follow-upCommit Denied tools are fixed.
|
Review · Follow-upCommit
|
|
Superseded by the 0.2.0 release: #32 |
Summary
agent.stream()whilesendruns.sendalone still returns no steps.ranSteps([])fails when the step list was never observed. An observed model-only run still counts as no tools.send.Verification
bun run checkexited 0 (68 tests on the amended commit).10ef921found no defects.bun test e2e/agent-trajectory.e2e.test.tsexited 0 (8 passed).Stacked on #26.
Fixes CL-11504