Skip to content

fix(agents): skip sessions_send A2A flow for parent-owned ACP children - #69817

Merged
steipete merged 3 commits into
openclaw:mainfrom
scotthuang:fix/sessions-send-skip-a2a-for-acp-children
Apr 21, 2026
Merged

steipete merged 3 commits into
openclaw:mainfrom
scotthuang:fix/sessions-send-skip-a2a-for-acp-children

Conversation

@scotthuang

Copy link
Copy Markdown
Contributor

Summary

  • Problem: sessions_send to a parent-owned background ACP child enters an A2A ping-pong: the child's reply is forwarded to the parent as a user message, the parent replies, that reply is forwarded back to the child, repeat. The loop is bounded by maxPingPongTurns (defaults to 5), so it always terminates — but from the user's point of view the conversation keeps producing turns on its own for several rounds before stopping.
  • Why it matters: The child has no sessions_send tool but effectively gets one via A2A echo — an implicit capability leak. It also pollutes the parent's context and wastes turns/tokens. Results already reach the parent via [Internal task completion event].
  • UX impact: Even though the maxPingPongTurns guardrail prevents a truly infinite loop, the user-visible behavior is that the chat keeps auto-replying to itself without any user input. To anyone not familiar with the A2A internals this looks like a runaway agent that "won't stop talking" — a bug-class experience, not a graceful bounded handshake.
  • What changed: In sessions-send-tool.ts, detect parent-owned background ACP targets via isParentOwnedBackgroundAcpSession and skip startA2AFlow.
  • Scope of the skip: strictly ACP sessions spawned with mode=run (oneshot background children spawned by the current parent). mode=session (persistent) ACP targets, externally-opened ACP sessions that are not parent-owned, non-ACP peer targets, and any other sessions_send path are not touched.
  • What did NOT change: Completion announcement path; A2A flow for all other targets (including mode=session ACP sessions and peer agents); ACP protocol, session binding, inline delivery.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

Root Cause (if applicable)

  • Root cause: runSessionsSendA2AFlow treats the target as a peer and echoes replies in both directions for up to maxPingPongTurns. For parent-owned background ACP children, this path coexists with [Internal task completion event], so the parent is both notified and fed the child's reply as a user message — creating the loop.
  • Missing guardrail: No check on target session type before entering A2A flow.
  • Context: A2A was designed for same-tier peer conversations; ACP spawn is a parent/child hierarchy where the child is a task executor, not a peer.

Regression Test Plan (if applicable)

  • Coverage level: Seam / integration test
  • Target: src/agents/tools/sessions-send-tool.a2a.test.ts
  • Scenario: startA2AFlow is skipped when the target entry is a parent-owned background ACP session (spawned with mode=run); still runs for mode=session ACP targets and peer targets.
  • Why smallest: Pure control-flow decision at the tool entry — a parameterized test on target entry kind is enough; no full ACP spawn needed.
  • Existing coverage: None (existing A2A tests cover peer scenarios only).
  • If not added: Deferred to keep the fix PR minimal; follow-up recommended.

User-visible / Behavior Changes

Background ACP children spawned with mode=run by the current requester no longer participate in A2A ping-pong. Their results still reach the parent via [Internal task completion event]. mode=session (persistent) ACP targets and all other sessions_send targets are unchanged.

Diagram (if applicable)

Before (ACP child target):
  parent --sessions_send--> child
     ^                        |
     |                   child replies
     |                        |
     +---- A2A forwards reply as user message to parent
     |
     v
  parent responds
     |
     +---- A2A forwards response as user message to child
  ...loop continues until maxPingPongTurns (default 5) caps it...

After:
  parent --sessions_send--> child --replies--> [Internal task completion event] --> parent
  (A2A flow is skipped; nothing is echoed back to the child)

Security Impact (required)

  • New permissions/capabilities? No — actually removes an unintended implicit capability (ACP child gaining de-facto sessions_send via A2A echo).
  • Secrets/tokens handling changed? No
  • New/changed network calls? No
  • Command/tool execution surface changed? No
  • Data access scope changed? No
  • Risk + mitigation: closes an implicit privilege escalation for ACP children; legitimate peer A2A is unaffected because the check is strictly a target-type filter.

Repro + Verification

Environment

  • OS: macOS (darwin)
  • Runtime: Node 22+, local pnpm openclaw gateway
  • Model/provider: Claude via ACP (claude-cli)
  • Channel: openclaw-control-ui (webchat)
  • Config: default

Steps

  1. Start main agent (agent:main:main) in webchat.
  2. Main agent spawns a background ACP child (mode=run, Claude) via sessions_spawn.
  3. Main agent calls sessions_send to that child with a short greeting.

Expected

  • One [Internal task completion event] reaches the parent.
  • Child's raw reply is not rendered into the main conversation.
  • No further turns triggered by the child's reply.

Actual

  • Before fix: child's reply enters the main conversation as a user message, main agent replies, reply is forwarded to the child, the child replies again — repeated turns observed.
  • After fix: exactly one completion event; no further main-session turn; no ping-pong.

Evidence

  • Screenshots (before / after)

Same repro in both runs, captured from the webchat UI against a local pnpm openclaw gateway (v2026.4.20):

  1. Main agent spawns a background ACP Claude child via sessions_spawn.
  2. Main agent calls sessions_send to that child with a short greeting.
  3. Observe the main conversation for subsequent turns.

Before fix — A2A ping-pong

主session-ping-pong1

What the screenshot shows:

  • After sessions_send, the ACP child's raw reply appears in the main conversation as a new user message (A2A echo).
  • The main agent responds to that echoed message, which is then forwarded back to the child, producing another child turn.
  • Multiple back-and-forth turns are visible after a single sessions_send call — the ping-pong loop. The loop eventually stops on its own because maxPingPongTurns caps it, but during those intermediate turns the UI looks like an agent that has gone runaway: messages keep appearing without any user input, and there is no signal to the user that a bounded guardrail will eventually end it.

After fix — single completion event, no loop

after

What the screenshot shows:

  • sessions_send resolves with exactly one [Internal task completion event] reaching the main agent.
  • The child's raw reply does not appear as a user message in the main conversation.
  • No additional main-session turn is triggered; no further child turn is observed — the loop is gone.

Net effect: the only path by which the child's result reaches the parent is the existing completion-announcement channel, matching the "After" branch of the diagram above.

Human Verification (required)

  • Verified: main (agent:main:main) → ACP Claude child via sessions_send; single completion event; no ping-pong; no echo back to child. Repeated sends behave consistently.
  • Not verified: non-ACP peer A2A (cross-channel human bridging) — reasoned about by code only. Remote/production environments — local verification only.

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? Yes
  • Config/env changes? No
  • Migration needed? No

Risks and Mitigations

  • Risk: a valid non-loop A2A scenario targeting a parent-owned background ACP session is unintentionally suppressed.
    • Mitigation: isParentOwnedBackgroundAcpSession matches only acp.mode === "oneshot" sessions with spawnedBy/parentSessionKey set — exactly the subset that uses the announcement path for result delivery. Persistent (acp.mode === "persistent") sessions and ACP sessions that are not owned by the current parent are not matched.
  • Risk: callers that relied on the child's reply appearing inline in the parent conversation lose that behavior.
    • Mitigation: that inline echo was the source of the bug (implicit capability leak). The official channel remains the completion announcement, which already contains the child's result wrapped as untrusted content.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS labels Apr 21, 2026
@greptile-apps

greptile-apps Bot commented Apr 21, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds a targeted guard in sessions-send-tool.ts to skip startA2AFlow when the target is a parent-owned background ACP session (acp.mode === "oneshot" with spawnedBy/parentSessionKey set), eliminating the A2A ping-pong loop that was causing repeated unsolicited turns in the parent session. The fix is narrowly scoped: mode=session ACP targets, externally-opened ACP sessions, and non-ACP peer targets are untouched.

Confidence Score: 5/5

Safe to merge; only remaining finding is a P2 metadata inaccuracy that does not affect correctness.

The fix is well-reasoned, narrowly scoped to the problematic target type, and has no effect on any other sessions_send path. The only open issue is that delivery.status remains pending in the synchronous-reply path even when A2A is skipped — a cosmetic inaccuracy that does not cause data loss or behavioral regression.

No files require special attention.

Comments Outside Diff (1)

  1. src/agents/tools/sessions-send-tool.ts, line 381-387 (link)

    P2 Misleading delivery metadata when A2A flow is skipped

    When skipA2AFlow is true and timeoutSeconds > 0, the function already has the child's reply in hand and returns it in the reply field — but still emits delivery: { status: "pending", mode: "announce" }. No A2A announcement will ever fire, so "pending" is inaccurate. The parent LLM may interpret this as a second result incoming via the announce channel, leading to unnecessary waiting or confusion.

    Consider updating delivery.status to a non-pending value (e.g. "delivered") when the A2A flow is skipped and the reply is being returned inline.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: src/agents/tools/sessions-send-tool.ts
    Line: 381-387
    
    Comment:
    **Misleading `delivery` metadata when A2A flow is skipped**
    
    When `skipA2AFlow` is `true` and `timeoutSeconds > 0`, the function already has the child's reply in hand and returns it in the `reply` field — but still emits `delivery: { status: "pending", mode: "announce" }`. No A2A announcement will ever fire, so "pending" is inaccurate. The parent LLM may interpret this as a second result incoming via the announce channel, leading to unnecessary waiting or confusion.
    
    Consider updating `delivery.status` to a non-pending value (e.g. `"delivered"`) when the A2A flow is skipped and the reply is being returned inline.
    
    How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
This is a comment left during a code review.
Path: src/agents/tools/sessions-send-tool.ts
Line: 381-387

Comment:
**Misleading `delivery` metadata when A2A flow is skipped**

When `skipA2AFlow` is `true` and `timeoutSeconds > 0`, the function already has the child's reply in hand and returns it in the `reply` field — but still emits `delivery: { status: "pending", mode: "announce" }`. No A2A announcement will ever fire, so "pending" is inaccurate. The parent LLM may interpret this as a second result incoming via the announce channel, leading to unnecessary waiting or confusion.

Consider updating `delivery.status` to a non-pending value (e.g. `"delivered"`) when the A2A flow is skipped and the reply is being returned inline.

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "fix(agents): skip sessions_send A2A flow..." | Re-trigger Greptile

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 17fcc98479

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/agents/tools/sessions-send-tool.ts Resolved
@scotthuang

Copy link
Copy Markdown
Contributor Author

Re: the P2 finding on misleading delivery metadata — fixed in f632afb477. When the A2A flow is skipped, the result now returns delivery: { status: "skipped", mode: "announce" } instead of "pending", so the parent LLM does not wait for a second result that will never arrive.

(Same commit also addresses the Codex reviewer-ownership gate — the skip now requires the caller to be the parent of the target, not just that the target is a parent-owned oneshot ACP session.)

scotthuang and others added 3 commits April 21, 2026 22:00
The A2A ping-pong + announce flow in runSessionsSendA2AFlow treats the
send target as a peer agent and echoes replies back and forth between
requester and target. When the target is an ACP child spawned by the
requester, this creates an infinite loop: the parent is woken with the
child's reply, generates a user-facing response, and has that response
forwarded back to the child as a new user message — effectively granting
the child an implicit sessions_send capability back to the parent.

ACP children already report their results through the
[Internal task completion event] announcement path, so no A2A flow is
needed when the send target is a parent-owned background ACP session.

Detect this case via isParentOwnedBackgroundAcpSession and short-circuit
startA2AFlow before runSessionsSendA2AFlow is invoked.
Greptile/Codex review follow-ups on openclaw#69817:

- Narrow skipA2AFlow from target-only detection to a combined check that
  the caller is the parent of the target (new
  isRequesterParentOfBackgroundAcpSession helper). Under
  tools.sessions.visibility=all a non-parent sender can see the same
  oneshot ACP session; the previous guard would have suppressed their
  only follow-up delivery path. With requester ownership required, those
  senders continue through the normal A2A flow.
- When the A2A flow is skipped, return delivery.status="skipped" instead
  of "pending" so the parent LLM does not wait for a second result that
  will never arrive.
- Add unit tests for resolveAcpSessionInteractionMode and
  isRequesterParentOfBackgroundAcpSession covering both the new
  ownership gate and the existing target-type branches.
@steipete
steipete force-pushed the fix/sessions-send-skip-a2a-for-acp-children branch from f632afb to 6ee0182 Compare April 21, 2026 21:11
@steipete
steipete merged commit ae4c5cd into openclaw:main Apr 21, 2026
92 checks passed
steipete pushed a commit that referenced this pull request Apr 21, 2026
Greptile/Codex review follow-ups on #69817:

- Narrow skipA2AFlow from target-only detection to a combined check that
  the caller is the parent of the target (new
  isRequesterParentOfBackgroundAcpSession helper). Under
  tools.sessions.visibility=all a non-parent sender can see the same
  oneshot ACP session; the previous guard would have suppressed their
  only follow-up delivery path. With requester ownership required, those
  senders continue through the normal A2A flow.
- When the A2A flow is skipped, return delivery.status="skipped" instead
  of "pending" so the parent LLM does not wait for a second result that
  will never arrive.
- Add unit tests for resolveAcpSessionInteractionMode and
  isRequesterParentOfBackgroundAcpSession covering both the new
  ownership gate and the existing target-type branches.
@steipete

Copy link
Copy Markdown
Contributor

Landed via rebase onto main.

Verification:

  • Local gate: fnm exec --using v22.21.1 pnpm check && fnm exec --using v22.21.1 pnpm build && fnm exec --using v22.21.1 pnpm test
  • Docker live verify: openclaw-pr69817-live build-stage image + mounted targeted live harness; passed parent-owned ACP child sessions_send skip and non-parent visible sender A2A fallback coverage.
  • GitHub checks: green after push.

Landed commits:

