Skip to content

POC: Expose gated Code Mode files tools#22524

Draft
lt-oai wants to merge 1 commit into
codex/file-tools-poc-02-brokerfrom
codex/file-tools-poc-03-tools
Draft

POC: Expose gated Code Mode files tools#22524
lt-oai wants to merge 1 commit into
codex/file-tools-poc-02-brokerfrom
codex/file-tools-poc-03-tools

Conversation

@lt-oai
Copy link
Copy Markdown
Contributor

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

Why

Code Mode needs a concrete native surface for the proposed file platform actions: materialize a file into the workspace, copy between refs, and export a fileParam-compatible data URI at tool-call time.

What

  • Adds a files namespace gated by experimental_supported_tools = ["code_mode_files"].
  • Implements files.materialize, files.copy, and files.export_for_tool over the file broker.
  • Adds an active provider registry: configured broker routes are checked against live MCP inventory from mcp_connection_manager.list_all_tools().
  • Lets broker routes delegate to installed MCP tools internally, while those same MCP tools may still be visible to the model directly.
  • Keeps openai/fileParams as compatibility metadata, not the source of truth. Explicit broker routes/adapters decide semantics.
  • Keeps the POC limited to env://current/...; provider adapters can fill in Library, connector, and remote env behavior behind the broker.

Testing

  • cargo test -p codex-core files
  • cargo test -p codex-core file_broker
  • just fmt

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