Skip to content

fix(v1): trace Responses custom tools#2129

Open
hallerite wants to merge 1 commit into
mainfrom
codex/trace-responses-custom-tools
Open

fix(v1): trace Responses custom tools#2129
hallerite wants to merge 1 commit into
mainfrom
codex/trace-responses-custom-tools

Conversation

@hallerite

@hallerite hallerite commented Jul 24, 2026

Copy link
Copy Markdown
Member

Summary

Parse Responses API custom_tool_call and custom_tool_call_output items into Verifiers' existing typed ToolCall and ToolMessage representation.

Codex uses custom tool items for tools such as apply_patch. The Responses dialect previously recognized only function calls, so the patch call was absent from the assistant message and its result appeared as an empty user node in saved traces.

Custom tool input is now retained as the tool-call arguments, the output is linked by call ID, and responses containing custom calls correctly report a tool-call finish reason.

Validation

  • uv run pytest tests/v1/test_graph.py (7 passed)
  • uv run ruff check verifiers/v1/dialects/responses.py tests/v1/test_graph.py
  • pre-push markdownlint-cli2, ruff check, ruff format, and ty hooks
  • live combined eval with fix(v1): keep Responses traces linear #2128: Codex 0.144.5, openai/gpt-5.5, Prime sandbox, reward 1.0
  • live trace captured apply_patch as a typed assistant tool call at node 4 and its linked tool result at node 5; the subsequent shell verification and final answer were also preserved

@hallerite
hallerite marked this pull request as ready for review July 24, 2026 17:21
@macroscopeapp

macroscopeapp Bot commented Jul 24, 2026

Copy link
Copy Markdown

Approvability

Verdict: Approved

Straightforward enhancement adding custom_tool_call support alongside existing function_call handling. Changes follow existing patterns, include test coverage, and don't modify existing behavior.

You can customize Macroscope's approvability policy. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant