Skip to content

Extract tool config into codex-tools#16379

Merged
bolinfest merged 1 commit intomainfrom
pr16379
Apr 1, 2026
Merged

Extract tool config into codex-tools#16379
bolinfest merged 1 commit intomainfrom
pr16379

Conversation

@bolinfest
Copy link
Copy Markdown
Collaborator

@bolinfest bolinfest commented Apr 1, 2026

Why

codex-core already owns too much of the tool stack, and AGENTS.md explicitly pushes us to move shared code out of codex-core instead of letting it keep growing. This PR takes the next incremental step in moving core/src/tools toward codex-rs/tools by extracting low-coupling tool configuration and image-detail gating logic into codex-tools.

That gives later extraction work a cleaner boundary to build on without trying to move the entire tools subtree in one shot.

What changed

  • moved ToolsConfig, ToolsConfigParams, shell backend config, and unified-exec session selection from core/src/tools/spec.rs into codex-tools
  • moved original image-detail gating and normalization into codex-tools
  • updated codex-core to consume the new codex-tools exports and pass a rendered agent-type description instead of raw role config
  • kept codex-rs/tools/src/lib.rs exports-only, with extracted unit tests living in sibling *_tests.rs modules

Testing

  • cargo test -p codex-tools
  • cargo test -p codex-core --lib tools::spec::

@bolinfest bolinfest merged commit a99d484 into main Apr 1, 2026
40 of 52 checks passed
@bolinfest bolinfest deleted the pr16379 branch April 1, 2026 20:21
@github-actions github-actions bot locked and limited conversation to collaborators Apr 1, 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.

1 participant