Skip to content

Stop caching Realtime tool-choice matches for each response - #6085

Closed
markstuart-oai wants to merge 1 commit into
feat/codex-harnessfrom
codex/drop-realtime-tool-match-memo
Closed

markstuart-oai wants to merge 1 commit into
feat/codex-harnessfrom
codex/drop-realtime-tool-match-memo

Conversation

@markstuart-oai

Copy link
Copy Markdown
Contributor

Summary

Why: Each scoped Realtime response has been saving a list of tool matches, even for tools the app never checks. This PR has been removing that list and using the same rule when the app checks a tool. A response with no scope still inherits the session tools. A scoped response with no matches still denies all tools.

Test plan

The old and new Rust selectors have been returning the same results for 73 scoped and unscoped cases, including unknown names and MCP servers. With 128 tools and 16 checks that each scan the whole list, the local test took 36 µs before and 92 µs after. That's per response in the test, not the time for a model turn. All 111 patches applied and matched the new tree hash. The full SDK check stopped while building the native module. Without that module, the three SDK tool-choice tests and the global voice test failed at setup.

Issue number

No linked issue.

Checks

  • I've added new tests, if relevant
  • I've run the applicable checks in AGENTS.md, including the SDK verification script when required
  • I've confirmed all required checks pass
  • I've completed the review required by AGENTS.md

@markstuart-oai
markstuart-oai requested a review from a team November 19, 2026 02:23
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