Repository navigation
fix(codex): prevent false stalls while app-server work progresses - #145121
metahacker wants to merge 2 commits into
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 real behavior proof before merge. What this changesConnects native Codex progress to the originating reply clock and an owner-checked diagnostic watchdog callback. Example: A native Codex channel turn continues producing activity beyond six minutes.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 2 items remain Keep open: this PR contains meaningful work for the still-open paired bug, and the merged watchdog fixes address different failure modes. Priority: P1 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherCodex app-server notifications enter OpenClaw's embedded harness, which associates progress with the admitted backend and updates reply and diagnostic activity used by recovery. flowchart LR
A[Codex app server] --> B[Native progress callback]
B --> C[Captured backend owner checks]
C --> D[Reply activity clock]
C --> E[Diagnostic activity clock]
D --> F[Stall recovery]
E --> F
Technical reviewBest possible solution: Preserve exact-owner progress attribution through the current session-controller watchdog while retaining idle recovery and Stop behavior. Do we have a high-confidence way to reproduce the issue? Source confirms the missing channel progress callback and the supplied regression targets that boundary; no runtime reproduction was executed, and current main's redesigned watchdog complicates reproducing the exact interruption. Is this the best way to solve the issue? The submitted repair reuses existing activity owners and captures the exact backend rather than adopting a successor, but its integration must account for current main's controller-owned watchdog. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 40168696c2d0. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +76, Tests +401. Total +477 across 5 files. Added test files: 2. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (8 earlier review cycles)
Reviewed November 11, 2026, 5:45 AM ET / 10:45 UTC (Revision 9). |
|
@clawsweeper re-review Thank you for the precise direction. I’ve added the requested redacted real after-fix long-turn evidence to the existing PR body, including causal owner-clock attribution beyond the recovery windows, normal completion, exact-thread delivery, and cleanup. The PR remains draft pending your review. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Related: #145120
What Problem This Solves
Healthy native Codex channel turns can receive a false “stopped making progress” interruption while the app-server continues producing activity. The original revision wired progress to the captured reply operation. A later recurrence exposed the separate diagnostic watchdog clock: that clock can remain stale while the reply clock advances.
The original real long-turn proof below remains valid for reply-owner freshness and final delivery, but did not cover the failing diagnostic
embedded_runpath. This revision explicitly tests that path rather than treating survival of a tool-heavy turn as universal acceptance.Why This Change Was Made
Keep the original captured-reply callback and bind progress to the exact admitted backend handle at the existing host execution-binding seam. A synchronous host callback now updates diagnostic progress when that same owner is active and the diagnostic phase is an ownerless
embedded_run. It is independent of the optional, queued, best-effortrun.progresstelemetry channel.The current-owner registry read validates the captured handle; it does not look up a successor to attribute delayed activity to. Tool authority itself is unchanged; its existing registration/active assertions bind this host-owned progress callback.
User Impact
Advancing native work refreshes both relevant liveness clocks. Runtime-owned waits retain their existing protection. Genuinely idle work remains recoverable, and stale callbacks cannot keep a successor or stuck tool alive.
Evidence — September 14 follow-up
Current upstream base:
6d586170048982bd6c5ebc3cdc08bbd003f47a1d. The original three-file patch reapplied unchanged (git range-diffreports=); the new bridge adds one production module change and a dedicated regression file.node scripts/check-changed.mjs --base 6d586170048982bd6c5ebc3cdc08bbd003f47a1dcompleted with exit 0, including core types, all core-test type graphs, formatting/lint, dead-code scans, import cycles and repository policy guards. Release-based targeted types/lint also pass; the release broad gate stops at its pre-existing fs-safe 0.8.5 patch allowlist guard, unchanged by this patch.reviewer_unavailable/engine_failedbecause its model cache lackedbase_instructions; it produced no verdict. A final independent native reviewer subsequently completed the full five-file source scope and affected registration, admission, reply, diagnostic, recovery, and native-notification contracts: scoped-clean for introduced P0–P2 findings. The reviewer verified actual watchdog enablement, exact handle capture and revalidation, core semantic-phase exclusion, and runtime-owned wait preservation. The earlier transport-blocked scope is now completed. This does not recast the failed helper attempt as a successful helper review. The original accepted patch remains unchanged; its range-diff and source composition were verified.Causal limits and current readiness
The two-clock dependency and synchronous repair are demonstrated. The precise reason production telemetry failed to advance the clock in the reported recurrence is still unproven. An earlier local theory that exact-owner rejection caused those missed events was withdrawn: the local native handle did not have that diagnostic owner. Do not infer that every interruption has this cause.
This PR remains draft pending maintainer/security-owner review and fresh real-channel activation acceptance of the combined change. Historical 660-second native evidence validates the original callback, not the new diagnostic bridge. No production rollout, broad CI success, or universal stall-fix claim is made.
Historical original-patch native long-turn evidence — September 11
The acceptance used the actual source-runtime Gateway, the real QA channel plugin, native Codex execution, and supporting assets built from exact head
3b3b97e16535d28549d69bde0614faf40ff11cbf. The delivery surface was an isolated synthetic QA channel, not Slack, so no real user or workspace data was involved. This is a source-runtime proof with exact-built assets, not a packaged-install claim.The harness transparently wrapped the captured reply owner's existing
recordActivitymethod with a call-through observer that preserved its receiver and arguments. A clock advance was credited to this proof only when its immediate production caller wasonRunProgressin the embedded candidate. Generic diagnostics and other owner writes were excluded, so survival alone was not treated as proof.Redacted independent readback:
The ordinary recovery diagnostics and thresholds remained enabled and unchanged: 120-second warning, six-minute active-abort threshold, ten-minute quiet takeover, and the normal 15-minute long-tool floor. The trace recorded repeated causally attributed activity beyond ten minutes, normal completion, exact-thread final delivery, and clean owner/process/port cleanup. No recovery interruption or owner replacement occurred.
This is positive after-fix evidence, not a claim that the previous revision would necessarily be aborted by this exact synthetic workload. No private runtime log, fixture path, credential, endpoint, model identifier, or user data is included.