Thanks @scotthuang!

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6ee01821dd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +308 to +311
const targetSessionEntry = loadSessionEntryByKey(resolvedKey);
const skipA2AFlow = isRequesterParentOfBackgroundAcpSession(
targetSessionEntry,
effectiveRequesterKey,

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.

P2 Badge Use tool config when loading target session metadata

This ownership gate now calls loadSessionEntryByKey(resolvedKey), but that helper reads from global loadConfig() (src/agents/subagent-announce-delivery.ts:317-322) instead of the cfg already resolved for this sessions_send invocation. In environments that inject a non-default config/session store (for example tests, embedded runs, or custom store paths), this can read the wrong session store and misclassify ACP parent ownership, causing the A2A skip decision to flip unexpectedly (re-enabling ping-pong or reporting incorrect delivery behavior). The session-entry lookup here should be wired to the same config/store context used by the rest of the tool.

Useful? React with 👍 / 👎.

amittell pushed a commit to amittell/openclaw that referenced this pull request Apr 23, 2026
Greptile/Codex review follow-ups on openclaw#69817:

- Narrow skipA2AFlow from target-only detection to a combined check that
  the caller is the parent of the target (new
  isRequesterParentOfBackgroundAcpSession helper). Under
  tools.sessions.visibility=all a non-parent sender can see the same
  oneshot ACP session; the previous guard would have suppressed their
  only follow-up delivery path. With requester ownership required, those
  senders continue through the normal A2A flow.
- When the A2A flow is skipped, return delivery.status="skipped" instead
  of "pending" so the parent LLM does not wait for a second result that
  will never arrive.
- Add unit tests for resolveAcpSessionInteractionMode and
  isRequesterParentOfBackgroundAcpSession covering both the new
  ownership gate and the existing target-type branches.

(cherry picked from commit 8a7c214)
medikoo pushed a commit to medikoo/openclaw that referenced this pull request Apr 24, 2026
Greptile/Codex review follow-ups on openclaw#69817:

- Narrow skipA2AFlow from target-only detection to a combined check that
  the caller is the parent of the target (new
  isRequesterParentOfBackgroundAcpSession helper). Under
  tools.sessions.visibility=all a non-parent sender can see the same
  oneshot ACP session; the previous guard would have suppressed their
  only follow-up delivery path. With requester ownership required, those
  senders continue through the normal A2A flow.
- When the A2A flow is skipped, return delivery.status="skipped" instead
  of "pending" so the parent LLM does not wait for a second result that
  will never arrive.
- Add unit tests for resolveAcpSessionInteractionMode and
  isRequesterParentOfBackgroundAcpSession covering both the new
  ownership gate and the existing target-type branches.
medikoo pushed a commit to medikoo/openclaw that referenced this pull request Apr 24, 2026
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
Greptile/Codex review follow-ups on openclaw#69817:

- Narrow skipA2AFlow from target-only detection to a combined check that
  the caller is the parent of the target (new
  isRequesterParentOfBackgroundAcpSession helper). Under
  tools.sessions.visibility=all a non-parent sender can see the same
  oneshot ACP session; the previous guard would have suppressed their
  only follow-up delivery path. With requester ownership required, those
  senders continue through the normal A2A flow.
- When the A2A flow is skipped, return delivery.status="skipped" instead
  of "pending" so the parent LLM does not wait for a second result that
  will never arrive.
- Add unit tests for resolveAcpSessionInteractionMode and
  isRequesterParentOfBackgroundAcpSession covering both the new
  ownership gate and the existing target-type branches.
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
zhonghe0615 pushed a commit to zhonghe0615/openclaw that referenced this pull request May 7, 2026
Greptile/Codex review follow-ups on openclaw#69817:

- Narrow skipA2AFlow from target-only detection to a combined check that
  the caller is the parent of the target (new
  isRequesterParentOfBackgroundAcpSession helper). Under
  tools.sessions.visibility=all a non-parent sender can see the same
  oneshot ACP session; the previous guard would have suppressed their
  only follow-up delivery path. With requester ownership required, those
  senders continue through the normal A2A flow.
- When the A2A flow is skipped, return delivery.status="skipped" instead
  of "pending" so the parent LLM does not wait for a second result that
  will never arrive.
- Add unit tests for resolveAcpSessionInteractionMode and
  isRequesterParentOfBackgroundAcpSession covering both the new
  ownership gate and the existing target-type branches.
zhonghe0615 pushed a commit to zhonghe0615/openclaw that referenced this pull request May 7, 2026
globalcaos pushed a commit to globalcaos/tinkerclaw that referenced this pull request May 13, 2026
Greptile/Codex review follow-ups on openclaw#69817:

- Narrow skipA2AFlow from target-only detection to a combined check that
  the caller is the parent of the target (new
  isRequesterParentOfBackgroundAcpSession helper). Under
  tools.sessions.visibility=all a non-parent sender can see the same
  oneshot ACP session; the previous guard would have suppressed their
  only follow-up delivery path. With requester ownership required, those
  senders continue through the normal A2A flow.
- When the A2A flow is skipped, return delivery.status="skipped" instead
  of "pending" so the parent LLM does not wait for a second result that
  will never arrive.
- Add unit tests for resolveAcpSessionInteractionMode and
  isRequesterParentOfBackgroundAcpSession covering both the new
  ownership gate and the existing target-type branches.
globalcaos pushed a commit to globalcaos/tinkerclaw that referenced this pull request May 13, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
Greptile/Codex review follow-ups on openclaw#69817:

- Narrow skipA2AFlow from target-only detection to a combined check that
  the caller is the parent of the target (new
  isRequesterParentOfBackgroundAcpSession helper). Under
  tools.sessions.visibility=all a non-parent sender can see the same
  oneshot ACP session; the previous guard would have suppressed their
  only follow-up delivery path. With requester ownership required, those
  senders continue through the normal A2A flow.
- When the A2A flow is skipped, return delivery.status="skipped" instead
  of "pending" so the parent LLM does not wait for a second result that
  will never arrive.
- Add unit tests for resolveAcpSessionInteractionMode and
  isRequesterParentOfBackgroundAcpSession covering both the new
  ownership gate and the existing target-type branches.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
Greptile/Codex review follow-ups on openclaw#69817:

- Narrow skipA2AFlow from target-only detection to a combined check that
  the caller is the parent of the target (new
  isRequesterParentOfBackgroundAcpSession helper). Under
  tools.sessions.visibility=all a non-parent sender can see the same
  oneshot ACP session; the previous guard would have suppressed their
  only follow-up delivery path. With requester ownership required, those
  senders continue through the normal A2A flow.
- When the A2A flow is skipped, return delivery.status="skipped" instead
  of "pending" so the parent LLM does not wait for a second result that
  will never arrive.
- Add unit tests for resolveAcpSessionInteractionMode and
  isRequesterParentOfBackgroundAcpSession covering both the new
  ownership gate and the existing target-type branches.
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
sablehead pushed a commit to sablehead/openclaw that referenced this pull request Jun 10, 2026
Greptile/Codex review follow-ups on openclaw#69817:

- Narrow skipA2AFlow from target-only detection to a combined check that
  the caller is the parent of the target (new
  isRequesterParentOfBackgroundAcpSession helper). Under
  tools.sessions.visibility=all a non-parent sender can see the same
  oneshot ACP session; the previous guard would have suppressed their
  only follow-up delivery path. With requester ownership required, those
  senders continue through the normal A2A flow.
- When the A2A flow is skipped, return delivery.status="skipped" instead
  of "pending" so the parent LLM does not wait for a second result that
  will never arrive.
- Add unit tests for resolveAcpSessionInteractionMode and
  isRequesterParentOfBackgroundAcpSession covering both the new
  ownership gate and the existing target-type branches.
sablehead pushed a commit to sablehead/openclaw that referenced this pull request Jun 10, 2026
vixco pushed a commit to vixco/openclaw that referenced this pull request Aug 16, 2026
Greptile/Codex review follow-ups on openclaw#69817:

- Narrow skipA2AFlow from target-only detection to a combined check that
  the caller is the parent of the target (new
  isRequesterParentOfBackgroundAcpSession helper). Under
  tools.sessions.visibility=all a non-parent sender can see the same
  oneshot ACP session; the previous guard would have suppressed their
  only follow-up delivery path. With requester ownership required, those
  senders continue through the normal A2A flow.
- When the A2A flow is skipped, return delivery.status="skipped" instead
  of "pending" so the parent LLM does not wait for a second result that
  will never arrive.
- Add unit tests for resolveAcpSessionInteractionMode and
  isRequesterParentOfBackgroundAcpSession covering both the new
  ownership gate and the existing target-type branches.
vixco pushed a commit to vixco/openclaw that referenced this pull request Aug 16, 2026
Heetisk pushed a commit to Heetisk/openclaw that referenced this pull request Sep 28, 2026
Greptile/Codex review follow-ups on openclaw#69817:

- Narrow skipA2AFlow from target-only detection to a combined check that
  the caller is the parent of the target (new
  isRequesterParentOfBackgroundAcpSession helper). Under
  tools.sessions.visibility=all a non-parent sender can see the same
  oneshot ACP session; the previous guard would have suppressed their
  only follow-up delivery path. With requester ownership required, those
  senders continue through the normal A2A flow.
- When the A2A flow is skipped, return delivery.status="skipped" instead
  of "pending" so the parent LLM does not wait for a second result that
  will never arrive.
- Add unit tests for resolveAcpSessionInteractionMode and
  isRequesterParentOfBackgroundAcpSession covering both the new
  ownership gate and the existing target-type branches.
Heetisk pushed a commit to Heetisk/openclaw that referenced this pull request Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants