Skip to content

feat(durable): complete resumable agent execution - #4443

Merged
oss-maintainer merged 3 commits into
agentscope-ai:mainfrom
chickenlj:codex/durable-core-recovery
Nov 27, 2026
Merged

oss-maintainer merged 3 commits into
agentscope-ai:mainfrom
chickenlj:codex/durable-core-recovery

Conversation

@chickenlj

Copy link
Copy Markdown
Collaborator

AgentScope-Java Version

2.1.0-SNAPSHOT

Description

Durable Turns can outlive a client connection or a worker. This PR wires the resulting execution and recovery paths through the native Java API, the HTTP backend, and the Brain–Hands transport.

  • Persist directed Turn dispatch and use RocketMQ LiteTopic to wake the eligible Thread. Register the next FIFO head when the current Turn settles. Keep an indexed repair path for missed dispatches and expired leases.
  • Edit queued inputs and atomically convert them to Steer. Apply Steer with the native checkpoint at the next eligible reasoning boundary.
  • Send one dispatch envelope per model action and Hands route. Acknowledge after all child calls are recorded. Preserve per-call identities for replay, authorization, cancellation, and ordered result application.
  • Preserve completed results across Brain and Hands replacement. Park an unconfirmed native tool outcome until an authorized host supplies evidence. Support detached jobs and graceful drain at durable boundaries.
  • Expose Turn blockers, tool state, versioned verification outcomes, and Hands backlog statistics. Keep committed history resumable, use Redis for live previews, and send signed webhook event references through the Outbox.
  • Adapt the supported Claude session-event subset at the HTTP boundary. Update native schemas, fixtures, Chat, and English and Chinese user docs.

Related to #4223 and #4393. Review coordination with #4217, #4221, #4222, and #4394 is relevant where they touch the same recovery, storage, and event paths.

Validation

  • PostgreSQL-enabled Durable regression: 471 passed. The remote HTTP run skipped one local-storage-only lease test covered by the JDBC case.
  • SQLite and HTTP focused checks: 7 passed, including batch authorization and internal backend progress.
  • Redis preview, Chat, and Brain–Hands examples: 20 passed.
  • Affected Maven reactors passed Spotless. Documentation tests, Mintlify validation, link checks, and git diff --check passed.
  • RocketMQ delivery and fault injection used the simulated broker. The target Broker and multi-process deployment matrix remain for integration acceptance.

Checklist

  • Affected modules pass Spotless.
  • Behavior and protocol tests cover the changed paths.
  • User docs and affected examples are updated.
  • Full repository test suite and production Broker acceptance are complete.

Import all Durable changes from the codex/durable-mq-litetopic worktree based on d29103b, including directed Turn dispatch, remote tool delivery, queued input steering, protocol updates, and examples.
Add directed Turn scheduling, queue editing and steering, resumable tool execution, and progress and verification views. Batch RocketMQ Hands dispatches while retaining each tool identity and the native event contract.
Copilot AI balanced review requested due to automatic review settings November 27, 2026 02:01
@mintlify

mintlify Bot commented Nov 27, 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 20dcaeb.

Approve preview

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@oss-maintainer
oss-maintainer merged commit 5ef06fa into agentscope-ai:main Nov 27, 2026
7 checks passed
@chickenlj
chickenlj deleted the codex/durable-core-recovery branch November 28, 2026 01:50
chcodex added a commit to chcodex/agentscope-java that referenced this pull request Nov 28, 2026
chcodex added a commit to chcodex/agentscope-java that referenced this pull request Nov 28, 2026
Resolve the 16 overlapping files by keeping the PR agentscope-ai#4443 recovery model
(tool policy hooks, native tool reconciliation, committed tool output,
queued-input edits) and re-applying the local fixes:

- result metadata publication with serialization guard
- InterruptedRunHandler decision validation
- full journal replay for recovery snapshots
- session-scoped live event filtering and bounded previews
- AG-UI tool-only message suppression and argument suffix completion
- lease deadline watchdog
- protocol error redaction
- spring AG-UI MVC test migration
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.

3 participants