Skip to content

[codex] Delete tool handler plan indirection#21427

Open
pakrym-oai wants to merge 7 commits intomainfrom
pakrym/delete-tool-handler-kind
Open

[codex] Delete tool handler plan indirection#21427
pakrym-oai wants to merge 7 commits intomainfrom
pakrym/delete-tool-handler-kind

Conversation

@pakrym-oai
Copy link
Copy Markdown
Collaborator

Why

The spec split in the parent PR still left an intermediate registry plan that recorded ToolHandlerKind values and translated them into concrete handlers later. That kept tool registration dependent on static enum bookkeeping instead of registering handlers from the same code that assembles their specs.

What Changed

  • Make build_tool_registry_builder register concrete handlers directly while adding specs.
  • Add small ToolRegistryBuilder helpers for spec augmentation and nested code-mode inspection.
  • Remove ToolHandlerKind, ToolHandlerSpec, and ToolRegistryPlan.
  • Update spec-plan tests to assert against the built ToolRegistry instead of static handler descriptors.

Validation

  • cargo check -p codex-core
  • cargo test -p codex-core tools::spec_plan::tests
  • cargo test -p codex-core tools::spec::tests
  • just fix -p codex-core

Base automatically changed from pakrym/tool-handler-specs-pr1 to main May 6, 2026 22:40
pakrym-oai added 3 commits May 6, 2026 15:47
…ndler-kind

# Conflicts:
#	codex-rs/core/src/tools/spec.rs
#	codex-rs/core/src/tools/spec_plan.rs
#	codex-rs/core/src/tools/spec_plan_tests.rs
#	codex-rs/core/src/tools/spec_plan_types.rs
@pakrym-oai pakrym-oai marked this pull request as ready for review May 6, 2026 23:54
@pakrym-oai pakrym-oai requested a review from a team as a code owner May 6, 2026 23:54
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.

2 participants