Skip to content

Remove unavailable MCP placeholder tool backfill#22439

Merged
sayan-oai merged 1 commit into
mainfrom
dev/sayan/rm-unavailable-fallback
May 13, 2026
Merged

Remove unavailable MCP placeholder tool backfill#22439
sayan-oai merged 1 commit into
mainfrom
dev/sayan/rm-unavailable-fallback

Conversation

@sayan-oai
Copy link
Copy Markdown
Collaborator

@sayan-oai sayan-oai commented May 13, 2026

Why

UnavailableDummyTools kept synthetic placeholder tools alive for historical tool calls whose backing MCP tool was no longer available. That path adds stale model-visible tool specs and special routing at the point where unavailable MCP calls should use ordinary current-tool handling. This removes the runtime backfill instead of preserving a second compatibility lane.

Is it safe to remove?

The unavailable tools were added in #17853 after a CS issue when a previously-called MCP tool failed to load and was omitted from the CS spec. Now that we have tool search, I think this is resolved:

  • API merges tools from previous TST output into effective tool set so theyre always in CS spec
    • if an MCP tool surfaced by TST later becomes unavailable, the model can still call it and it will just return model-visible error
  • both TST output and function call output are dropped on compaction so model will not remember old calls to MCP post compaction

What changed

  • Delete unavailable-tool collection, placeholder handler, router/spec plumbing, and obsolete placeholder coverage.
  • Keep features.unavailable_dummy_tools as a removed no-op feature tombstone so existing configs still parse cleanly.
  • Add an integration-style tool_search regression test showing that a deferred MCP tool surfaced through tool_search still routes through MCP and returns a model-visible tool-call error rather than unsupported call.

Verification

  • cargo test -p codex-core tool_search

@sayan-oai sayan-oai requested a review from a team as a code owner May 13, 2026 05:29
@sayan-oai sayan-oai force-pushed the dev/sayan/rm-unavailable-fallback branch from 1173386 to e3a4bb8 Compare May 13, 2026 05:34
@sayan-oai sayan-oai changed the title rm unavailable dummy tool fallback Remove unavailable MCP placeholder tool backfill May 13, 2026
@sayan-oai sayan-oai requested a review from mzeng-openai May 13, 2026 05:42
@sayan-oai sayan-oai merged commit 2304ec4 into main May 13, 2026
36 of 39 checks passed
@sayan-oai sayan-oai deleted the dev/sayan/rm-unavailable-fallback branch May 13, 2026 06:30
@github-actions github-actions Bot locked and limited conversation to collaborators May 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants