[codex] Project Tool Search target calls in transcripts#80164
Conversation
|
Codex review: needs maintainer review before merge. Summary Reproducibility: yes. source inspection gives a high-confidence path: current main executes target tools through Real behavior proof Next step before merge Security Review detailsBest possible solution: Land a maintainer-approved projection that records logical target tool calls/results in verifier-facing transcripts while preserving compact provider-visible Tool Search controls. Do we have a high-confidence way to reproduce the issue? Yes, source inspection gives a high-confidence path: current main executes target tools through Is this the best way to solve the issue? Likely yes: carrying the wrapper parent id and projecting logical target call/result pairs after the wrapper result is a narrow fix that preserves provider-visible compaction. Maintainer review should still clear the trajectory contract split and the failing protocol check before merge. What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 09132effa82a. |
39329c9 to
c8e6d29
Compare
Summary
messagesSnapshotoutput as targettoolCall/toolResultpairs.providerVisibleTools.Why
Core Tool Search currently lets non-Codex models call wrapper tools such as
tool_search_codeortool_call, then runs the selected target tool behind the bridge. The target lifecycle events use the right tool name, but verifier-facing transcript and trajectory surfaces can still show only the wrapper call. Benchmarks that score actual tool calls can then miss the logical target execution and return zeroes.This is the core/native counterpart to #80155, which handles the Codex app-server dynamic tool transcript shape.
Real behavior proof
tool_search_code, but verifier-facingmessagesSnapshot/trajectory output could show only the wrapper call instead of the logical target tool call/result.node --import tsx --input-type=modulewith an inline script that registered a real Tool Search catalog, executed thetool_search_codebridge, captured the hidden target execution, and printed the projected transcript/trajectory shape.{ "visibleProviderTools": ["tool_search_code"], "hiddenCatalogToolCount": 1, "bridgeResultOk": true, "bridgeTelemetry": { "catalogSize": 1, "sources": { "openclaw": 1, "mcp": 0, "client": 0 }, "searchCount": 0, "describeCount": 1, "callCount": 1 }, "capturedTargetExecutions": [ { "parentToolCallId": "wrapper-call-proof", "toolCallId": "tool_search_code:wrapper-call-proof:proof_lookup_record:1", "toolName": "proof_lookup_record", "input": { "value": "invoice-42" } } ], "projectedMessagesSnapshot": [ { "role": "assistant", "toolCall": "tool_search_code", "id": "wrapper-call-proof" }, { "role": "toolResult", "toolName": "tool_search_code", "id": "wrapper-call-proof" }, { "role": "assistant", "toolCall": "proof_lookup_record", "id": "tool_search_code:wrapper-call-proof:proof_lookup_record:1", "arguments": { "value": "invoice-42" } }, { "role": "toolResult", "toolName": "proof_lookup_record", "id": "tool_search_code:wrapper-call-proof:proof_lookup_record:1", "text": "target-result invoice-42 via tool_search_code:wrapper-call-proof:proof_lookup_record:1" }, { "role": "assistant", "text": "done" } ], "trajectoryCompiledShape": { "tools": ["proof_lookup_record"], "providerVisibleTools": ["tool_search_code"] } }tool_search_codeas the only provider-visible tool, records the parent wrapper id, and projects the logicalproof_lookup_recordtoolCall/toolResultpair intomessagesSnapshot; trajectory context exposes logical target tools while preserving compactproviderVisibleTools.Validation
node scripts/test-projects.mjs src/agents/tool-search.test.tsnode scripts/test-projects.mjs src/agents/pi-embedded-runner/run/attempt.test.tspnpm check:changed