Repository navigation
fix(auto-reply): deliver embedded fallback replies after CLI failures - #121897
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 11, 2026, 5:50 AM ET / 09:50 UTC. ClawSweeper reviewWhat this changesThis PR updates auto-reply fallback handling so an embedded fallback uses its final prepared harness’s delivery mode and can send a successful direct-chat reply to the originating channel. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep open for maintainer review. The supplied branch addresses the prior plugin-finalization leak finding and targets a source-proven silent fallback-delivery regression, but its runtime-selected delivery change still needs exact-head validation and a maintainer decision on delivery/privacy risk. Priority: P1 Review scores
Verification
How this fits togetherAuto-reply receives a channel message, chooses source-delivery policy, and may run multiple provider or harness fallback candidates before dispatching the final payload. This change lets the selected embedded harness update automatic-versus-message-tool delivery only when that default is runtime-derived. flowchart LR
A[Inbound direct chat] --> B[Initial source delivery policy]
B --> C[Primary CLI attempt]
C --> D[Embedded fallback candidate]
D --> E[Prepared harness delivery default]
E --> F[Final reply payload]
F --> G[Originating channel delivery]
Decision needed
Why: The code intentionally changes whether a successful fallback is sent to users, while preserving private and message-tool-only behavior; that tradeoff needs maintainer acceptance. Before merge
Agent review detailsSecurityNone. PR surfaceSource +284, Tests +613. Total +897 across 22 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Mantis proof suggestionA redacted Telegram direct-message transcript would directly prove the user-visible fallback delivery this PR changes. A maintainer can ask Mantis to capture proof by posting this exact PR comment: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one private runtime owner for only runtime-derived defaults, retain the shared plugin-handoff projection, and land only after exact-head direct-fallback and message-tool/privacy behavior are demonstrated. Do we have a high-confidence way to reproduce the issue? Yes—source inspection shows that delivery mode is captured before fallback harness selection, matching the linked issue’s CLI-failure-to-embedded-fallback path; this read-only review did not execute it. Is this the best way to solve the issue? Yes, conditionally: resolving only runtime-derived defaults at prepared-harness ownership is cleaner than changing stable session policy, provided the private controller remains excluded from every plugin handoff. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 38fabc4e0310. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
18b185e to
d540999
Compare
Closes #121605
What Problem This Solves
Fixes an issue where a successful embedded fallback after a CLI-backed primary failure could produce a short assistant reply but never deliver it to the source channel.
Why This Change Was Made
The repair separates stable source constraints from runtime-derived delivery ownership. CLI prompt bytes stay session-stable, while embedded delivery mode and model-visible guidance are finalized only after hook, route, auth, transport, and harness preparation. Internal ownership state is stripped before plugin handoff, and later prompt additions such as post-compaction context are preserved.
User Impact
Users in direct source chats receive the reply produced by a successful embedded fallback after a CLI failure. Explicit message-tool modes, privacy-sensitive room/group paths, rejected sends, and normal CLI or embedded delivery retain their existing behavior.
Evidence
18b185e3003f35fe824aefd9b804f24c15721bda.AI-assisted: Yes — Codex. Exact-head developer, verifier, and adversarial review evidence was checked before publication.