Repository navigation
fix: keep subagent reports out of operator CLI messaging - #150520
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 16, 2026, 11:31 PM ET / September 17, 2026, 03:31 UTC (Revision 3). ClawSweeper reviewWhat this changesThe PR carries subagent context into shell commands, rejects their CLI session messaging, and updates prompts, documentation, and regression coverage to keep worker reports on the task completion path. Merge readiness✅ Ready for maintainer review This remains a useful fix for the linked issue: current main lacks the child-CLI guard. No blocking correctness or security findings were identified, and the maintainer-authored PR should remain open for normal landing. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw subagents execute delegated tasks and return results to their parent. The exec environment and CLI dispatch layer determine whether shell-launched messages can enter another session as ordinary operator input. flowchart TD
A[Stored child session context] --> B[Exec environment]
B --> C[Shell launches CLI]
C --> D{Child session messaging?}
D -->|Yes| E[Reject with completion guidance]
D -->|No| F[Existing Gateway transport]
E --> G[Child completes task for parent]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +48, Tests +282, Docs +3. Total +333 across 22 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep child reports on the existing completion path while preserving operator CLI messaging, read-only child commands, and normal authentication. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main forwards child-launched session messaging through ordinary CLI transport without the proposed guard. The report supplies the concrete command path; this review did not execute it. Is this the best way to solve the issue? Yes. The patch reuses existing session-depth and completion owners, places rejection before CLI transport, and preserves operator and read-only paths without introducing a parallel messaging implementation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9a4468148bc0. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
3f3440a to
1408a38
Compare
|
Merged via squash.
|
…0520) * fix: keep subagent reports out of operator CLI messaging * test: repair subagent CLI integration coverage
Closes #150487
What Problem This Solves
Fixes subagents using shell-launched CLI session messages when their messaging tools are intentionally unavailable, causing worker reports to appear as ordinary user input.
User Impact
Hidden and visible workers keep results on their accepted task completion path, including later turns. Ordinary operator CLI messaging and read-only child CLI commands continue to work. This prevents accidental misrouting; it does not turn an unrestricted shell into an authorization boundary.
Why This Change Was Made
The runtime carries child execution context into Gateway and node subprocesses, and the CLI rejects session send/steer calls before transport. Full and minimal prompts now explain that missing tools are not a CLI fallback, and parents own coordination between workers. Existing messaging rules and tests move into focused siblings without changing budgets or introducing a new configuration option.
Evidence
openai/gpt-5.6-sol) with an isolated Gateway: hidden and visible children each attempted the candidate CLI on their initial and later turns. All four attempts returned the task-completion rejection and left the target transcript unchanged. Both ordinary operator CLI controls succeeded, and each initial child result reached its parent once.Peer reply-loop and chat-visibility fixes are tracked separately in #150488.