Optimize Step durability and tool execution policy - #30
Merged
Merged
Conversation
longquanzheng
marked this pull request as ready for review
September 18, 2026 05:54
longquanzheng
force-pushed
the
codex/step-options-running-type
branch
from
September 18, 2026 05:57
7e6c912 to
e37dacc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rationale and user impact
Short work can complete through Dex's low-latency ASYNC path and safely fall back to regular execution. Work expected to exceed five seconds more than half the time goes directly to SYNC regular execution. Tool running type remains an optimization hint rather than an SLA.
Tool execution Steps have no static registered StepOptions. Serial routing, parallel fan-out, and manual retries re-resolve the current tool definition and attach complete movement-scoped options. This prevents policy from one tool call leaking into another.
The Dex v0.9.1 RPC contract fixes timeouts, locks, transactional execution, and selective loads at Flow registration. Archive reads still return one ten-message page, but load the retained archive map because the selected instance is RPC input and invocation-specific loads no longer exist.
Snapshot is a non-locking, non-transactional read RPC, so Dex Server v0.10.0 executes it through Temporal Query. It remains readable from retained closed Flow history and returns the last durable application view. Run ID remains only as the execution-generation key for continue-as-new reconciliation.
This intentionally changes the Flow graph and requires active old Agent Flows to be canceled before rollout.
Validation
make checkmake check-flow-definitionDEX_FLOW_SERVICE_ADDRESS=127.0.0.1:8801 make test-server-integrationDEX_FLOW_SERVICE_ADDRESS=127.0.0.1:8801 make test-full-stack-e2e(19 passed)python3 -m unittest script/update_dex_release_test.pypython3 script/check_dex_release.py