Skip to content

fix(agents): tailor private completion guidance to requester routes - #182124

Merged
steipete merged 1 commit into
mainfrom
steipete/channelless-wake-hint
Oct 24, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/channelless-wake-hint

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Private completion wakes (announce and requester-settle) always told the requester: "If the original request requires a user-facing update, send it through an available, permitted messaging tool; do not rely on your final reply for delivery." A requester with no conversation target, such as a parent started with openclaw agent (Gateway agent RPC), then called message(action=send) and got "Action send requires a target. This turn has no current conversation". In live fleets that was one wasted tool call per fleet; parents reported "an earlier report-send attempt failed because no conversation target".

User Impact

Channel-less requesters record private completion outcomes in their session without attempting a target-less message send. Channel and WebChat guidance is unchanged. No migration or user action is required.

Why This Change Was Made

Root cause

src/agents/subagents/completion/subagent-completion-instructions.ts exported one unconditional instruction string, used by both announce and settle wake producers without considering the requester's delivery route.

Fix

buildSubagentPrivateCompletionInstruction(requesterOrigin) keeps the messaging sentence only when the requester has a deliverable target: WebChat, or a target the message tool would resolve implicitly. It reuses resolveImplicitMessageActionTarget, the message tool's own predicate. Channel-less requesters are told their final reply is recorded in the session and no messaging send is needed. Both producers pass the requester origin. Channel and WebChat wording is unchanged. This is wake input text (per-turn), not system prompt; docs/tools/subagents/announce.md documents it.

Evidence

  • Regressions, red on base and green twice: subagent-announce.test.ts (base: 2 failed / 15) and subagent-announce.requester-settle-wake.private.test.ts (base: 4 failed / 7), asserting a channel-less requester gets no messaging-tool instruction and a channel requester keeps it. embedded-agent-runner.prompt-cache.test.ts and agent-tools.prefix-stability.test.ts pass, and pnpm prompt:snapshots:gen shows no diff.
  • Live on a Crabbox AWS host, in a build combining this with three sibling fixes: channel-less fleet parents made 0 failed target-less sends across 8 fleets. The prior campaign observed such failed sends in about half of restarted channel-less parents. After fix(gateway): keep channel-less agent turns channel-less after restart recovery #181420, which stopped advertising "send to this conversation", the main baseline in this run also had 0, so the regression tests are the targeted proof.

Reuse the message tool implicit-target check for private announce and settle wakes. Channel-less requesters record the reviewed outcome in their session without a messaging send; channel and WebChat guidance stays unchanged.

Cover both wake producers, migrate the prompt-cache fixture, and document channel-less private completion. Focused regressions fail on the base and pass twice with the fix; prompt-cache and prefix-stability checks, targeted typechecks, lint, format, and snapshot generation pass.
@clawsweeper

clawsweeper Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review October 24, 2026 02:47
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T02:49:06.825592Z 8e63d2b Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation agents Agent runtime and tooling size: S labels Oct 24, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 24, 2026
@steipete
steipete merged commit c891026 into main Oct 24, 2026
202 of 205 checks passed
@steipete
steipete deleted the steipete/channelless-wake-hint branch October 24, 2026 03:02
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@clawsweeper

clawsweeper Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR tailors private subagent completion guidance to whether the requester has a conversation target.

Example: A parent started with openclaw agent receives a private child result without a channel or destination.

  • Before: The wake instructs it to use a messaging tool for an owed update, which can produce “Action send requires a target.”
  • After: The wake tells it to record the reviewed outcome in its session without a messaging send.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, correct patch with relevant producer coverage and green gates; isolated real-model evidence remains limited.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the contributor proof gate; inspected tests exercise both production wake producers with mocked delivery, while the reported combined real-model campaign does not independently isolate this guidance change.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Channel-less parents can attempt an impossible message send after a private child completion.
Reason: The maintainer-authored direction corrects inaccurate capability guidance with a small shared change and no new configuration or permission.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it is a focused, maintainer-authored correction to guidance that remains unconditional on current main, with no introduced correctness or security defect found.

