Skip to content

perf(durable): batch Hands tool admission and result delivery - #4574

Draft
chickenlj wants to merge 5 commits into
agentscope-ai:mainfrom
chickenlj:feat/durable-tool-delivery
Draft

chickenlj wants to merge 5 commits into
agentscope-ai:mainfrom
chickenlj:feat/durable-tool-delivery

Conversation

@chickenlj

@chickenlj chickenlj commented Dec 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Hands batches durable tool admissions and contiguous result publication. Acknowledging an EXECUTE requires durable admission. Publication attempts remain fenced, execution events stay ordered, and output offsets survive takeover.

The sandbox executor records a durable, single-use launch permit before marking a tool attempted. A replacement worker can complete preparation or launch from the original unused permit. An external operation with an uncertain outcome still requires evidence before replay. The local sandbox can recover an interrupted creation by its persistent creation ID. Providers can opt into the same contract when their resource API supports it.

The RocketMQ extension coalesces waiting command admissions within a fixed bound. The SSE transport confirms both EXECUTE and cancellation after its mailbox write succeeds. The English and Chinese guides document recovery and the RocketMQ LiteTopic consumer-group setting.

Validation

  • Full Maven reactor and Spotless passed locally. Surefire reported 14,368 tests, 232 skipped and zero failures or errors. The build ran without the optional DashScope service credential. Documentation checks passed. Linux and Windows CI had passed on an earlier revision. The latest remote checks were pending during a GitHub Actions incident.
  • A real Apache RocketMQ 5.5.1 and PostgreSQL run held at least 10,000 active long-tool Turns for 318.59 consecutive seconds, including tool waits. All 34,850 submissions reached a successful terminal commit. Tool-ledger, output and session-overlap checks passed. Command and result message IDs were reconciled at both ends. Transport redelivery occurred and preserved the single tool record.
  • With the same eight Hands processes, increasing the command group's pending LiteTopic event limit from 100 to 4,096 lowered command-confirmation-to-callback p95 from 32.05 s to 17.23 s. In the independent integrated run after replacing the Hands processes, it was 30.51 s. Submission-to-terminal p95 was 213.33 s and the sustained completion rate was 71.86 Turns/s. Tool startup and the interval from observing tool completion to result publication remain material.

Earlier managed-broker observation

The earlier managed RocketMQ run sustained 1,000 active sessions for 315.54 seconds. Of 17,477 submissions, 17,422 finished successfully. After the observation window 52 executions had published final updates with the Brain cursor two events behind, and three had dispatch confirmation without Hands admission. The fully reconciled 10,000-Turn run above used the open-source broker. Reproducing those 55 specific deliveries on the managed service remains a separate investigation.

@mintlify

mintlify Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit 6ab3e66.

Approve preview

@chickenlj chickenlj closed this Dec 2, 2026
@chickenlj chickenlj reopened this Dec 2, 2026

This branch has not been deployed

No deployments
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