Repository navigation
Conversation
uttamdeb
force-pushed
the
fix/codex-native-tool-events
branch
from
October 21, 2026 08:16
4ed1331 to
b2c3c36
Compare
Contributor
Author
|
@iamtoruk — I have rebased this PR onto the latest main and pushed the update. The five Codex-focused suites pass (118 tests). When you have a chance, could you review the native Codex tool attribution changes? Thanks. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
web_search_call,tool_search_call, andimage_generation_callitems as WebSearch, ToolSearch, and ImageGeneration. Also recognize completed WebSearch items and the observedExtension/kind: "web.search"format.Real-session reproduction
I generated one native search using installed
codex-cli 0.162.0-alpha.17.2, existing ChatGPT authentication,gpt-6-lunawith max reasoning, and a read-only sandbox. The CLI emitted oneweb_searchstart/completion pair. Its stable identity matches the persistedevent_msg/item_completeditem withtype: "Extension",kind: "web.search", andaction.type: "search".Parsing that same unmodified session with
parseCodexFileFullon clean upstream0322472dand this branch4ed13312gives:webSearchRequestsThe normalized total input is 43,502, matching the CLI's recorded usage. Assertions confirm unchanged accounting, no duplicate call keys, exactly one recovered WebSearch, and the stable-identity match. No provider billing amount was recorded; the cost above is CodeBurn's token-price calculation. Native activity does not establish an additional billable search request.
This live check covers the observed
Extensiontransport. The other native response forms are covered by controlled fixtures and Codex's protocol model. The full local session stays outside Git; this description contains no prompt, query, result, argument, credential, raw session ID, or source path.Regression coverage
metadata.payloadbeing mistaken for ImageGeneration. Its regression also failed before the fix and now passes.Testing / Verification
tsc --noEmit,npm run build, andgit diff --checkpassed.4ed13312completed with no unresolved findings; its concrete findings were fixed and covered by regressions.npm testruns on unchanged main and final branch completed and were compared: zero new failing cases. Initial shared failure and serial reruns are disclosed below.Full-suite comparison
Windows, Node 24.9.0, npm 11.6.0, clean committed trees, identical lockfiles and installed dependency versions:
0322472d4ed13312Each run covered 389 test files: 386 passed, one failed, two skipped. The branch adds 11 test cases and introduces zero new failing cases.
The sole failure on both checkouts was
tests/cli-budget.test.ts,keeps overview budget lines only on unfiltered overviews: the original 30-second timeout, at 32.2s on main and 31.4s on this branch. After both full runs finished, I reran only that case on each checkout, one after the other, with the original timeout unchanged. Main passed in 24.1s and this branch passed in 24.0s (one passed / six unselected cases skipped per rerun). No assertion or timeout was weakened. The initial full-run failures are retained and are not described as all-green full runs.Both full runs used the repository's normal test scope, concurrently with one worker each:
Serial rerun selection:
node node_modules/vitest/vitest.mjs run tests/cli-budget.test.ts --configLoader runner --maxWorkers 1 -t 'keeps overview budget lines only on unfiltered overviews'The four serial refresh-lock suites remain excluded by the normal
npm testscript. No Electron or native-app code is changed.