Skip to content

codex-tools: extract collaboration tool specs#16141

Merged
bolinfest merged 1 commit intomainfrom
pr16141
Mar 29, 2026
Merged

codex-tools: extract collaboration tool specs#16141
bolinfest merged 1 commit intomainfrom
pr16141

Conversation

@bolinfest
Copy link
Copy Markdown
Collaborator

@bolinfest bolinfest commented Mar 29, 2026

Why

The recent codex-tools migration steps have moved shared tool models and low-coupling spec helpers out of codex-core, but core/src/tools/spec.rs still owned a large block of pure collaboration-tool spec construction. Those builders do not need session state or runtime behavior; they only need a small amount of core-owned configuration injected at the seam.

Moving that cohesive slice into codex-tools makes the crate boundary more honest and removes a substantial amount of passive tool-spec logic from codex-core without trying to move the runtime-coupled multi-agent handlers at the same time.

What changed

  • added agent_tool.rs, request_user_input_tool.rs, and agent_job_tool.rs to codex-tools, with sibling *_tests.rs coverage and an exports-only lib.rs
  • moved the pure ToolSpec builders for:
    • collaboration tools such as spawn_agent, send_input, send_message, assign_task, resume_agent, wait_agent, list_agents, and close_agent
    • request_user_input
    • agent-job specs spawn_agents_on_csv and report_agent_job_result
  • rewired core/src/tools/spec.rs to call the extracted builders while still supplying the core-owned inputs, such as spawn-agent role descriptions and wait timeout bounds
  • updated the core/src/tools/spec.rs seam tests to build expected collaboration specs through codex-tools
  • updated codex-rs/tools/README.md so the crate documentation reflects the broader collaboration-tool boundary

Test plan

  • CARGO_TARGET_DIR=/tmp/codex-tools-collab-specs cargo test -p codex-tools
  • CARGO_TARGET_DIR=/tmp/codex-core-collab-specs cargo test -p codex-core --lib tools::spec::
  • just fix -p codex-tools -p codex-core
  • just argument-comment-lint

References

@bolinfest bolinfest merged commit 7880414 into main Mar 29, 2026
22 checks passed
@bolinfest bolinfest deleted the pr16141 branch March 29, 2026 03:39
@github-actions github-actions bot locked and limited conversation to collaborators Mar 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

1 participant