Priority: P2
Reviewed head: 8e63d2bd69189f7b675588de40619be5279b6451

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The reported combined live campaign does not isolate the changed wake guidance, since the current-main baseline also produced zero failed sends.
Agent review details

How this fits together

Subagent announce and batch-settle producers combine child results with requester routing context to create per-turn instructions for the resumed parent.

flowchart TD
  A[Completed child result] --> B[Announce or batch settle]
  C[Requester delivery context] --> B
  B --> D[Shared completion guidance]
  E[Existing implicit target resolver] --> D
  D --> F[Parent continuation]
  F --> G[Session result or permitted message]
Loading

Technical review

Best possible solution:

Use the existing target resolver in the shared completion-instruction owner and pass requester routing from both wake producers.

Do we have a high-confidence way to reproduce the issue?

Current main unconditionally asks private requesters to use messaging tools, while the message-tool target resolver rejects absent destinations and session keys; source inspection establishes the misleading guidance without guaranteeing model compliance.

Is this the best way to solve the issue?

The patch is the smallest complete correction: it changes the shared instruction owner, migrates both producers, and retains channel, WebChat, follow-through, and private-delivery contracts.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 75deca89d9a5.

Provenance checked

  • Private completion guidance changes intended behavior with a stated reason (61c2ecc: Unify individual and batch instructions so private processing does not abandon owed user-facing updates.)
  • Meaningful private outcomes keeps the original intent (4f0541e: Require private continuations to record meaningful reviewed outcomes instead of silently stopping.)
  • Shared batch follow-through policy keeps the original intent (aac3e8a: Keep requester-settle instructions aligned with the canonical completion-outcome policy.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source +22, Tests +58, Docs +2. Total +82 across 8 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 4 27 5 +22
Tests 3 61 3 +58
Docs 1 3 1 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 8 91 9 +82

Labels

Label changes:

  • add P2: Misleading private completion guidance can cause avoidable failed messaging calls in channel-less agent workflows.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Misleading private completion guidance can cause avoidable failed messaging calls in channel-less agent workflows.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Capture a redacted real-agent trace showing the route-specific private wake and its resulting session outcome.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 23, 2026, 11:01 PM ET / October 24, 2026, 03:01 UTC.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 24, 2026
…penclaw#182124)

Reuse the message tool implicit-target check for private announce and settle wakes. Channel-less requesters record the reviewed outcome in their session without a messaging send; channel and WebChat guidance stays unchanged.

Cover both wake producers, migrate the prompt-cache fixture, and document channel-less private completion. Focused regressions fail on the base and pass twice with the fix; prompt-cache and prefix-stability checks, targeted typechecks, lint, format, and snapshot generation pass.
scribe-dandelion-cult added a commit to karmaterminal/openclaw that referenced this pull request Oct 25, 2026
Absorb openclaw/openclaw main at 9629838
(967 commits past 7ab6453) into P ea81534. 39 textual conflicts,
resolved upstream-first; every ours/combined resolution keeps a continuation
or carried-fleet symbol and is listed with its reason in the lane's
table.tsv / RESOLUTION.md.

Schema: upstream took agent schema 32-34 (PostgreSQL-only vector decoder,
binary vector projection, index ordering; SQLite advances metadata only) and
state 32. The continuation recipient-authority step moves from 32 to 35,
above upstream's steps; on SQLite a P-era 32 database is upstream's 32 plus
the authority table, which the idempotent step admits.

Ports into upstream's new owners:
- agent-runner-result-complete.ts deleted upstream (openclaw#181917, inlined into
  agent-runner-result.ts); the continuation delta moves onto the inlined block.
- subagent registry activation returns AgentRecoveryProgress (openclaw#181428); the
  continuation activation latch follows progress.settled.
- announce reply-instruction / params moved by the fork receive upstream's
  requesterOrigin (openclaw#182124) and onAccepted (openclaw#182285).
- diagnostic trace context moved to the shared AsyncContext carrier (openclaw#181780);
  the fork's test reset clears only its own field.

Generated files regenerated with their generators (postgres schema, config
doc baseline).

Refs karmaterminal/openclaw-bootstrap#1727

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant