Skip to content

Use the step-scoped router for tool execution - #36357

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/9e476ddd228ca5b1c03ed87863618ba77de6200c
Jul 31, 2026
Merged

Use the step-scoped router for tool execution#36357
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/9e476ddd228ca5b1c03ed87863618ba77de6200c

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 31, 2026

Copy link
Copy Markdown

Use the step-scoped router for tool execution

Why

Tool calls can outlive the sampling request that advertised them, so execution
must retain the finalized tool plan for that specific step.

What changed

  • Resolve tool runtimes, parallelism, cancellation behavior, argument diff
    consumers, and dispatch from the ToolRouter stored in StepContext.
  • Remove the separate router parameter from ToolCallRuntime and code-mode
    worker construction so callers cannot supply a different router.
  • Add a test helper for installing a router into a test StepContext.

## Why

Tool calls can outlive the sampling request that advertised them, so execution
must retain the finalized tool plan for that specific step.

## What changed

- Resolve tool runtimes, parallelism, cancellation behavior, argument diff
  consumers, and dispatch from the `ToolRouter` stored in `StepContext`.
- Remove the separate router parameter from `ToolCallRuntime` and code-mode
  worker construction so callers cannot supply a different router.
- Add a test helper for installing a router into a test `StepContext`.

GitOrigin-RevId: 9e476ddd228ca5b1c03ed87863618ba77de6200c
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/9e476ddd228ca5b1c03ed87863618ba77de6200c branch from 165406c to 66ebeb7 Compare July 31, 2026 16:24
@copyberry
copyberry Bot merged commit 66ebeb7 into main Jul 31, 2026
27 of 30 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/9e476ddd228ca5b1c03ed87863618ba77de6200c branch July 31, 2026 16:25
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 31, 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