Skip to content

Optimize Step durability and tool execution policy - #30

Merged
longquanzheng merged 8 commits into
mainfrom
codex/step-options-running-type
Sep 18, 2026
Merged

longquanzheng merged 8 commits into
mainfrom
codex/step-options-running-type

Conversation

@longquanzheng

@longquanzheng longquanzheng commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • default Agent Flows to ASYNC Step durability while keeping model, compaction, and declared long-running tool work SYNC
  • add validated short/long tool running policy, a fixed one-minute heartbeat timeout, and attempt-scoped tool deadlines across serial, parallel, and recovery paths
  • resolve complete tool StepOptions per movement from the selected ToolDefinition, including timeout, retry, durability, loads, and failure routing
  • collapse external serial execution onto the canonical ExecuteTool Step and remove the obsolete ExecuteToolWithRetry identity
  • document the built-in, parallel, approval, serial execution, and recovery Step topology
  • upgrade Dex Server/CLI to v0.10.0 and Go SDK to v0.9.1, migrating all Agent RPCs to explicit registered RPCOptions
  • keep Snapshot as one application-only read RPC, without Dex visibility lookup, terminal metadata, or a terminal browser screen

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 check
  • make check-flow-definition
  • DEX_FLOW_SERVICE_ADDRESS=127.0.0.1:8801 make test-server-integration
  • DEX_FLOW_SERVICE_ADDRESS=127.0.0.1:8801 make test-full-stack-e2e (19 passed)
  • python3 -m unittest script/update_dex_release_test.py
  • python3 script/check_dex_release.py

@longquanzheng
longquanzheng marked this pull request as ready for review September 18, 2026 05:54
@longquanzheng
longquanzheng force-pushed the codex/step-options-running-type branch from 7e6c912 to e37dacc Compare September 18, 2026 05:57
@longquanzheng
longquanzheng merged commit 45dad64 into main Sep 18, 2026
2 checks passed
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