Repository navigation
fix(tracing): preserve tool names in ChatML history - #126
CNSeniorious000 wants to merge 2 commits into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
sangkyoonnam
left a comment
There was a problem hiding this comment.
The two history fields lose the "tool" fallback for an empty or missing name. The parent builds both through toolObservationName(tc), whose final fallback (parent trace.ts:284) is tc.name || "tool". The head assigns tc.name directly in both places.
I ran pnpm --config.manage-package-manager-versions=false exec vitest run plugins/tracing/test/trace.test.ts -t "keeps real tool names|captures web search, local shell, and MCP" 3 times on the head (3 passed each) and 3 times with only trace.ts reverted to its parent version (3 failed each). The two inline suggestions keep the fallback.
Skill and MCP display names also leak into ChatML history, replacing the tool name Codex actually called. For example, a call recorded as
exec_commandappears asskill:bug-mentorin the next generation's input.Use the recorded tool name for assistant tool calls and tool replies. Keep observation names and trace tags unchanged.
Tests
skill_tagson and off, plus MCP calls; assert original names in both history roles and unchanged observation names.pnpm run lintandpnpm testpass (127 tests).