openclaw - ✅(Solved) Fix [sogyo] Add a cancel fan-out seam between delegated tasks and session runs [1 pull requests, 5 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#68550Fetched 2026-04-19 15:10:11
View on GitHub
Comments
5
Participants
2
Timeline
8
Reactions
0
Author
Participants
Timeline (top)
commented ×5cross-referenced ×2closed ×1

The plugin runtime plan in jinon86/openclaw-plugin-a2a#8 assumes a supported way to fan cancel in both directions between broker tasks and OpenClaw session runs.

Parent blocker:

  • jinon86/openclaw-plugin-a2a#6

Planning refs:

  • jinon86/openclaw-plugin-a2a/docs/migration-plan.md sections 1.1, 2.3, 3

Root Cause

The plugin runtime plan in jinon86/openclaw-plugin-a2a#8 assumes a supported way to fan cancel in both directions between broker tasks and OpenClaw session runs.

Parent blocker:

  • jinon86/openclaw-plugin-a2a#6

Planning refs:

  • jinon86/openclaw-plugin-a2a/docs/migration-plan.md sections 1.1, 2.3, 3

Fix Action

Fixed

PR fix notes

PR #68624: Gateway: add session-run cancel seam

Description (problem / solution / changelog)

Summary

  • add a plugin-neutral session-run cancel seam keyed by { kind: "session_run", sessionKey, runId }
  • wire gateway chat aborts into that seam in both directions so delegated-task runtimes can cancel owning runs and observe run abort fan-out
  • expose the seam through openclaw/plugin-sdk/session-run-cancel-runtime and add focused coverage

Testing

  • pnpm test src/sessions/session-run-cancel.test.ts src/gateway/chat-abort.test.ts src/plugin-sdk/session-run-cancel-runtime.test.ts
  • pnpm plugin-sdk:api:gen
  • pnpm build

Closes #68550

Changed files

  • docs/.generated/plugin-sdk-api-baseline.sha256 (modified, +2/-2)
  • package.json (modified, +4/-0)
  • scripts/lib/plugin-sdk-entrypoints.json (modified, +1/-0)
  • src/agents/openclaw-tools.sessions.test.ts (modified, +175/-0)
  • src/agents/tools/sessions-send-tool.ts (modified, +221/-15)
  • src/gateway/chat-abort.test.ts (modified, +99/-1)
  • src/gateway/chat-abort.ts (modified, +25/-0)
  • src/gateway/server-close.ts (modified, +2/-0)
  • src/gateway/server-runtime-handles.ts (modified, +2/-0)
  • src/gateway/server-startup-early.ts (modified, +17/-0)
  • src/gateway/server.impl.ts (modified, +2/-0)
  • src/plugin-sdk/core.ts (modified, +5/-0)
  • src/plugin-sdk/session-run-cancel-runtime.test.ts (added, +37/-0)
  • src/plugin-sdk/session-run-cancel-runtime.ts (added, +19/-0)
  • src/plugins/hook-types.ts (modified, +64/-0)
  • src/plugins/hooks.ts (modified, +23/-0)
  • src/sessions/session-run-cancel.test.ts (added, +145/-0)
  • src/sessions/session-run-cancel.ts (added, +145/-0)
RAW_BUFFERClick to expand / collapse

Owner

sogyo

Context

The plugin runtime plan in jinon86/openclaw-plugin-a2a#8 assumes a supported way to fan cancel in both directions between broker tasks and OpenClaw session runs.

Parent blocker:

  • jinon86/openclaw-plugin-a2a#6

Planning refs:

  • jinon86/openclaw-plugin-a2a/docs/migration-plan.md sections 1.1, 2.3, 3

Scope

  • expose a public seam for cancelling a session_run target from plugin-owned delegated-task code
  • preserve cancelTarget: { kind: "session_run", sessionKey, runId } semantics
  • support the reverse direction as well, so OpenClaw-side run cancel can still reach plugin-owned delegated-task cancellation
  • keep the seam reviewable and avoid new A2A-specific branching in unrelated core call sites

Done when

  • broker-initiated cancel can abort the owning OpenClaw run through a supported seam
  • OpenClaw-side cancel can still propagate back to plugin-owned delegated-task cancellation
  • tests cover both directions and the expected no-active-run / already-terminal behavior

Reporting

Use issue comments only for Start, Block, and Done. Open the PR directly once the scope is satisfied.

extent analysis

TL;DR

Exposing a public seam for cancelling a session_run target from plugin-owned delegated-task code is likely the key to resolving the issue.

Guidance

  • Review the migration-plan.md document, specifically sections 1.1, 2.3, and 3, to understand the required changes for the plugin runtime plan.
  • Identify the existing code paths for broker-initiated cancel and OpenClaw-side cancel to determine where the new seam needs to be exposed.
  • Consider adding tests to cover both directions of cancellation (broker-initiated and OpenClaw-side) to ensure the seam works as expected.
  • Ensure the new seam is reviewable and does not introduce new A2A-specific branching in unrelated core call sites.

Notes

The issue lacks specific technical details about the current implementation, so it's essential to review the referenced documentation and code to understand the requirements and constraints.

Recommendation

Apply workaround: Expose a public seam for cancelling a session_run target from plugin-owned delegated-task code, as this is the most direct approach to resolving the issue and meeting the scope requirements.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix [sogyo] Add a cancel fan-out seam between delegated tasks and session runs [1 pull requests, 5 comments, 2 participants]