Repository navigation
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 28, 2026, 8:26 AM ET / 12:26 UTC. ClawSweeper reviewWhat this changesThe PR marks busy turns accepted by steering or follow-up queuing so reply finalization suppresses the false generic no-reply fallback while the active run owns delivery. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 4 items remain Keep this PR open: it targets the linked active bug with a focused internal admission-state handoff, and the patch appears to preserve the generic fallback for genuine empty completions. It still needs after-fix real-channel proof before merge because the submitted evidence for the changed behavior is limited to tests and mocked dispatch paths. Priority: P1 Review scores
Verification
How this fits togetherAuto-reply accepts inbound channel messages, invokes the agent runner, and finalizes any visible reply through the dispatcher. When a session already has an active run, the runner may steer or queue the new turn; this patch carries that accepted status to finalization so it does not mistake deferred work for an empty model result. flowchart LR
A[Inbound channel message] --> B[Reply dispatch]
B --> C{Active session run?}
C -->|No| D[Run agent and deliver reply]
C -->|Yes| E[Steer or queue follow-up]
E --> F[Accepted-turn state]
D --> G[Dispatch finalization]
F --> G
G --> H[Fallback only for true empty completion]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +55, Tests +11. Total +66 across 9 files. View PR surface stats
Review metricsNone. 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 Desktop recording would directly show the missing false fallback and the expected delivery outcome for the active and accepted turns. A maintainer can ask Mantis to capture proof by posting this exact PR comment: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one invocation-local admission signal, then demonstrate a redacted live two-message channel run showing that the accepted second turn receives no false fallback while the active and queued work retain their normal delivery behavior. Do we have a high-confidence way to reproduce the issue? No high-confidence after-fix reproduction is provided yet. The source path and reported before-state logs make the busy-turn mechanism reproducible in principle, but the PR only supplies mocked/focused test proof after the change. Is this the best way to solve the issue? Yes, provisionally: carrying an invocation-local accepted-admission fact to the existing finalizer is narrower and safer than changing delivery counts or adding shared state. A live channel run is still needed to confirm the exact delivery contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4f6fc38a2204. LabelsLabel changes:
Label 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
|
3866b63 to
12e0379
Compare
|
Rebased cleanly onto current Focused validation rerun: 305/305 admission/finalization tests passed; isolated steering E2E 1 passed (119 skipped); targeted type-aware Oxlint, core TypeScript check, and |
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(auto-reply): suppress fallback for accepted busy turns This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
Superseded by #115016. The accepted busy-turn implementation, tests, linked issue, deployment evidence, and review findings have been consolidated there to keep one user-facing fallback regression in one review lane. |
Summary
High Level TLDR
When a second message is accepted by an already-running agent—either steered into the active run or queued as a follow-up—the current dispatch returns no immediate reply by design. Finalization mistook that accepted turn for an empty model completion and sent the generic “No reply was generated...” fallback. This patch carries an in-memory accepted-admission marker through the existing reply invocation and suppresses that false fallback until the accepted work produces its normal reply.
Closes #115171.
Root Cause
The concrete before path is:
runReplyAgentsuccessfully steers the message orenqueueFollowupRun(...)accepts it for deferred execution.runReplyAgentreturnsundefinedbecause no immediate second-dispatch payload should be sent.finalizeDispatchAndAuditsees zero reply counts and no observed delivery, cannot distinguish accepted busy-run work from a genuinely empty model completion, and emitsNO_VISIBLE_REPLY_FALLBACK_TEXT.Source proof on current
main:undefinedfromagent-runner-run.ts.undefined.dispatch-from-config.finalize.tspreviously had no admission-state input.reply-operation-run-state.tsalready carries invocation-local admission facts for heartbeat ownership; this patch extends that internal contract rather than adding a new global registry or delivery mechanism.No model failure occurs on the affected path. The second turn was accepted by active-run processing.
What changed
ReplyOperationRunState.{ status: "accepted", mode: "steer" }only after steering succeeds.{ status: "accepted", mode: "followup" }only after follow-up enqueue succeeds.User impact
Rapid consecutive messages no longer receive a false model-failure notice merely because the newer message was accepted by the active run. The existing foreground-fence policy is unchanged; this removes the erroneous newer visible delivery that could make the earlier real answer lose that fence.
Genuine empty model completions still receive the existing fallback.
Real behavior proof
Observed before behavior
A real Telegram direct conversation reproduced the sequence: a second message sent while the first was still active received the generic no-reply fallback; the first answer appeared only after the subsequent interaction. The private screenshot is not attached because it contains chat/account identifiers.
Redacted Gateway correlation from a second live recurrence:
This establishes the patch boundary directly: the second dispatch produced a visible fallback without running a model, then the earlier real completion had no queued visible payload.
After-patch focused proof
Commands:
Copied results from rebased head
12e0379e2aa5:Observed after behavior:
enqueueFollowupRunmock path stampsaccepted/followup.accepted/steer.Live deployment state
The patch was deployed as an
oc-update --skip-codexoverlay to a real multi-channel Gateway on 2026-07-28. The wrapper rebuilt from source and reported:Independent post-update checks observed the replacement service active/running,
NRestarts=0, port 18789 listening, configuration audit clean, and RPC read healthy on version2026.7.2.The deployed pre-rebase commit and refreshed PR commit have the same stable patch ID (
40db31cbf7686f9302fb37e790f2cb9a0496676b), so the behavior-changing diff is identical. A fresh two-message channel reproduction after deployment remains pending; no claim of live after-fix channel proof is made yet.Verification
main5087e654773; refreshed head12e0379e2aa5.git diff --check: passed.What was not tested
agent-runner.runreplyagent.e2e.test.tsfile is not green on currentmainin this environment: 53 failures include default-agent session-key errors and two existing 120-second cases. The exact changed steering case passes in isolation, and the two focused suites pass.AI Assistance
Codex traced and implemented the admission/finalization contract. Fable reviewed the first patch via Claude CLI and identified the successful-steer sibling path; that finding was addressed before the final clean review.