Repository navigation
fix(approvals): handle stale plugin waits - #88203
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 15, 2026, 10:01 PM ET / July 16, 2026, 02:01 UTC. Summary PR surface: Source +26, Tests +107, Other 0. Total +133 across 10 files. Reproducibility: yes. at source level: current main still emits the stale waitDecision error, while the Codex and native-hook consumers still allow that rejection to escape; the contributor also supplied a real gateway reproduction on the proof head. Review metrics: none identified. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Rebase onto current main, retain its phase-aware before-tool diagnostics and structured stale classifier, add the legacy waitDecision message to that canonical classifier, and use it only in the remaining Codex, native-hook, and exec consumers with focused regression coverage. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main still emits the stale waitDecision error, while the Codex and native-hook consumers still allow that rejection to escape; the contributor also supplied a real gateway reproduction on the proof head. Is this the best way to solve the issue? Yes in principle, but not as a direct merge of the stale branch; the best fix is the same shared classification approach rebased onto current main without replacing its newer phase-aware handling. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 154d53c4f6fc. Label changesLabel justifications:
Evidence reviewedPR surface: Source +26, Tests +107, Other 0. Total +133 across 10 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (2 earlier review cycles)
|
|
Added real gateway/client stale-id proof to the PR body. It starts a real loopback gateway, calls @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
b45c8d7 to
017babe
Compare
925b735 to
3c80ada
Compare
3c80ada to
9a74efa
Compare
f78c8ae to
6d0a0a0
Compare
6d0a0a0 to
d0270e4
Compare
|
This pull request has been automatically marked as stale due to inactivity. |
Recognize the gateway stale-id message through the shared classifier and map stale exec, Codex app-server, and native PermissionRequest waits to their existing fail-closed or defer contracts without swallowing aborts. Closes openclaw#88111 Co-authored-by: Andy Ye <[email protected]>
62d3f97 to
aa07560
Compare
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(approvals): handle stale plugin waits 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. |
Satisfy the catch-callback unknown lint without changing approval behavior. Co-authored-by: Andy Ye <[email protected]>
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(approvals): handle stale plugin waits 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. |
|
Maintainer pre-merge verification for
Direct Codex contract check at sibling
Reviewed source head: 0e5eebe |
|
Merged via squash.
|
* fix(approvals): handle stale plugin waits Recognize the gateway stale-id message through the shared classifier and map stale exec, Codex app-server, and native PermissionRequest waits to their existing fail-closed or defer contracts without swallowing aborts. Closes openclaw#88111 Co-authored-by: Andy Ye <[email protected]> * style(approvals): type stale wait catch values Satisfy the catch-callback unknown lint without changing approval behavior. Co-authored-by: Andy Ye <[email protected]> --------- Co-authored-by: Peter Steinberger <[email protected]>
Closes #88111
What Problem This Solves
Fixes stale
plugin.approval.waitDecisionidentifiers escaping as generic runtime failures from exec, Codex app-server, and native PermissionRequest waits. Approval state can legitimately disappear after expiry, restart, or caller lifecycle drift; those cases must stay fail closed without crashing the whole turn.Why This Change Was Made
The shared approval-not-found classifier now recognizes both gateway message variants. Exec uses the canonical classifier; Codex app-server maps stale waits to unavailable/decline; native PermissionRequest maps them to no hook verdict so Codex continues through its normal guardian/user approval path. Error classification is attached only to gateway wait promises, so abort races and unrelated errors preserve their existing propagation.
Current main's newer phase-aware before-tool classification is retained and the obsolete Plugin SDK budget churn is omitted.
User Impact
Expired approval waits deny or defer cleanly instead of terminating agent turns with misleading generic errors. No stale approval can authorize a tool.
Evidence
approval expired or not foundis recognized by the shared classifier.Direct Codex contract check at sibling
9970cd706fc4f25bbb97b42f4b68d993dabe91e2:codex-rs/hooks/src/events/permission_request.rs:1-15,50-60,98-117defines no hook verdict as deferral to normal approval.codex-rs/app-server-protocol/src/protocol/v2/item.rs:57-114defines decline as denial while continuing the turn.codex-rs/app-server/src/bespoke_event_handling.rs:1885-1922fails closed on missing/failed approval responses.Credit
Maintainer rewrite of Andy Ye's contribution (@TurboTheTurtle), preserved with
Co-authored-by: Andy Ye <[email protected]>.