Repository navigation
fix(agents): preserve channel silent-reply guidance - #138345
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 6, 2026, 3:44 PM ET / 19:44 UTC. ClawSweeper reviewWhat this changesPreserves channel-specific silent-reply guidance through embedded agent attempts, inlines the attempt-local tool observer, and adds Gateway coverage of provider instructions and reply delivery. Merge readiness✅ Ready for maintainer review This PR remains necessary: current main still drops the conversation-selected prompt mode. The focused repair matches the documented contract, prior findings are resolved, and no actionable correctness issue remains. Priority: P2 Review scores
Verification
How this fits togetherChannel conversations select reply guidance before launching an agent. The embedded dispatcher must carry that selection into the system prompt sent to the provider. flowchart LR
A[Channel message] --> B[Conversation reply policy]
B --> C[Embedded attempt dispatcher]
C --> D[System prompt builder]
D --> E[Provider request]
E --> F[Channel reply]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource 0, Tests +198. Total +198 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep conversation-owned reply guidance intact through every embedded attempt while retaining generic guidance for callers that select it. Do we have a high-confidence way to reproduce the issue? Yes, from source: direct-channel context selects none, current main drops that field, and the renderer restores generic silence guidance. This review did not execute the reproduction. Is this the best way to solve the issue? Yes. Forwarding the existing field repairs the missing boundary without duplicating policy, and Gateway coverage detects the omission that renderer-only tests cannot. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a860f648b669. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (9 earlier review cycles; latest 8 shown)
|
85c4568 to
068aeb6
Compare
Preserve the conversation-owned prompt mode across embedded attempts and replace the mocked prompt reconstruction with actual Gateway/provider coverage. Co-authored-by: Eppiedude <134296165+Eppiedude@users.noreply.github.com>
Resolve the dispatcher refactor while preserving the existing channel prompt-mode repair. The current composition passed the real Gateway flow, 176 sibling tests, and changed checks.
Recognize the exact Codex machine address in the existing native squash-credit classifier. Reviewed bodies retain eligible contributor credit without reintroducing machine attribution; default and explicit machine-message refusal stays intact. Validated six intended baseline failures followed by all 58 native attribution tests passing, exact retained #138345 preview composition, independent reviews, and required CI34057924168 on the prepared head.
|
Merged via squash.
|
…ig-ref * origin/main: (31 commits) docs(web): split the Control UI page into task pages (#140437) fix: tool_search rejects calls that send both query and queries (#140310) fix(update): preserve rollback and truthful serving reports (#140419) fix: restore context when CLI recovery starts a fresh session (#140294) refactor(tests): retain transport-driven auth dismissal coverage (#140430) fix: stop unfinished subagents before resetting a conversation (#140417) fix(models): cap configured output at the final context window (#140436) refactor(mcp): reuse transport config normalization (#140439) test(gateway): preserve saved config in auth reload fixture (#140433) fix(plugins): inherit active config for embedded agent runs (#140435) refactor(tui): remove test-only shutdown timer hooks (#140432) fix(agents): preserve channel silent-reply guidance (#138345) fix(tasks): cancel resumed yielded subagent tasks (#140410) refactor(doctor): share compaction config traversal (#140330) fix(doctor): restore LINE and Mattermost account promotion (#136045) docs: remove the empty release-sections nav group (#140427) fix(tooling): omit Codex machine squash credit (#140420) chore(ui): refresh control ui locales (#140384) refactor(plugin-sdk): reuse native approval input contracts (#140415) fix: silent model WebSocket streams hang past the idle timeout (#140335) ... # Conflicts: # docs/web/control-ui.md
Recognize the exact Codex machine address in the existing native squash-credit classifier. Reviewed bodies retain eligible contributor credit without reintroducing machine attribution; default and explicit machine-message refusal stays intact. Validated six intended baseline failures followed by all 58 native attribution tests passing, exact retained openclaw#138345 preview composition, independent reviews, and required CI34057924168 on the prepared head.
Preserve conversation-specific silent-reply guidance across embedded attempts instead of restoring the generic default. Keep the current dispatcher ownership and one observer per attempt; production LOC is neutral. Replace the mocked prompt reconstruction with a real isolated Gateway/provider regression. The current composition passes that flow, 176 sibling tests, changed checks, and exact-head CI. Proof uses a synthetic QA channel and mock provider; it is not live Discord evidence. Co-authored-by: Eppiedude <134296165+Eppiedude@users.noreply.github.com> Co-authored-by: OpenClaw Contributor <contributor@example.com> Co-authored-by: Peter Steinberger <steipete@gmail.com>
What Problem This Solves
Channel auto-replies could regain generic silent-reply instructions after the conversation context had already disabled them. The embedded attempt dropped the selected prompt mode, so the prompt builder restored its generic default. This contradicted the existing direct-chat reply contract, including Discord DMs.
Why This Change Was Made
Embedded attempts now preserve the prompt mode chosen by the conversation owner, matching the CLI path. The final diff also removes an unnecessary observer temporary without changing its attempt-local state. Production changes are +2/-2 lines.
The mocked-runner test and manually reconstructed prompt are replaced by a real isolated Gateway regression that captures the instructions sent to the provider and checks normal reply delivery. The documented prompt policy remains unchanged.
User Impact
Channel conversations retain their selected reply guidance throughout an embedded attempt. Direct auto-replies no longer receive the generic Silent Replies section when their conversation context already owns the reply contract. Generic callers and message-tool-only behavior remain unchanged.
Thanks @Eppiedude for identifying and fixing the missing forwarding field.
Evidence
96bf3652adabc25d86af15a950a72be63575acc5, the real Gateway flow passes with one successful provider request, one normal reply, no generic Silent Replies section, and Tooling/Safety intact. All 176 current renderer, CLI-prompt, tool-observer and error-state tests pass, as do the changed checks. Final production/test hashes and unchanged owner-source hashes were verified after all checks.Exact-head required CI passed on
bdc1b8c3de153097f820d73fd2bd85d3a2dbaddain CI attempt 2. One dependency-install job was retried after a Matrix binary download connection reset; the retry and aggregate gate passed. No package changes were made. A separate read-only review of this published head also found no P0–P2 issues.